accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1190421 - in /incubator/accumulo/trunk: ./ src/core/src/main/java/org/apache/accumulo/core/client/ src/core/src/main/java/org/apache/accumulo/core/client/admin/ src/core/src/main/java/org/apache/accumulo/core/client/impl/ src/core/src/main...
Date Fri, 28 Oct 2011 16:12:28 GMT
Author: ecn
Date: Fri Oct 28 16:12:28 2011
New Revision: 1190421

URL: http://svn.apache.org/viewvc?rev=1190421&view=rev
Log:
ACCUMULO-94: merge from 1.3 branch

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/Connector.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 16:12:28 2011
@@ -1 +1 @@
-/incubator/accumulo/branches/1.3:1190280
+/incubator/accumulo/branches/1.3:1190280,1190413,1190420

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/Connector.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/Connector.java?rev=1190421&r1=1190420&r2=1190421&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/Connector.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/Connector.java
Fri Oct 28 16:12:28 2011
@@ -140,7 +140,7 @@ public class Connector {
    * 
    * @return MultiTableBatchWriter object for configuring and writing data to
    */
-  public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, int maxLatency,
int maxWriteThreads) {
+  public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency,
int maxWriteThreads) {
     return impl.createMultiTableBatchWriter(maxMemory, maxLatency, maxWriteThreads);
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java?rev=1190421&r1=1190420&r2=1190421&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
Fri Oct 28 16:12:28 2011
@@ -122,13 +122,22 @@ public class InstanceOperations {
   }
   
   /**
-   * List the current tablet servers participating in the accumulo instance
+   * List the currently active tablet servers participating in the accumulo instance
    * 
    * @return
    */
   
   public List<String> getTabletServers() {
-    return ZooCache.getInstance(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()).getChildren(ZooUtil.getRoot(instance)
+ Constants.ZTSERVERS);
+    ZooCache cache = ZooCache.getInstance(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+    String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
+    List<String> results = new ArrayList<String>();
+    for (String candidate : cache.getChildren(path)) {
+      List<String> lockEntries = cache.getChildren(path + "/" + candidate);
+      if (lockEntries != null && lockEntries.size() == 2) {
+        results.add(candidate);
+      }
+    }
+    return results;
   }
   
   /**

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java?rev=1190421&r1=1190420&r2=1190421&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
Fri Oct 28 16:12:28 2011
@@ -112,7 +112,7 @@ public class ConnectorImpl extends Conne
   }
   
   @Override
-  public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, int maxLatency,
int maxWriteThreads) {
+  public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency,
int maxWriteThreads) {
     return new MultiTableBatchWriterImpl(instance, credentials, maxMemory, maxLatency, maxWriteThreads);
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java?rev=1190421&r1=1190420&r2=1190421&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
Fri Oct 28 16:12:28 2011
@@ -69,7 +69,7 @@ public class MultiTableBatchWriterImpl i
   private HashMap<String,BatchWriter> tableWriters;
   private Instance instance;
   
-  public MultiTableBatchWriterImpl(Instance instance, AuthInfo credentials, long maxMemory,
int maxLatency, int maxWriteThreads) {
+  public MultiTableBatchWriterImpl(Instance instance, AuthInfo credentials, long maxMemory,
long maxLatency, int maxWriteThreads) {
     ArgumentChecker.notNull(instance, credentials);
     this.instance = instance;
     this.bw = new TabletServerBatchWriter(instance, credentials, maxMemory, maxLatency, maxWriteThreads);

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java?rev=1190421&r1=1190420&r2=1190421&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
Fri Oct 28 16:12:28 2011
@@ -61,7 +61,7 @@ public class MockConnector extends Conne
   }
   
   @Override
-  public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, int maxLatency,
int maxWriteThreads) {
+  public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency,
int maxWriteThreads) {
     return new MockMultiTableBatchWriter(acu);
   }
   



Mime
View raw message