From: <btm...@us...> - 2010-08-06 16:51:54
|
Revision: 3426 http://bigdata.svn.sourceforge.net/bigdata/?rev=3426&view=rev Author: btmurphy Date: 2010-08-06 16:51:44 +0000 (Fri, 06 Aug 2010) Log Message: ----------- [branch dev-btm]: CHECKPOINT - changes to allow smart proxy implementation of load balancer to be started by ServicesManagerService or BootManager, new/changed tests to run against either the smart proxy implementation of the load balancer or the purely remote implemenation (LoadBalancerService & LoadBalancerService) Modified Paths: -------------- branches/dev-btm/bigdata/src/java/com/bigdata/relation/rule/eval/RuleStats.java branches/dev-btm/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java branches/dev-btm/bigdata/src/java/com/bigdata/resources/CompactingMergeTask.java branches/dev-btm/bigdata/src/java/com/bigdata/service/AbstractFederation.java branches/dev-btm/bigdata/src/java/com/bigdata/service/AbstractService.java branches/dev-btm/bigdata/src/java/com/bigdata/service/DefaultServiceFederationDelegate.java branches/dev-btm/bigdata/src/java/com/bigdata/service/EmbeddedClient.java branches/dev-btm/bigdata/src/java/com/bigdata/service/EmbeddedFederation.java branches/dev-btm/bigdata/src/java/com/bigdata/service/Event.java branches/dev-btm/bigdata/src/java/com/bigdata/service/HostScore.java branches/dev-btm/bigdata/src/java/com/bigdata/service/IBigdataClient.java branches/dev-btm/bigdata/src/java/com/bigdata/service/IBigdataFederation.java branches/dev-btm/bigdata/src/java/com/bigdata/service/IFederationDelegate.java branches/dev-btm/bigdata/src/java/com/bigdata/service/ILoadBalancerService.java branches/dev-btm/bigdata/src/java/com/bigdata/service/IServiceLoadHelper.java branches/dev-btm/bigdata/src/java/com/bigdata/service/LoadBalancer.java branches/dev-btm/bigdata/src/java/com/bigdata/service/ServiceScore.java branches/dev-btm/bigdata/src/java/com/bigdata/service/ndx/IAsynchronousWriteBufferFactory.java branches/dev-btm/bigdata/src/test/com/bigdata/resources/AbstractResourceManagerTestCase.java branches/dev-btm/bigdata/src/test/com/bigdata/search/TestAll.java branches/dev-btm/bigdata/src/test/com/bigdata/service/StressTestConcurrent.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestAll.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestEventReceiver.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestMove.java branches/dev-btm/bigdata/src/test/com/bigdata/service/ndx/TestAll.java branches/dev-btm/bigdata/src/test/com/bigdata/sparse/TestAll.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/jini/start/BigdataZooDefs.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/jini/start/ServicesManagerServer.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/jini/start/config/BigdataServiceConfiguration.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/jini/start/config/LoadBalancerConfiguration.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/jini/start/config/ServicesManagerConfiguration.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/jini/start/process/ZookeeperProcessHelper.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/loadbalancer/AdminProxy.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/loadbalancer/EmbeddedLoadBalancer.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/loadbalancer/PrivateInterface.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/loadbalancer/ServiceImpl.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/loadbalancer/ServiceProxy.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/service/jini/JiniFederation.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/service/jini/benchmark/ThroughputMaster.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/service/jini/lookup/AbstractCachingServiceClient.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/service/jini/lookup/BigdataCachingServiceClient.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/service/jini/lookup/LoadBalancerClient.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/service/jini/util/BroadcastSighup.java branches/dev-btm/bigdata-jini/src/java/com/bigdata/service/jini/util/JiniServicesHelper.java branches/dev-btm/bigdata-jini/src/test/com/bigdata/service/jini/TestAll.java branches/dev-btm/bigdata-jini/src/test/com/bigdata/service/jini/TestBigdataClient.java branches/dev-btm/bigdata-jini/src/test/com/bigdata/service/jini/master/TestAll.java branches/dev-btm/bigdata-jini/src/test/com/bigdata/service/jini/master/TestMappedRDFDataLoadMaster.java branches/dev-btm/bigdata-rdf/src/java/com/bigdata/rdf/load/ConcurrentDataLoader.java branches/dev-btm/bigdata-rdf/src/java/com/bigdata/rdf/load/RDFLoadTaskFactory.java branches/dev-btm/src/resources/config/bigdataCluster.config Added Paths: ----------- branches/dev-btm/bigdata/src/test/com/bigdata/service/StressTestConcurrentRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestBasicIndexStuffRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestDistributedTransactionServiceRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestEDSRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestEmbeddedClientRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestMetadataIndexRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestMoveRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestOverflowRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestRangeQueryRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestRestartSafeRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestScatterSplitRemote.java branches/dev-btm/bigdata/src/test/com/bigdata/service/TestSplitJoinRemote.java branches/dev-btm/bigdata-jini/src/test/com/bigdata/service/jini/TestBigdataClientRemote.java branches/dev-btm/bigdata-jini/src/test/com/bigdata/service/jini/master/TestMappedRDFDataLoadMasterRemote.java Modified: branches/dev-btm/bigdata/src/java/com/bigdata/relation/rule/eval/RuleStats.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/relation/rule/eval/RuleStats.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/relation/rule/eval/RuleStats.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -40,7 +40,6 @@ import com.bigdata.relation.rule.ISlice; import com.bigdata.relation.rule.IStep; import com.bigdata.relation.rule.Rule; -//BTM import com.bigdata.service.ILoadBalancerService; import com.bigdata.striterator.IKeyOrder; import com.bigdata.service.LoadBalancer; @@ -60,8 +59,7 @@ * In order to aggregate the data on rule execution, we want to roll up the data * for the individual rules along the same lines as the program structure. * -BTM * @todo Report as counters aggregated by the {@link ILoadBalancerService}? -* @todo Report as counters aggregated by the {@link LoadBalancer} service? + * @todo Report as counters aggregated by the load balancer service? * * @author mikep * @author <a href="mailto:tho...@us...">Bryan Thompson</a> Modified: branches/dev-btm/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -61,7 +61,6 @@ import com.bigdata.service.EventResource; import com.bigdata.service.EventType; import com.bigdata.service.IDataService; -//BTM import com.bigdata.service.ILoadBalancerService; import com.bigdata.service.MetadataService; import com.bigdata.util.InnerCause; import com.bigdata.util.concurrent.DaemonThreadFactory; @@ -1327,19 +1326,15 @@ } /** -BTM * Return the {@link ILoadBalancerService} if it can be discovered. -* Return the {@link LoadBalancer} if it can be discovered. + * Return the load balancer service if it can be discovered. * -BTM * @return the {@link ILoadBalancerService} if it can be discovered and -* @return the {@link LoadBalancer} service if it can be discovered and + * @return the load balancer service if it can be discovered and * otherwise <code>null</code>. */ -//BTM protected ILoadBalancerService getLoadBalancerService() { -protected LoadBalancer getLoadBalancerService() { + protected LoadBalancer getLoadBalancerService() { // lookup the load balancer service. -//BTM final ILoadBalancerService loadBalancerService; -final LoadBalancer loadBalancerService; + final LoadBalancer loadBalancerService; try { @@ -1377,8 +1372,7 @@ * @param loadBalancerService * The load balancer. */ -//BTM protected boolean shouldMove(final ILoadBalancerService loadBalancerService) { -protected boolean shouldMove(final LoadBalancer loadBalancerService) { + protected boolean shouldMove(final LoadBalancer loadBalancerService) { if (loadBalancerService == null) throw new IllegalArgumentException(); @@ -1465,8 +1459,7 @@ * @return The tasks. */ private List<AbstractTask> chooseMoves( -final LoadBalancer loadBalancerService) { -//BTM final ILoadBalancerService loadBalancerService) { + final LoadBalancer loadBalancerService) { if (resourceManager.maximumMovesPerTarget == 0) { @@ -2388,8 +2381,7 @@ * Running out of DISK space causes an urgent condition and can lead to * failure or all services on the same host. Therefore, when a host is near * to exhausting its DISK space it (a) MUST notify the -BTM * {@link ILoadBalancerService}; (b) temporary files SHOULD be purged; it -* {@link ILoadBalancerService}; (b) temporary files SHOULD be purged; it + * load balancer service; (b) temporary files SHOULD be purged; it * MAY choose to shed indices that are "hot for write" since that will slow * down the rate at which the disk space is consumed; (d) index partitions * may be aggressively moved off of the LDS; (e) the transaction service MAY @@ -2464,8 +2456,7 @@ * When it is not available we simply do not consider index * partition moves. */ -//BTM final ILoadBalancerService lbs = getLoadBalancerService(); -final LoadBalancer lbs = getLoadBalancerService(); + final LoadBalancer lbs = getLoadBalancerService(); if(lbs != null && shouldMove(lbs)) { Modified: branches/dev-btm/bigdata/src/java/com/bigdata/resources/CompactingMergeTask.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/resources/CompactingMergeTask.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/resources/CompactingMergeTask.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -29,7 +29,6 @@ import com.bigdata.service.DataService; import com.bigdata.service.Event; import com.bigdata.service.EventResource; -//BTM import com.bigdata.service.ILoadBalancerService; import com.bigdata.service.MetadataService; import com.bigdata.service.ndx.ClientIndexView; @@ -513,8 +512,7 @@ * critically overloaded, but that should probably be handled by * different logic.] */ -//BTM ILoadBalancerService loadBalancerService = null; -LoadBalancer loadBalancerService = null; + LoadBalancer loadBalancerService = null; if (vmd.getPercentOfSplit() < resourceManager.maximumMovePercentOfSplit && resourceManager.maximumMovesPerTarget != 0 && resourceManager.getLiveJournal().getName2Addr().rangeCount() > resourceManager.minimumActiveIndexPartitions @@ -562,19 +560,15 @@ } /** -BTM * Return the {@link ILoadBalancerService} if it can be discovered. -* Return the {@link LoadBalancer} service if it can be discovered. + * Return the load balancer service if it can be discovered. * -BTM * @return the {@link ILoadBalancerService} if it can be discovered and -* @return the {@link LoadBalancer} service if it can be discovered and + * @return the load balancer service if it can be discovered and * otherwise <code>null</code>. */ -//BTM private ILoadBalancerService getLoadBalancerService() { -private LoadBalancer getLoadBalancerService() { + private LoadBalancer getLoadBalancerService() { // lookup the load balancer service. -//BTM final ILoadBalancerService loadBalancerService; -final LoadBalancer loadBalancerService; + final LoadBalancer loadBalancerService; try { @@ -612,8 +606,7 @@ * @param loadBalancerService * The load balancer. */ -//BTM protected boolean shouldMove(final ILoadBalancerService loadBalancerService) { -protected boolean shouldMove(final LoadBalancer loadBalancerService) { + protected boolean shouldMove(final LoadBalancer loadBalancerService) { if (loadBalancerService == null) throw new IllegalArgumentException(); @@ -692,8 +685,7 @@ * behavior). */ private UUID getMoveTarget(final UUID sourceServiceUUID, -final LoadBalancer loadBalancerService) { -//BTM final ILoadBalancerService loadBalancerService) { + final LoadBalancer loadBalancerService) { try { Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/AbstractFederation.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/AbstractFederation.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/AbstractFederation.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -372,8 +372,7 @@ * Counters that aggregate across all tasks submitted by the client against * the connected federation. Those counters are sampled by a * {@link ThreadPoolExecutorStatisticsTask} and reported by the client to -BTM * the {@link ILoadBalancerService}. -* the {@link LoadBalancer} service. + * the load balancer service. */ private final TaskCounters taskCounters = new TaskCounters(); @@ -401,8 +400,7 @@ * performed by the client against the connected federation. These * {@link TaskCounters} are sampled by a * {@link ThreadPoolExecutorStatisticsTask} and the sampled data are -BTM * reported by the client to the {@link ILoadBalancerService}. -* reported by the client to the {@link LoadBalancer} service. + * reported by the client to the load balancer service. */ public TaskCounters getTaskCounters() { @@ -415,8 +413,7 @@ * for this client. There is only a single instance per scale-out index and * all operations by this client on that index are aggregated by that * instance. These counters are reported by the client to the -BTM * {@link ILoadBalancerService}. -* {@link LoadBalancer} service. + * load balancer service. * * @param name * The scale-out index name. @@ -456,8 +453,7 @@ /** * Collects interesting statistics on the client's host and process -BTM * for reporting to the {@link ILoadBalancerService}. -* for reporting to the {@link LoadBalancer} service. + * for reporting to the load balancer service. */ private AbstractStatisticsCollector statisticsCollector; @@ -466,15 +462,13 @@ * or until the federation is {@link #shutdown()}. * <p> * Note: Tasks run on this service generally update sampled values on -BTM * {@link ICounter}s reported to the {@link ILoadBalancerService}. Basic -* {@link ICounter}s reported to the {@link LoadBalancer} service. Basic + * {@link ICounter}s reported to the load balancer service. Basic * information on the {@link #getExecutorService()} is reported * automatically. Clients may add additional tasks to report on client-side * aspects of their application. * <p> * Note: Non-sampled counters are automatically conveyed to the -BTM * {@link ILoadBalancerService} once added to the basic {@link CounterSet} -* {@link LoadBalancer} service once added to the basic {@link CounterSet} + * load balancer service once added to the basic {@link CounterSet} * returned by {@link #getCounterSet()}. * * @param task @@ -681,8 +675,7 @@ if (dataServiceUUID == null) { -//BTM final ILoadBalancerService loadBalancerService = getLoadBalancerService(); -final LoadBalancer loadBalancerService = getLoadBalancerService(); + final LoadBalancer loadBalancerService = getLoadBalancerService(); if (loadBalancerService == null) { @@ -827,8 +820,7 @@ /** * Forces the immediate reporting of the {@link CounterSet} to the -BTM * {@link ILoadBalancerService}. Any errors will be logged, not thrown. -* {@link LoadBalancer} service. Any errors will be logged, not thrown. + * load balancer service. Any errors will be logged, not thrown. */ public void reportCounters() { @@ -999,10 +991,8 @@ * the (required) {@link ReportTask}. * <p> * Note: The {@link ReportTask} will relay any collected performance -BTM * counters to the {@link ILoadBalancerService}, but it also lets the -BTM * {@link ILoadBalancerService} know which services exist, which is -* counters to the {@link LoadBalancer} service, but it also lets the -* {@link LoadBalancer} service know which services exist, which is + * counters to the load balancer service, but it also lets the + * load balancer service know which services exist, which is * important for some of its functions. * <p> * @@ -1304,8 +1294,7 @@ /** * Periodically report performance counter data to the -BTM * {@link ILoadBalancerService}. -* {@link LoadBalancer} service. + * load balancer service. * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> * @version $Id$ @@ -1382,8 +1371,7 @@ } -//BTM final ILoadBalancerService loadBalancerService = fed.getLoadBalancerService(); -final LoadBalancer loadBalancerService = fed.getLoadBalancerService(); + final LoadBalancer loadBalancerService = fed.getLoadBalancerService(); if (loadBalancerService == null) { System.out.println(">>>>> AbstractFederation.reportPerformanceCounters: loadBalancerService = NULL"); @@ -1483,8 +1471,7 @@ } /** -BTM * Queues up an event to be sent to the {@link ILoadBalancerService}. -* Queues up an event to be sent to the {@link LoadBalancer} service. + * Queues up an event to be sent to the load balancer service. * Events are maintained on a non-blocking queue (no fixed capacity) and * sent by a scheduled task. * @@ -1503,14 +1490,12 @@ } /** -BTM * Queue of events sent periodically to the {@link ILoadBalancerService}. -* Queue of events sent periodically to the {@link LoadBalancer} service. + * Queue of events sent periodically to the load balancer service. */ final private BlockingQueue<Event> events = new LinkedBlockingQueue<Event>(); /** -BTM * Sends events to the {@link ILoadBalancerService}. -* Sends events to the {@link LoadBalancer} service. + * Sends events to the load balancer service. * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> * @version $Id$ @@ -1530,8 +1515,7 @@ try { -//BTM final ILoadBalancerService lbs = getLoadBalancerService(); -final LoadBalancer lbs = getLoadBalancerService(); + final LoadBalancer lbs = getLoadBalancerService(); if (lbs == null) { @@ -1583,8 +1567,6 @@ } catch (Throwable t) { log.warn(getServiceName(), t); -//BTM -t.printStackTrace(); } Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/AbstractService.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/AbstractService.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/AbstractService.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -82,7 +82,7 @@ * <p> * Several things depend on when this method is invoked, including the setup * of the per-service {@link CounterSet} reported by the service to the - * {@link ILoadBalancerService}. + * load balancer service. * * @param serviceUUID * The {@link UUID} assigned to the service. Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/DefaultServiceFederationDelegate.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/DefaultServiceFederationDelegate.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/DefaultServiceFederationDelegate.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -46,7 +46,7 @@ /** * Basic delegate for services that need to override the service UUID and - * service interface reported to the {@link ILoadBalancerService}. + * service interface reported to the load balancer service. * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> * @version $Id$ Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/EmbeddedClient.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/EmbeddedClient.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/EmbeddedClient.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -152,7 +152,8 @@ public static final String DATA_DIR = EmbeddedFederation.class .getName() + ".dataDir"; - +//BTM + public static String SERVICE_IMPL_REMOTE = "serviceImplRemote"; } } Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/EmbeddedFederation.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/EmbeddedFederation.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/EmbeddedFederation.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -123,11 +123,13 @@ private final ResourceLockService resourceLockManager; /** -BTM * The (in process) {@link LoadBalancerService}. -* The (in process) {@link LoadBalancer} service. + * The (in process) load balancer service. */ //BTM private final LoadBalancerService loadBalancerService; -private final EmbeddedLoadBalancer loadBalancerService; +//private final EmbeddedLoadBalancer loadBalancerService; +private final LoadBalancer loadBalancerService; +private final EmbeddedLoadBalancerServiceImpl remoteLbs; +private final EmbeddedLoadBalancerImpl lbs; /** * The (in process) {@link MetadataService}. @@ -185,11 +187,9 @@ } /** -BTM * The (in process) {@link LoadBalancerService}. -* The (in process) {@link LoadBalancer} service. + * Returns the (in process) load balancer service. */ -//BTM final public ILoadBalancerService getLoadBalancerService() { -final public LoadBalancer getLoadBalancerService() { + final public LoadBalancer getLoadBalancerService() { // Note: return null if service not available/discovered. @@ -313,6 +313,8 @@ .getProperty(Options.CREATE_TEMP_FILE, ""+Options.DEFAULT_CREATE_TEMP_FILE)); +boolean serviceImplRemote = ( (null != properties.getProperty(EmbeddedClient.Options.SERVICE_IMPL_REMOTE)) ? true : false); +System.out.println("\n*** serviceImplRemote = "+serviceImplRemote); /* * The directory in which the data files will reside. */ @@ -617,78 +619,102 @@ if (isTransient) { -//BTM p.setProperty(LoadBalancerService.Options.TRANSIENT, "true"); -p.setProperty(EmbeddedLoadBalancerServiceImpl.Options.TRANSIENT, "true"); + p.setProperty(LoadBalancerService.Options.TRANSIENT, "true"); + p.setProperty(EmbeddedLoadBalancer.Options.TRANSIENT, "true"); -p.setProperty(EmbeddedLoadBalancerServiceImpl.Options.LOG_DIR, - new File(EmbeddedLoadBalancerServiceImpl.Options.DEFAULT_LOG_DIR).toString()); - + p.setProperty(EmbeddedLoadBalancerImpl.Options.LOG_DIR, + new File + (EmbeddedLoadBalancerImpl.Options.DEFAULT_LOG_DIR).toString()); } else { - // specify the data directory for the load balancer. - p.setProperty(EmbeddedLoadBalancerServiceImpl.Options.LOG_DIR, new File(dataDir, "lbs").toString()); - + p.setProperty(EmbeddedLoadBalancerImpl.Options.LOG_DIR, + new File(dataDir, "lbs").toString()); } + if(serviceImplRemote) { + try { + loadBalancerService = + new EmbeddedLoadBalancerServiceImpl + (UUID.randomUUID(), p).start(); + } catch (Throwable t) { + log.error(t, t); + throw new RuntimeException(t); + } + remoteLbs = (EmbeddedLoadBalancerServiceImpl)loadBalancerService; + lbs = null; + } else { //BTM*** remove after EmbeddedDataServiceImpl/shard.ServiceImpl/EmbeddedDataService //BTM*** is converted to smart proxy? -loadBalancerService = new EmbeddedLoadBalancerServiceImpl(UUID.randomUUID(), - hostname, - null,//SDM - replace with real SDM after conversion to smart proxy? + loadBalancerService = + new EmbeddedLoadBalancerImpl + (UUID.randomUUID(), + hostname, + null,//SDM - replace with real SDM after conversion to smart proxy? //BTM*** EmbeddedDataService.this, //BTM*** remove after EmbeddedDataService is converted to smart proxy - dataServiceByUUID, - p); + dataServiceByUUID, + p); + remoteLbs = null; + lbs = (EmbeddedLoadBalancerImpl)loadBalancerService; + } +System.out.println("*** serviceImplRemote = "+serviceImplRemote+" >>> remoteLbs = "+remoteLbs); +System.out.println("*** serviceImplRemote = "+serviceImplRemote+" >>> lbs = "+lbs); //BTM*** ------------------------------------------------------------------------------ - /* * Have the data services join the load balancer. */ for (IDataService ds : this.dataService) { - try { - - loadBalancerService.join(ds.getServiceUUID(), ds - .getServiceIface(), -//BTM -ds.getServiceName(), -hostname); - + if(remoteLbs != null) { + remoteLbs.join(ds.getServiceUUID(), + ds.getServiceIface(), + hostname); + } else { + lbs.join(ds.getServiceUUID(), + ds.getServiceIface(), + ds.getServiceName(), + hostname); + } } catch (IOException e) { - // Should never be thrown for an embedded service. - log.warn(e.getMessage(), e); - } - } /* * Other service joins. */ + if(remoteLbs != null) { + remoteLbs.join + (abstractTransactionService.getServiceUUID(), + abstractTransactionService.getServiceIface(), + hostname); + remoteLbs.join(remoteLbs.getServiceUUID(), + remoteLbs.getServiceIface(), + hostname); + remoteLbs.join(metadataService.getServiceUUID(), + metadataService.getServiceIface(), + hostname); + } else {//smart proxy + + lbs.join + (abstractTransactionService.getServiceUUID(), + abstractTransactionService.getServiceIface(), + (abstractTransactionService.getServiceUUID()).toString(), + hostname); + lbs.join(lbs.getServiceUUID(), + lbs.getServiceIface(), + (lbs.getServiceUUID()).toString(), + hostname); + lbs.join(metadataService.getServiceUUID(), + metadataService.getServiceIface(), + (metadataService.getServiceUUID()).toString(), + hostname); + } - loadBalancerService.join(abstractTransactionService.getServiceUUID(), - abstractTransactionService.getServiceIface(), -//BTM -(abstractTransactionService.getServiceUUID()).toString(), -hostname); - - loadBalancerService.join(loadBalancerService.getServiceUUID(), - loadBalancerService.getServiceIface(), -//BTM -(loadBalancerService.getServiceUUID()).toString(), -hostname); - - loadBalancerService.join(metadataService.getServiceUUID(), - metadataService.getServiceIface(), -//BTM -(metadataService.getServiceUUID()).toString(), -hostname); - } } @@ -834,41 +860,35 @@ } -//BTM protected class EmbeddedLoadBalancerServiceImpl extends AbstractEmbeddedLoadBalancerService { -protected class EmbeddedLoadBalancerServiceImpl extends EmbeddedLoadBalancer { + protected class EmbeddedLoadBalancerServiceImpl extends AbstractEmbeddedLoadBalancerService { /** * @param serviceUUID * @param properties */ -//BTM public EmbeddedLoadBalancerServiceImpl(UUID serviceUUID, Properties properties) { -//BTM -//BTM super(serviceUUID, properties); -//BTM -//BTM } + public EmbeddedLoadBalancerServiceImpl(UUID serviceUUID, Properties properties) { + super(serviceUUID, properties); + } -//BTM @Override -//BTM public EmbeddedFederation<T> getFederation() { -//BTM -//BTM return EmbeddedFederation.this; -//BTM -//BTM } + @Override + public EmbeddedFederation<T> getFederation() { + return EmbeddedFederation.this; + } + } -public EmbeddedLoadBalancerServiceImpl(UUID serviceUUID, - String hostname, - ServiceDiscoveryManager sdm, -//BTM - remove once EmbeddedDataService converted to smart proxy -Map<UUID, DataService> dataServiceMap, - Properties properties) -{ - super(serviceUUID, hostname, -sdm, -properties.getProperty(EmbeddedLoadBalancerServiceImpl.Options.LOG_DIR), -//BTM*** EmbeddedFederation.this, -dataServiceMap,//BTM*** - remove after DataService smart proxy? - properties); -} - + protected class EmbeddedLoadBalancerImpl extends EmbeddedLoadBalancer { + + public EmbeddedLoadBalancerImpl(UUID serviceUUID, + String hostname, + ServiceDiscoveryManager sdm, + Map<UUID, DataService> dataServiceMap,//BTM - remove once EmbeddedDataService converted to smart proxy? + Properties properties) + { + super(serviceUUID, hostname, sdm, + properties.getProperty(EmbeddedLoadBalancerImpl.Options.LOG_DIR), + dataServiceMap,//BTM*** - remove after DataService smart proxy? + properties); + } } protected class EmbeddedTransactionServiceImpl extends AbstractEmbeddedTransactionService { @@ -937,7 +957,11 @@ if (loadBalancerService != null) { - loadBalancerService.shutdown(); + if(remoteLbs != null) { + remoteLbs.shutdown(); + } else { + lbs.shutdown(); + } // loadBalancerService = null; @@ -981,7 +1005,11 @@ if (loadBalancerService != null) { - loadBalancerService.shutdownNow(); + if(remoteLbs != null) { + remoteLbs.shutdownNow(); + } else { + lbs.shutdownNow(); + } // loadBalancerService = null; @@ -1026,9 +1054,12 @@ metadataService.destroy(); } + if(remoteLbs != null) { + remoteLbs.destroy(); + } else { + lbs.destroy(); + } - loadBalancerService.destroy(); - if (!isTransient && !dataDir.delete()) { log.warn(ERR_COULD_NOT_DELETE + dataDir); Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/Event.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/Event.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/Event.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -48,10 +48,8 @@ /** * An event. Events are queued by the {@link IBigdataClient} and self-reported -BTM * periodically to the {@link ILoadBalancerService}. The event is assigned a -BTM * {@link UUID} when it is created and the {@link ILoadBalancerService} assigned -* periodically to the {@link LoadBalancer} service. The event is assigned a -* {@link UUID} when it is created and the {@link LoadBalancer} service assigned + * periodically to the load balancer service. The event is assigned a + * {@link UUID} when it is created and the load balancer assigned * start and end event times based on its local clock as the events are received * (this helps to reduce the demand on the {@link ITransactionService} for * global timestamp). @@ -60,8 +58,7 @@ * @version $Id$ * * @todo compact event serialization when reporting to the -BTM * {@link ILoadBalancerService}, including factoring out of the common -* {@link LoadBalancer} service, including factoring out of the common + * load balancer service, including factoring out of the common * metadata (some stuff will always be the same for a given reported and * does not need to be reported with each event). * Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/HostScore.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/HostScore.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/HostScore.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -1,20 +1,13 @@ package com.bigdata.service; -//BTM import com.bigdata.service.LoadBalancerService.UpdateTask; - /** -BTM * Per-host metadata and a score for that host which gets updated -BTM * periodically by {@link UpdateTask}. {@link HostScore}s are a -BTM * <em>resource utilization</em> measure. They are higher for a host which -BTM * is more highly utilized. There are several ways to look at the score, -BTM * including the {@link #rawScore}, the {@link #rank}, and the -BTM * {@link #drank normalized double-precision rank}. The ranks move in the - * Per-host metadata and a score for that host which gets updated periodically - * by <code>com.bigdata.loadbalancer.EmbeddedLoadBalancer.UpdateTask</code>. - * {@link HostScore}s are a <em>resource utilization</em> measure. They are - * higher for a host which is more highly utilized. There are several ways to - * look at the score, including the {@link #rawScore}, the {@link #rank}, and - * the {@link #drank normalized double-precision rank}. The ranks move in the + * Per-host metadata and a score for that host which gets updated + * periodically by the <code>UpdateTask</code> of the current + * implementation of the load balancer service. {@link HostScore}s are a + * <em>resource utilization</em> measure. They are higher for a host which + * is more highly utilized. There are several ways to look at the score, + * including the {@link #rawScore}, the {@link #rank}, and the + * {@link #drank normalized double-precision rank}. The ranks move in the * same direction as the {@link #rawScore}s - a higher rank indicates * higher utilization. The least utilized host is always rank zero (0). The * most utilized host is always in the last rank. Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/IBigdataClient.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/IBigdataClient.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/IBigdataClient.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -447,9 +447,8 @@ String DEFAULT_COLLECT_QUEUE_STATISTICS = "true"; /** - * The delay between reports of performance counters to the -BTM * {@link ILoadBalancerService} in milliseconds ({@value #DEFAULT_REPORT_DELAY}). -* {@link LoadBalancer} service in milliseconds ({@value #DEFAULT_REPORT_DELAY}). + * The delay between reports of performance counters to the load + * balancer service in milliseconds ({@value #DEFAULT_REPORT_DELAY}). * * @see #DEFAULT_REPORT_DELAY */ @@ -467,12 +466,10 @@ * used. The httpd service may be disabled by specifying <code>-1</code> * as the port. * <p> -BTM * Note: The httpd service for the {@link LoadBalancerService} is -* Note: The httpd service for the {@link LoadBalancer} service is + * Note: The httpd service for the load balancer service is * normally run on a known port in order to make it easy to locate that * service, e.g., port 80, 8000 or 8080, etc. This MUST be overridden for -BTM * the {@link LoadBalancerService} it its configuration since -* the {@link LoadBalancer} service in its configuration since + * the load balancer service in its configuration since * {@link #DEFAULT_HTTPD_PORT} will otherwise cause a random port to be * assigned. */ Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/IBigdataFederation.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/IBigdataFederation.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/IBigdataFederation.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -84,8 +84,7 @@ * * @return The service -or- <code>null</code> if the service has not been discovered. */ -//BTM public ILoadBalancerService getLoadBalancerService(); -public LoadBalancer getLoadBalancerService(); + public LoadBalancer getLoadBalancerService(); /** * Return the metadata service (or a proxy for the metadata service). @@ -103,13 +102,11 @@ /** * The {@link CounterSet} which the client will use report its statistics to -BTM * the {@link ILoadBalancerService}. -* the {@link LoadBalancer} service. + * the load balancer service. * <p> * Note: Applications MAY add their own counters (within a suitable * namespace) to the returned {@link CounterSet} in order to report their -BTM * own performance data to the {@link ILoadBalancerService}. -* own performance data to the {@link LoadBalancer} service. + * own performance data to the load balancer service. * * @see #getServiceCounterSet() * @see #getServiceCounterPathPrefix() @@ -183,8 +180,7 @@ * and which is part of the connected federation. * <p> * Note: This method is here as a failsafe when the -BTM * {@link ILoadBalancerService} is not available. -* {@link LoadBalancer} service is not available. + * load balancer service is not available. * * @return <code>null</code> if there are NO known {@link IDataService}s. */ @@ -251,8 +247,7 @@ * {@link IndexMetadata.Options#INITIAL_DATA_SERVICE} was * specified, then the identified service will be used. Otherwise * an underutilized service will be selected using the -BTM * {@link ILoadBalancerService}. -* {@link LoadBalancer} service. + * load balancer service. * * @return The UUID of the registered index. * Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/IFederationDelegate.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/IFederationDelegate.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/IFederationDelegate.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -61,8 +61,7 @@ /** * Return the class or interface that is the most interesting facet of the * client and which will be used to identify this client in the performance -BTM * counters reported to the {@link ILoadBalancerService}. -* counters reported to the {@link LoadBalancer} service. + * counters reported to the load balancer service. * * @return The class or interface and never <code>null</code>. */ @@ -80,8 +79,7 @@ * Offers the service an opportunity to dynamically detach and re-attach * performance counters. This can be invoked either in response to an http * GET or the periodic reporting of performance counters to the -BTM * {@link ILoadBalancerService}. In general, implementations should limit -* {@link LoadBalancer} service. In general, implementations should limit + * load balancer service. In general, implementations should limit * the frequency of update, e.g., to no more than once a second. */ public void reattachDynamicCounters(); Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/ILoadBalancerService.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/ILoadBalancerService.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/ILoadBalancerService.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -28,179 +28,18 @@ package com.bigdata.service; -import java.io.IOException; -import java.util.UUID; -import java.util.concurrent.TimeoutException; - /** - * Interface for collecting, reporting, and decision-making based on node and - * service utilization statistics. + * <code>Remote</code> interface for collecting, reporting, and + * decision-making based on node and service utilization statistics. + * + * @see LoadBalancer + * @see IService + * @see IEventReceivingService * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> - * @version $Id$ */ -public interface ILoadBalancerService extends IService, IEventReceivingService { +public interface ILoadBalancerService + extends LoadBalancer, IService, IEventReceivingService +{ - /** - * Send performance counters. Clients SHOULD invoke this method no less than - * once every 60 seconds. - * - * @param serviceUUID - * The service {@link UUID} that is self-reporting. - * @param data - * The serialized performance counter data. - * - * @throws IOException - */ - public void notify(UUID serviceUUID, byte[] data) throws IOException; - - /** - * A warning issued by a client when it is in danger of depleting its - * resources. - * - * @param msg - * A message. - * @param serviceUUID - * The service {@link UUID} that is self-reporting. - * - * @throws IOException - */ - public void warn(String msg,UUID serviceUUID) throws IOException; - - /** - * An urgent warning issued the caller is in immediate danger of depleting - * its resources with a consequence of immediate service and/or host - * failure(s). - * - * @param msg - * A message. - * @param serviceUUID - * The service {@link UUID} that is self-reporting. - * - * @throws IOException - */ - public void urgent(String msg,UUID serviceUUID) throws IOException; - - /** - * Return the {@link UUID} of an under-utilized data service. If there is no - * under-utilized service, then return the {@link UUID} of the service with - * the least load. - * - * @throws TimeoutException - * if there are no data services and a timeout occurs while - * awaiting a service join. - * - * @throws InterruptedException - * if the request is interrupted. - */ - public UUID getUnderUtilizedDataService() throws IOException, TimeoutException, InterruptedException; - - /** - * Return up to <i>limit</i> {@link IDataService} {@link UUID}s that are - * currently under-utilized. - * <p> - * When <i>minCount</i> is positive, this method will always return at - * least <i>minCount</i> service {@link UUID}s, however the {@link UUID}s - * returned MAY contain duplicates if the {@link LoadBalancerService} has a - * strong preference for allocating load to some services (or for NOT - * allocating load to other services). Further, the - * {@link LoadBalancerService} MAY choose (or be forced to choose) to return - * {@link UUID}s for services that are within a nominal utilization range, - * or even {@link UUID}s for services that are highly-utilized if it could - * otherwise not satisify the request. - * - * @param minCount - * The minimum #of services {@link UUID}s to return -or- zero - * (0) if there is no minimum limit. - * @param maxCount - * The maximum #of services {@link UUID}s to return -or- zero - * (0) if there is no maximum limit. - * @param exclude - * The optional {@link UUID} of a data service to be excluded - * from the returned set. - * - * @return Up to <i>maxCount</i> under-utilized services -or- - * <code>null</code> IFF no services are recommended at this time - * as needing additional load. - * - * @throws TimeoutException - * if there are no data services, or if there is only a single - * data service and it is excluded by the request, and a timeout - * occurs while awaiting a service join. - * - * @throws InterruptedException - * if the request is interrupted. - * - * @todo generalize to also accept the class or interface of the service so - * that it can be used with services other than data services, e.g., - * metadata services, map/reduce services, {@link IBigdataClient}s, - * etc. - * - * @todo probably should use {@link Integer#MAX_VALUE} rather than ZERO for - * the "no limit" signifier for [maxCount]. - */ - public UUID[] getUnderUtilizedDataServices(int minCount, int maxCount, - UUID exclude) throws IOException, TimeoutException, InterruptedException; - - /** - * Return <code>true</code> if the service is considered to be "highly - * utilized". - * <p> - * Note: This is used mainly to decide when a service should attempt to shed - * index partitions. This implementation SHOULD reflect the relative rank of - * the service among all services as well as its absolute load. - * - * @param serviceUUID - * The service {@link UUID}. - * - * @return <code>true</code> if the service is considered to be "highly - * utilized". - * - * @throws IOException - */ - public boolean isHighlyUtilizedDataService(UUID serviceUUID) throws IOException; - - /** - * Return <code>true</code> if the service is considered to be - * "under-utilized". - * - * @param serviceUUID - * The service {@link UUID}. - * - * @return <code>true</code> if the service is considered to be "under-utilized". - * - * @throws IOException - */ - public boolean isUnderUtilizedDataService(UUID serviceUUID) throws IOException; - - /** - * Logs counters to a temp file. Replacement for sighup mechanism. - */ - public void sighup() throws IOException; - -// /** -// * Return the identifier(s) of under-utilized service(s). -// * -// * @param minCount -// * The minimum #of services {@link UUID}s to return -or- zero -// * (0) if there is no minimum limit. -// * @param maxCount -// * The maximum #of services {@link UUID}s to return -or- zero -// * (0) if there is no maximum limit. -// * @param exclude -// * The optional {@link UUID} of a service to be excluded from the -// * returned set. -// * @param iface -// * A class or interface that the service must implement. -// * -// * @return Up to <i>limit</i> under-utilized services -or- -// * <code>null</code> IFF no services are recommended at this time -// * as needing additional load. -// * -// * @todo Since {@link IMetadataService} extends {@link IDataService} we -// * really need a filter here that can detect the difference. -// */ -// public UUID[] getUnderUtilizedService(int minCount, int maxCount, UUID exclude,Class iface) -// throws IOException; - } Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/IServiceLoadHelper.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/IServiceLoadHelper.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/IServiceLoadHelper.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -23,9 +23,8 @@ * @throws InterruptedException * @throws TimeoutException * -BTM * @see ILoadBalancerService#getUnderUtilizedDataServices(int, int, -* @see LoadBalancer#getUnderUtilizedDataServices(int, int, - * UUID) + * @see getUnderUtilizedDataServices(int, int, UUID) of the load balancer + * service interface */ public UUID[] getUnderUtilizedDataServices(int minCount, int maxCount, UUID exclude) throws InterruptedException, TimeoutException; Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/LoadBalancer.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/LoadBalancer.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/LoadBalancer.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -32,7 +32,7 @@ * Interface for collecting, reporting, and decision-making based on node and * service utilization statistics. */ -public interface LoadBalancer extends Service { +public interface LoadBalancer { /** * This method is called by an entity that wishes to send its @@ -175,4 +175,16 @@ * that calls this method. */ boolean isUnderUtilizedDataService(UUID serviceId) throws IOException; + + + /** + * Special method that instructs the load balancer service to log the + * counters managed by that service to a temporary file. This method + * is intended as replacement for the system based sighup mechanism. + * + * @throws IOException if there is a communication failure between + * this load balancer service and the entity + * that calls this method. + */ + public void sighup() throws IOException; } Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/ServiceScore.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/ServiceScore.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/ServiceScore.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -2,28 +2,17 @@ import java.util.UUID; -//BTM import com.bigdata.service.LoadBalancerService.UpdateTask; - /** -BTM * Per-service metadata and a score for that service which gets updated -BTM * periodically by the {@link UpdateTask}. {@link ServiceScore}s are a -BTM * <em>resource utilization</em> measure. They are higher for a service -BTM * which is more highly utilized. There are several ways to look at the -BTM * score, including the {@link #rawScore}, the {@link #rank}, and the -BTM * {@link #drank normalized double-precision rank}. The ranks move in the -BTM * same direction as the {@link #rawScore}s - a higher rank indicates -BTMBTM * higher utilization. The least utilized service is always rank zero (0). -BTM * The most utilized service is always in the last rank. - * Per-service metadata and a score for that service which gets - * updated periodically by - * <code>com.bigdata.loadbalancer.EmbeddedLoadBalancer.UpdateTask</code>. - * {@link ServiceScore}s are a <em>resource utilization</em> measure. They - * are higher for a service which is more highly utilized. There are - * several ways to look at the score, including the {@link #rawScore}, the - * {@link #rank}, and the {@link #drank normalized double-precision rank}. - * The ranks move in the same direction as the {@link #rawScore}s - a higher - * rank indicates higher utilization. The least utilized service is always - * rank zero (0). The most utilized service is always in the last rank. + * Per-service metadata and a score for that service which gets updated + * periodically by the <code>UpdateTask</code> of the current + * implementation of the load balancer service. {@link ServiceScore}s are a + * <em>resource utilization</em> measure. They are higher for a service + * which is more highly utilized. There are several ways to look at the + * score, including the {@link #rawScore}, the {@link #rank}, and the + * {@link #drank normalized double-precision rank}. The ranks move in the + * same direction as the {@link #rawScore}s - a higher rank indicates + * higher utilization. The least utilized service is always rank zero (0). + * The most utilized service is always in the last rank. * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> * @version $Id$ Modified: branches/dev-btm/bigdata/src/java/com/bigdata/service/ndx/IAsynchronousWriteBufferFactory.java =================================================================== --- branches/dev-btm/bigdata/src/java/com/bigdata/service/ndx/IAsynchronousWriteBufferFactory.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/java/com/bigdata/service/ndx/IAsynchronousWriteBufferFactory.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -41,7 +41,6 @@ import com.bigdata.relation.accesspath.IRunnableBuffer; import com.bigdata.service.AbstractFederation; import com.bigdata.service.IBigdataFederation; -//BTM import com.bigdata.service.ILoadBalancerService; import com.bigdata.service.Split; import com.bigdata.service.ndx.pipeline.IDuplicateRemover; import com.bigdata.service.ndx.pipeline.IndexAsyncWriteStats; @@ -87,8 +86,7 @@ * {@link Future} will not terminate (other than by error) until the buffer * has been {@link IBlockingBuffer#close() closed}. The {@link Future} * evaluates to an {@link IndexAsyncWriteStats} object. Those statistics are -BTM * also reported to the {@link ILoadBalancerService} via the -* also reported to the {@link LoadBalancer} service via the + * also reported to the load balancer service via the * {@link IBigdataFederation}. * <p> * Each buffer returned by this method is independent, and writes onto Modified: branches/dev-btm/bigdata/src/test/com/bigdata/resources/AbstractResourceManagerTestCase.java =================================================================== --- branches/dev-btm/bigdata/src/test/com/bigdata/resources/AbstractResourceManagerTestCase.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/test/com/bigdata/resources/AbstractResourceManagerTestCase.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -69,7 +69,6 @@ import com.bigdata.service.IBigdataClient; import com.bigdata.service.IBigdataFederation; import com.bigdata.service.IDataService; -//BTM import com.bigdata.service.ILoadBalancerService; import com.bigdata.service.IMetadataService; import com.bigdata.service.IService; import com.bigdata.service.Session; @@ -479,8 +478,7 @@ return null; } -//BTM public ILoadBalancerService getLoadBalancerService() { -public LoadBalancer getLoadBalancerService() { + public LoadBalancer getLoadBalancerService() { return null; } Modified: branches/dev-btm/bigdata/src/test/com/bigdata/search/TestAll.java =================================================================== --- branches/dev-btm/bigdata/src/test/com/bigdata/search/TestAll.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/test/com/bigdata/search/TestAll.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -35,6 +35,7 @@ import com.bigdata.journal.AbstractIndexManagerTestCase; import com.bigdata.journal.IIndexManager; import com.bigdata.service.TestEDS; +import com.bigdata.service.TestEDSRemote; import com.bigdata.service.TestJournal; /** @@ -75,6 +76,7 @@ // search backed by EDS. suite.addTest(proxySuite(new TestEDS("EDS Search"),"EDS")); + suite.addTest(proxySuite(new TestEDSRemote("EDS Search Remote"),"EDS Remote")); /* For EDS: * Modified: branches/dev-btm/bigdata/src/test/com/bigdata/service/StressTestConcurrent.java =================================================================== --- branches/dev-btm/bigdata/src/test/com/bigdata/service/StressTestConcurrent.java 2010-08-06 16:03:23 UTC (rev 3425) +++ branches/dev-btm/bigdata/src/test/com/bigdata/service/StressTestConcurrent.java 2010-08-06 16:51:44 UTC (rev 3426) @@ -171,15 +171,15 @@ * Note: Disables the initial round robin policy for the load balancer * service so that it will use our fakes scores. */ -//BTM properties.setProperty( -//BTM LoadBalancerService.Options.INITIAL_ROUND_ROBIN_UPDATE_COUNT, -//BTM "0"); + properties.setProperty( + LoadBalancerService.Options.INITIAL_ROUND_ROBIN_UPDATE_COUNT, + "0"); properties.setProperty(EmbeddedLoadBalancer.Options.INITIAL_ROUND_ROBIN_UPDATE_COUNT, "0"); // load balancer update delay // properties.setProperty(LoadBalancerService.Options.UPDATE_DELAY,"10000"); /... [truncated message content] |