Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # dev >> Re: svn commit: r1423994 - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/conf/ server/src/main/java/org/apache/accumulo/server/client/ server/src/main/java/org/apache/accumulo/serve...


Copy link to this message
-
Re: svn commit: r1423994 - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/conf/ server/src/main/java/org/apache/accumulo/server/client/ server/src/main/java/org/apache/accumulo/serve...
On Wed, Dec 19, 2012 at 1:14 PM,  <[EMAIL PROTECTED]> wrote:
> Author: ecn
> Date: Wed Dec 19 18:14:08 2012
> New Revision: 1423994
>
> URL: http://svn.apache.org/viewvc?rev=1423994&view=rev
> Log:
> ACCUMULO-408 track threads which are assigning files to tservers, make connection timeout configurable for bulk requests
>
> Modified:
>     accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
>     accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/Property.java
>     accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
>     accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
>     accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
>     accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
>
> Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
> URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java?rev=1423994&r1=1423993&r2=1423994&view=diff
> =============================================================================> --- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java (original)
> +++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java Wed Dec 19 18:14:08 2012
> @@ -124,6 +124,11 @@ public class ServerClient {
>    }
>

In the method below, the preferCachedConnections parameter is ignored

>    public static Pair<String,ClientService.Client> getConnection(Instance instance, boolean preferCachedConnections) throws TTransportException {
> +    AccumuloConfiguration conf = instance.getConfiguration();
> +    return getConnection(instance, false, conf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT));
> +  }
> +
> +  public static Pair<String,ClientService.Client> getConnection(Instance instance, boolean preferCachedConnections, long rpcTimeout) throws TTransportException {
>      ArgumentChecker.notNull(instance);
>      // create list of servers
>      ArrayList<ThriftTransportKey> servers = new ArrayList<ThriftTransportKey>();
> @@ -139,7 +144,7 @@ public class ServerClient {
>          servers.add(new ThriftTransportKey(
>              new ServerServices(new String(data)).getAddressString(Service.TSERV_CLIENT),
>              conf.getPort(Property.TSERV_CLIENTPORT),
> -            conf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT)));
> +            rpcTimeout));
>      }
>
>      boolean opened = false;
>
> Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/Property.java
> URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/Property.java?rev=1423994&r1=1423993&r2=1423994&view=diff
> =============================================================================> --- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/Property.java (original)
> +++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/Property.java Wed Dec 19 18:14:08 2012
> @@ -65,7 +65,8 @@ public enum Property {
>    MASTER_RECOVERY_MAXTIME("master.recovery.time.max", "30m", PropertyType.TIMEDURATION, "The maximum time to attempt recovery before giving up"),
>    MASTER_BULK_RETRIES("master.bulk.retries", "3", PropertyType.COUNT, "The number of attempts to bulk-load a file before giving up."),
>    MASTER_BULK_THREADPOOL_SIZE("master.bulk.threadpool.size", "5", PropertyType.COUNT, "The number of threads to use when coordinating a bulk-import."),
> -  MASTER_MINTHREADS("master.server.threads.minimum", "2", PropertyType.COUNT, "The minimum number of threads to use to handle incoming requests."),
> +  MASTER_BULK_TIMEOUT("master.bulk.timeout", "5m", PropertyType.TIMEDURATION, "The time to wait for a tablet server to process a bulk import request"),
> +  MASTER_MINTHREADS("master.server.threads.minimum", "20", PropertyType.COUNT, "The minimum number of threads to use to handle incoming requests."),

calling getMemoryInBytes() to get a time?