Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ACCUMULO-578 merge sandbox to trunk

git-svn-id: https://svn.apache.org/repos/asf/accumulo/trunk@1346380 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 2db5ce6186e32c451328154b024951cc5090505f 1 parent 8ac33bb
Eric C. Newton authored
Showing with 3,277 additions and 20,262 deletions.
  1. +2 −4 bin/tdown.sh
  2. +1 −2  bin/tup.sh
  3. +9 −3 core/src/main/java/org/apache/accumulo/core/Constants.java
  4. +2 −1  core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
  5. +2 −14 core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java
  6. +2 −26 core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
  7. +2 −1  core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
  8. +10 −25 core/src/main/java/org/apache/accumulo/core/conf/Property.java
  9. +4 −16 core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
  10. +2 −1  core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
  11. +0 −319 core/src/main/java/org/apache/accumulo/core/master/thrift/LoggerStatus.java
  12. +19 −19 core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
  13. +27 −408 core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
  14. +49 −306 core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java
  15. +129 −128 core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
  16. +9 −9 core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
  17. +0 −408 core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/LogCopyInfo.java
  18. +0 −408 core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/LogFile.java
  19. +0 −224 core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/LoggerClosedException.java
  20. +0 −11,727 core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/MutationLogger.java
  21. +0 −224 core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchLogIDException.java
  22. +1,668 −1,668 core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
  23. +3 −1 core/src/main/java/org/apache/accumulo/core/util/AddressUtil.java
  24. +8 −7 ...rg/apache/accumulo/server → core/src/main/java/org/apache/accumulo/core}/util/NamingThreadFactory.java
  25. +14 −9 ...r/logger/IdentityReducer.java → core/src/main/java/org/apache/accumulo/core/util/SimpleThreadPool.java
  26. +1 −0  core/src/main/java/org/apache/accumulo/core/util/shell/commands/SetIterCommand.java
  27. +3 −13 core/src/main/thrift/master.thrift
  28. +1 −47 core/src/main/thrift/tabletserver.thrift
  29. +0 −1  ...earch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedIngester.java
  30. +1 −1  pom.xml
  31. +5 −5 server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
  32. +80 −82 server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
  33. +3 −2 server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java
  34. +0 −171 server/src/main/java/org/apache/accumulo/server/logger/LogArchiver.java
  35. +22 −17 server/src/main/java/org/apache/accumulo/server/logger/LogReader.java
  36. +0 −417 server/src/main/java/org/apache/accumulo/server/logger/LogService.java
  37. +0 −625 server/src/main/java/org/apache/accumulo/server/logger/LogWriter.java
  38. +0 −144 server/src/main/java/org/apache/accumulo/server/logger/metrics/LogWriterMetrics.java
  39. +0 −72 server/src/main/java/org/apache/accumulo/server/logger/metrics/LogWriterMetricsMBean.java
  40. +0 −328 server/src/main/java/org/apache/accumulo/server/master/CoordinateRecoveryTask.java
  41. +0 −9 server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
  42. +0 −248 server/src/main/java/org/apache/accumulo/server/master/LogSort.java
  43. +45 −107 server/src/main/java/org/apache/accumulo/server/master/Master.java
  44. +0 −106 server/src/main/java/org/apache/accumulo/server/master/TabletServerLoggers.java
  45. +0 −35 server/src/main/java/org/apache/accumulo/server/master/balancer/LoggerBalancer.java
  46. +0 −24 server/src/main/java/org/apache/accumulo/server/master/balancer/LoggerUser.java
  47. +0 −114 server/src/main/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancer.java
  48. +0 −55 server/src/main/java/org/apache/accumulo/server/master/balancer/TServerUsesLoggers.java
  49. +99 −0 server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
  50. +79 −0 server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java
  51. +3 −15 server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
  52. +0 −83 server/src/main/java/org/apache/accumulo/server/master/tserverOps/DisconnectLogger.java
  53. +0 −90 server/src/main/java/org/apache/accumulo/server/master/tserverOps/FlushTablets.java
  54. +3 −3 server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java
  55. +0 −63 server/src/main/java/org/apache/accumulo/server/master/tserverOps/StopLogger.java
  56. +1 −6 server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
  57. +0 −1  server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
  58. +0 −84 server/src/main/java/org/apache/accumulo/server/monitor/servlets/LoggersServlet.java
  59. +23 −24 server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
  60. +0 −2  server/src/main/java/org/apache/accumulo/server/monitor/servlets/OperationServlet.java
  61. +0 −13 server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java
  62. +0 −51 server/src/main/java/org/apache/accumulo/server/monitor/util/celltypes/LoggerLinkType.java
  63. +1 −1  server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
  64. +30 −28 server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
  65. +151 −88 server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
  66. +1 −1  server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
  67. +378 −0 server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
  68. +320 −0 server/src/main/java/org/apache/accumulo/server/tabletserver/log/LogSorter.java
  69. +0 −40 server/src/main/java/org/apache/accumulo/server/tabletserver/log/LoggerStrategy.java
  70. +0 −47 server/src/main/java/org/apache/accumulo/server/tabletserver/log/RandomLoggerStrategy.java
  71. +0 −293 server/src/main/java/org/apache/accumulo/server/tabletserver/log/RemoteLogger.java
  72. +0 −74 server/src/main/java/org/apache/accumulo/server/tabletserver/log/RoundRobinLoggerStrategy.java
  73. +25 −51 server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java
  74. +6 −13 server/src/main/java/org/apache/accumulo/server/test/GetMasterStats.java
  75. +1 −2  server/src/main/java/org/apache/accumulo/server/test/functional/RunTests.java
  76. +10 −4 server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java
  77. +3 −16 server/src/main/java/org/apache/accumulo/server/test/randomwalk/bulk/Setup.java
  78. +5 −0 server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
  79. +1 −1  server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java
  80. +0 −1  server/src/main/java/org/apache/accumulo/server/util/Initialize.java
  81. +1 −7 server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
  82. +5 −22 server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
  83. +6 −14 server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
  84. +0 −246 server/src/test/java/org/apache/accumulo/server/logger/TestLogWriter.java
  85. +0 −89 server/src/test/java/org/apache/accumulo/server/master/TestTabletServerLoggers.java
  86. +0 −185 server/src/test/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancerTest.java
  87. +0 −2  start/src/main/java/org/apache/accumulo/start/Main.java
  88. +2 −21 test/system/continuous/agitator.pl
View
6 bin/tdown.sh
@@ -29,7 +29,6 @@ echo 'stopping unresponsive tablet servers (if any) ...'
for server in `cat $SLAVES | grep -v '^#' `; do
# only start if there's not one already running
$ACCUMULO_HOME/bin/stop-server.sh $server "$ACCUMULO_HOME/.*/accumulo-start.*.jar" tserver TERM &
- $ACCUMULO_HOME/bin/stop-server.sh $server "$ACCUMULO_HOME/.*/accumulo-start.*.jar" logger TERM &
done
sleep 10
@@ -38,8 +37,7 @@ echo 'stopping unresponsive tablet servers hard (if any) ...'
for server in `cat $SLAVES | grep -v '^#' `; do
# only start if there's not one already running
$ACCUMULO_HOME/bin/stop-server.sh $server "$ACCUMULO_HOME/.*/accumulo-start.*.jar" tserver KILL &
- $ACCUMULO_HOME/bin/stop-server.sh $server "$ACCUMULO_HOME/.*/accumulo-start.*.jar" logger KILL &
done
-echo 'Cleaning tablet server and logger entries from zookeeper'
-$ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.util.ZooZap -tservers -loggers
+echo 'Cleaning tablet server entries from zookeeper'
+$ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.util.ZooZap -tservers
View
3  bin/tup.sh
@@ -23,13 +23,12 @@ bin=`cd "$bin"; pwd`
SLAVES=$ACCUMULO_HOME/conf/slaves
-echo -n "Starting tablet servers and loggers ..."
+echo -n "Starting tablet servers ..."
count=1
for server in `grep -v '^#' "$SLAVES"`
do
echo -n "."
- ${bin}/start-server.sh $server logger &
${bin}/start-server.sh $server tserver "tablet server" &
count=`expr $count + 1`
if [ `expr $count % 72` -eq 0 ] ;
View
12 core/src/main/java/org/apache/accumulo/core/Constants.java
@@ -62,9 +62,6 @@
public static final String ZDEAD = "/dead";
public static final String ZDEADTSERVERS = "/dead/tservers";
- public static final String ZDEADLOGGERS = "/dead/loggers";
-
- public static final String ZLOGGERS = "/loggers";
public static final String ZTRACERS = "/tracers";
@@ -78,6 +75,7 @@
public static final String ZNEXT_FILE = "/next_file";
public static final String ZHDFS_RESERVATIONS = "/hdfs_reservations";
+ public static final String ZRECOVERY = "/recovery";
public static final String METADATA_TABLE_ID = "!0";
public static final String METADATA_TABLE_NAME = "!METADATA";
@@ -184,4 +182,12 @@ public static String getRootTabletDir(AccumuloConfiguration conf) {
return getMetadataTableDir(conf) + ZROOT_TABLET;
}
+ /**
+ * @param conf
+ * @return
+ */
+ public static String getWalDirectory(AccumuloConfiguration conf) {
+ return getBaseDir(conf) + "/wal";
+ }
+
}
View
3  core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -77,6 +77,7 @@
import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.accumulo.core.util.LocalityGroupUtil;
import org.apache.accumulo.core.util.MetadataTable;
+import org.apache.accumulo.core.util.NamingThreadFactory;
import org.apache.accumulo.core.util.OpTimer;
import org.apache.accumulo.core.util.StringUtil;
import org.apache.accumulo.core.util.TextUtil;
@@ -386,7 +387,7 @@ public void addSplits(String tableName, SortedSet<Text> partitionKeys) throws Ta
CountDownLatch latch = new CountDownLatch(splits.size());
AtomicReference<Exception> exception = new AtomicReference<Exception>(null);
- ExecutorService executor = Executors.newFixedThreadPool(16);
+ ExecutorService executor = Executors.newFixedThreadPool(16, new NamingThreadFactory("addSplits"));
try {
executor.submit(new SplitTask(new SplitEnv(tableName, tableId, executor, latch, exception), splits));
View
16 core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java
@@ -23,10 +23,8 @@
import java.util.NoSuchElementException;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
@@ -42,6 +40,7 @@
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.thrift.AuthInfo;
+import org.apache.accumulo.core.util.NamingThreadFactory;
import org.apache.hadoop.io.Text;
import org.apache.log4j.Logger;
@@ -70,19 +69,8 @@
private static final List<KeyValue> EMPTY_LIST = Collections.emptyList();
- private static AtomicInteger threadCounter = new AtomicInteger(1);
-
private static ThreadPoolExecutor readaheadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 3l, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
- new ThreadFactory() {
-
- @Override
- public Thread newThread(Runnable r) {
- Thread t = new Thread(r);
- t.setDaemon(true);
- t.setName("Accumulo scanner read ahead thread " + threadCounter.getAndIncrement());
- return t;
- }
- });
+ new NamingThreadFactory("Accumulo scanner read ahead thread"));
private class Reader implements Runnable {
View
28 core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
@@ -21,11 +21,6 @@
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.BatchScanner;
@@ -36,6 +31,7 @@
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.thrift.AuthInfo;
import org.apache.accumulo.core.util.ArgumentChecker;
+import org.apache.accumulo.core.util.SimpleThreadPool;
import org.apache.log4j.Logger;
public class TabletServerBatchReader extends ScannerOptions implements BatchScanner {
@@ -59,25 +55,6 @@ private static synchronized int getNextBatchReaderInstance() {
private final int batchReaderInstance = getNextBatchReaderInstance();
- private static class BatchReaderThreadFactory implements ThreadFactory {
-
- private ThreadFactory dtf = Executors.defaultThreadFactory();
- private int threadNum = 1;
- private final int batchReaderInstance;
-
- BatchReaderThreadFactory(int batchReaderInstance) {
- this.batchReaderInstance = batchReaderInstance;
- }
-
- public Thread newThread(Runnable r) {
- Thread thread = dtf.newThread(r);
- thread.setName("batch scanner " + batchReaderInstance + "-" + threadNum++);
- thread.setDaemon(true);
- return thread;
- }
-
- }
-
public TabletServerBatchReader(Instance instance, AuthInfo credentials, String table, Authorizations authorizations, int numQueryThreads) {
ArgumentChecker.notNull(instance, credentials, table, authorizations);
this.instance = instance;
@@ -86,8 +63,7 @@ public TabletServerBatchReader(Instance instance, AuthInfo credentials, String t
this.table = table;
this.numThreads = numQueryThreads;
- queryThreadPool = new ThreadPoolExecutor(numQueryThreads, numQueryThreads, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),
- new BatchReaderThreadFactory(batchReaderInstance));
+ queryThreadPool = new SimpleThreadPool(numQueryThreads, "batch scanner " + batchReaderInstance + "-");
ranges = null;
}
View
3  core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
@@ -60,6 +60,7 @@
import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
+import org.apache.accumulo.core.util.NamingThreadFactory;
import org.apache.accumulo.core.util.ThriftUtil;
import org.apache.hadoop.io.Text;
import org.apache.log4j.Logger;
@@ -545,7 +546,7 @@ public void run() {
public MutationWriter(int numSendThreads) {
serversMutations = new HashMap<String,TabletServerMutations>();
queued = new HashSet<String>();
- sendThreadPool = Executors.newFixedThreadPool(numSendThreads);
+ sendThreadPool = Executors.newFixedThreadPool(numSendThreads, new NamingThreadFactory(this.getClass().getName()));
}
private void binMutations(MutationSet mutationsToProcess, Map<String,TabletServerMutations> binnedMutations) {
View
35 core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -58,14 +58,14 @@
MASTER_CLIENTPORT("master.port.client", "9999", PropertyType.PORT, "The port used for handling client connections on the master"),
MASTER_TABLET_BALANCER("master.tablet.balancer", "org.apache.accumulo.server.master.balancer.TableLoadBalancer", PropertyType.CLASSNAME,
"The balancer class that accumulo will use to make tablet assignment and migration decisions."),
- MASTER_LOGGER_BALANCER("master.logger.balancer", "org.apache.accumulo.server.master.balancer.SimpleLoggerBalancer", PropertyType.CLASSNAME,
- "The balancer class that accumulo will use to make logger assignment decisions."),
MASTER_RECOVERY_MAXAGE("master.recovery.max.age", "60m", PropertyType.TIMEDURATION, "Recovery files older than this age will be removed."),
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_THREADCHECK("master.server.threadcheck.time", "1s", PropertyType.TIMEDURATION, "The time between adjustments of the server thread pool."),
+ MASTER_RECOVERY_DELAY("master.recovery.delay", "10s", PropertyType.TIMEDURATION,
+ "When a tablet server's lock is deleted, it takes time for it to completely quit. This delay gives it time before log recoveries begin."),
// properties that are specific to tablet server behavior
TSERV_PREFIX("tserver.", null, PropertyType.PREFIX, "Properties in this category affect the behavior of the tablet servers"),
@@ -115,10 +115,6 @@
TSERV_BLOOM_LOAD_MAXCONCURRENT("tserver.bloom.load.concurrent.max", "4", PropertyType.COUNT,
"The number of concurrent threads that will load bloom filters in the background. "
+ "Setting this to zero will make bloom filters load in the foreground."),
- TSERV_LOGGER_TIMEOUT("tserver.logger.timeout", "30s", PropertyType.TIMEDURATION, "The time to wait for a logger to respond to a write-ahead request"),
- TSERV_LOGGER_COUNT("tserver.logger.count", "2", PropertyType.COUNT, "The number of loggers that each tablet server should use."),
- TSERV_LOGGER_STRATEGY("tserver.logger.strategy", "org.apache.accumulo.server.tabletserver.log.RoundRobinLoggerStrategy", PropertyType.STRING,
- "The classname used to decide which loggers to use."),
TSERV_MONITOR_FS(
"tserver.monitor.fs",
"true",
@@ -148,29 +144,18 @@
TSERV_HOLD_TIME_SUICIDE("tserver.hold.time.max", "5m", PropertyType.TIMEDURATION,
"The maximum time for a tablet server to be in the \"memory full\" state. If the tablet server cannot write out memory"
+ " in this much time, it will assume there is some failure local to its node, and quit. A value of zero is equivalent to forever."),
+ TSERV_WAL_BLOCKSIZE("tserver.wal.blocksize", "0", PropertyType.MEMORY,
+ "The size of the HDFS blocks used to write to the Write-Ahead log. If zero, it will be 110% of tserver.walog.max.size (that is, try to use just one block)"),
+ TSERV_WAL_REPLICATION("tserver.wal.replication", "0", PropertyType.COUNT,
+ "The replication to use when writing the Write-Ahead log to HDFS. If zero, it will use the HDFS default replication setting."),
+ TSERV_RECOVERY_MAX_CONCURRENT("tserver.recovery.concurrent.max", "2", PropertyType.COUNT, "The maximum number of threads to use to sort logs during recovery"),
+ TSERV_SORT_BUFFER_SIZE("tserver.sort.buffer.size", "200M", PropertyType.MEMORY, "The amount of memory to use when sorting logs during recovery."),
+ TSERV_ARCHIVE_WALOGS("tserver.archive.walogs", "false", PropertyType.BOOLEAN, "Keep copies of the WALOGs for debugging purposes"),
// properties that are specific to logger server behavior
LOGGER_PREFIX("logger.", null, PropertyType.PREFIX, "Properties in this category affect the behavior of the write-ahead logger servers"),
- LOGGER_PORT("logger.port.client", "11224", PropertyType.PORT, "The port used for write-ahead logger services"),
- LOGGER_COPY_THREADPOOL_SIZE("logger.copy.threadpool.size", "2", PropertyType.COUNT,
- "size of the thread pool used to copy files from the local log area to HDFS"),
LOGGER_DIR("logger.dir.walog", "walogs", PropertyType.PATH,
"The directory used to store write-ahead logs on the local filesystem. It is possible to specify a comma-separated list of directories."),
- LOGGER_PORTSEARCH("logger.port.search", "false", PropertyType.BOOLEAN, "if the port above is in use, search higher ports until one is available"),
- LOGGER_ARCHIVE("logger.archive", "false", PropertyType.BOOLEAN, "determines if logs are archived in hdfs"),
- LOGGER_ARCHIVE_REPLICATION("logger.archive.replication", "0", PropertyType.COUNT,
- "determines the replication factor for walogs archived in hdfs, set to zero to use default"),
- LOGGER_MONITOR_FS(
- "logger.monitor.fs",
- "true",
- PropertyType.BOOLEAN,
- "When enabled the logger will monitor file systems and kill itself when one switches from rw to ro. This is usually and indication that Linux has detected a bad disk."),
- LOGGER_SORT_BUFFER_SIZE("logger.sort.buffer.size", "200M", PropertyType.MEMORY,
- "The amount of memory to use when sorting logs during recovery. Only used when *not* sorting logs with map/reduce."),
- LOGGER_RECOVERY_FILE_REPLICATION("logger.recovery.file.replication", "2", PropertyType.COUNT,
- "When a logger puts a WALOG into HDFS, it will use this as the replication factor."),
- LOGGER_MINTHREADS("logger.server.threads.minimum", "2", PropertyType.COUNT, "The miniumum number of threads to use to handle incoming requests."),
- LOGGER_THREADCHECK("logger.server.threadcheck.time", "1s", PropertyType.TIMEDURATION, "The time between adjustments of the server thread pool."),
// accumulo garbage collector properties
GC_PREFIX("gc.", null, PropertyType.PREFIX, "Properties in this category affect the behavior of the accumulo garbage collector."),
@@ -347,7 +332,7 @@ public static boolean isValidTablePropertyKey(String key) {
}
private static final EnumSet<Property> fixedProperties = EnumSet.of(Property.TSERV_CLIENTPORT, Property.TSERV_NATIVEMAP_ENABLED,
- Property.TSERV_SCAN_MAX_OPENFILES, Property.TSERV_LOGGER_COUNT, Property.LOGGER_PORT, Property.MASTER_CLIENTPORT, Property.GC_PORT);
+ Property.TSERV_SCAN_MAX_OPENFILES, Property.MASTER_CLIENTPORT, Property.GC_PORT);
public static boolean isFixedZooPropertyKey(Property key) {
return fixedProperties.contains(key);
View
20 core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
@@ -29,10 +29,9 @@
import java.util.Map;
import java.util.Random;
import java.util.Set;
+import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -51,6 +50,7 @@
import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.accumulo.core.util.LoggingRunnable;
+import org.apache.accumulo.core.util.NamingThreadFactory;
import org.apache.accumulo.start.classloader.AccumuloClassLoader;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
@@ -68,19 +68,6 @@
public static final String BLOOM_FILE_NAME = "acu_bloom";
public static final int HASH_COUNT = 5;
- private static class BloomLoaderThreadFactory implements ThreadFactory {
-
- private ThreadFactory dtf = Executors.defaultThreadFactory();
- private int threadNum = 1;
-
- public Thread newThread(Runnable r) {
- Thread thread = dtf.newThread(r);
- thread.setName("bloom-loader-" + threadNum++);
- thread.setDaemon(true);
- return thread;
- }
- }
-
private static ExecutorService loadThreadPool = null;
private static synchronized ExecutorService getLoadThreadPool(int maxLoadThreads) {
@@ -89,7 +76,8 @@ private static synchronized ExecutorService getLoadThreadPool(int maxLoadThreads
}
if (maxLoadThreads > 0) {
- loadThreadPool = new ThreadPoolExecutor(0, maxLoadThreads, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new BloomLoaderThreadFactory());
+ BlockingQueue<Runnable> q = new LinkedBlockingQueue<Runnable>();
+ loadThreadPool = new ThreadPoolExecutor(0, maxLoadThreads, 60, TimeUnit.SECONDS, q, new NamingThreadFactory("bloom-loader"));
}
return loadThreadPool;
View
3  core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
@@ -28,6 +28,7 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.ReentrantLock;
+import org.apache.accumulo.core.util.NamingThreadFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -96,7 +97,7 @@
private final EvictionThread evictionThread;
/** Statistics thread schedule pool (for heavy debugging, could remove) */
- private final ScheduledExecutorService scheduleThreadPool = Executors.newScheduledThreadPool(1);
+ private final ScheduledExecutorService scheduleThreadPool = Executors.newScheduledThreadPool(1, new NamingThreadFactory("LRUBlockCacheStats"));
/** Current size of cache */
private final AtomicLong size;
View
319 core/src/main/java/org/apache/accumulo/core/master/thrift/LoggerStatus.java
@@ -1,319 +0,0 @@
-/**
- * Autogenerated by Thrift
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
-package org.apache.accumulo.core.master.thrift;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class LoggerStatus implements org.apache.thrift.TBase<LoggerStatus, LoggerStatus._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LoggerStatus");
-
- private static final org.apache.thrift.protocol.TField LOGGER_FIELD_DESC = new org.apache.thrift.protocol.TField("logger", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- public String logger;
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- LOGGER((short)1, "logger");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // LOGGER
- return LOGGER;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
-
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.LOGGER, new org.apache.thrift.meta_data.FieldMetaData("logger", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LoggerStatus.class, metaDataMap);
- }
-
- public LoggerStatus() {
- }
-
- public LoggerStatus(
- String logger)
- {
- this();
- this.logger = logger;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public LoggerStatus(LoggerStatus other) {
- if (other.isSetLogger()) {
- this.logger = other.logger;
- }
- }
-
- public LoggerStatus deepCopy() {
- return new LoggerStatus(this);
- }
-
- @Override
- public void clear() {
- this.logger = null;
- }
-
- public String getLogger() {
- return this.logger;
- }
-
- public LoggerStatus setLogger(String logger) {
- this.logger = logger;
- return this;
- }
-
- public void unsetLogger() {
- this.logger = null;
- }
-
- /** Returns true if field logger is set (has been assigned a value) and false otherwise */
- public boolean isSetLogger() {
- return this.logger != null;
- }
-
- public void setLoggerIsSet(boolean value) {
- if (!value) {
- this.logger = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case LOGGER:
- if (value == null) {
- unsetLogger();
- } else {
- setLogger((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case LOGGER:
- return getLogger();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case LOGGER:
- return isSetLogger();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof LoggerStatus)
- return this.equals((LoggerStatus)that);
- return false;
- }
-
- public boolean equals(LoggerStatus that) {
- if (that == null)
- return false;
-
- boolean this_present_logger = true && this.isSetLogger();
- boolean that_present_logger = true && that.isSetLogger();
- if (this_present_logger || that_present_logger) {
- if (!(this_present_logger && that_present_logger))
- return false;
- if (!this.logger.equals(that.logger))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- public int compareTo(LoggerStatus other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- LoggerStatus typedOther = (LoggerStatus)other;
-
- lastComparison = Boolean.valueOf(isSetLogger()).compareTo(typedOther.isSetLogger());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLogger()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logger, typedOther.logger);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // LOGGER
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.logger = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.logger != null) {
- oprot.writeFieldBegin(LOGGER_FIELD_DESC);
- oprot.writeString(this.logger);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LoggerStatus(");
- boolean first = true;
-
- sb.append("logger:");
- if (this.logger == null) {
- sb.append("null");
- } else {
- sb.append(this.logger);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
-}
-
View
38 core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
@@ -13819,13 +13819,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
case 4: // ARGUMENTS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list47 = iprot.readListBegin();
- this.arguments = new ArrayList<ByteBuffer>(_list47.size);
- for (int _i48 = 0; _i48 < _list47.size; ++_i48)
+ org.apache.thrift.protocol.TList _list35 = iprot.readListBegin();
+ this.arguments = new ArrayList<ByteBuffer>(_list35.size);
+ for (int _i36 = 0; _i36 < _list35.size; ++_i36)
{
- ByteBuffer _elem49;
- _elem49 = iprot.readBinary();
- this.arguments.add(_elem49);
+ ByteBuffer _elem37;
+ _elem37 = iprot.readBinary();
+ this.arguments.add(_elem37);
}
iprot.readListEnd();
}
@@ -13836,15 +13836,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
case 5: // OPTIONS
if (field.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map50 = iprot.readMapBegin();
- this.options = new HashMap<String,String>(2*_map50.size);
- for (int _i51 = 0; _i51 < _map50.size; ++_i51)
+ org.apache.thrift.protocol.TMap _map38 = iprot.readMapBegin();
+ this.options = new HashMap<String,String>(2*_map38.size);
+ for (int _i39 = 0; _i39 < _map38.size; ++_i39)
{
- String _key52;
- String _val53;
- _key52 = iprot.readString();
- _val53 = iprot.readString();
- this.options.put(_key52, _val53);
+ String _key40;
+ String _val41;
+ _key40 = iprot.readString();
+ _val41 = iprot.readString();
+ this.options.put(_key40, _val41);
}
iprot.readMapEnd();
}
@@ -13892,9 +13892,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.arguments.size()));
- for (ByteBuffer _iter54 : this.arguments)
+ for (ByteBuffer _iter42 : this.arguments)
{
- oprot.writeBinary(_iter54);
+ oprot.writeBinary(_iter42);
}
oprot.writeListEnd();
}
@@ -13904,10 +13904,10 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.options.size()));
- for (Map.Entry<String, String> _iter55 : this.options.entrySet())
+ for (Map.Entry<String, String> _iter43 : this.options.entrySet())
{
- oprot.writeString(_iter55.getKey());
- oprot.writeString(_iter55.getValue());
+ oprot.writeString(_iter43.getKey());
+ oprot.writeString(_iter43.getValue());
}
oprot.writeMapEnd();
}
View
435 core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
@@ -26,20 +26,15 @@
private static final org.apache.thrift.protocol.TField TABLE_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("tableMap", org.apache.thrift.protocol.TType.MAP, (short)1);
private static final org.apache.thrift.protocol.TField T_SERVER_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tServerInfo", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField BAD_TSERVERS_FIELD_DESC = new org.apache.thrift.protocol.TField("badTServers", org.apache.thrift.protocol.TType.MAP, (short)3);
- private static final org.apache.thrift.protocol.TField RECOVERY_FIELD_DESC = new org.apache.thrift.protocol.TField("recovery", org.apache.thrift.protocol.TType.LIST, (short)4);
- private static final org.apache.thrift.protocol.TField LOGGERS_FIELD_DESC = new org.apache.thrift.protocol.TField("loggers", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField GOAL_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("goalState", org.apache.thrift.protocol.TType.I32, (short)8);
private static final org.apache.thrift.protocol.TField UNASSIGNED_TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("unassignedTablets", org.apache.thrift.protocol.TType.I32, (short)7);
private static final org.apache.thrift.protocol.TField SERVERS_SHUTTING_DOWN_FIELD_DESC = new org.apache.thrift.protocol.TField("serversShuttingDown", org.apache.thrift.protocol.TType.SET, (short)9);
private static final org.apache.thrift.protocol.TField DEAD_TABLET_SERVERS_FIELD_DESC = new org.apache.thrift.protocol.TField("deadTabletServers", org.apache.thrift.protocol.TType.LIST, (short)10);
- private static final org.apache.thrift.protocol.TField DEAD_LOGGERS_FIELD_DESC = new org.apache.thrift.protocol.TField("deadLoggers", org.apache.thrift.protocol.TType.LIST, (short)11);
public Map<String,TableInfo> tableMap;
public List<TabletServerStatus> tServerInfo;
public Map<String,Byte> badTServers;
- public List<RecoveryStatus> recovery;
- public List<LoggerStatus> loggers;
/**
*
* @see MasterState
@@ -53,15 +48,12 @@
public int unassignedTablets;
public Set<String> serversShuttingDown;
public List<DeadServer> deadTabletServers;
- public List<DeadServer> deadLoggers;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TABLE_MAP((short)1, "tableMap"),
T_SERVER_INFO((short)2, "tServerInfo"),
BAD_TSERVERS((short)3, "badTServers"),
- RECOVERY((short)4, "recovery"),
- LOGGERS((short)5, "loggers"),
/**
*
* @see MasterState
@@ -74,8 +66,7 @@
GOAL_STATE((short)8, "goalState"),
UNASSIGNED_TABLETS((short)7, "unassignedTablets"),
SERVERS_SHUTTING_DOWN((short)9, "serversShuttingDown"),
- DEAD_TABLET_SERVERS((short)10, "deadTabletServers"),
- DEAD_LOGGERS((short)11, "deadLoggers");
+ DEAD_TABLET_SERVERS((short)10, "deadTabletServers");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -96,10 +87,6 @@ public static _Fields findByThriftId(int fieldId) {
return T_SERVER_INFO;
case 3: // BAD_TSERVERS
return BAD_TSERVERS;
- case 4: // RECOVERY
- return RECOVERY;
- case 5: // LOGGERS
- return LOGGERS;
case 6: // STATE
return STATE;
case 8: // GOAL_STATE
@@ -110,8 +97,6 @@ public static _Fields findByThriftId(int fieldId) {
return SERVERS_SHUTTING_DOWN;
case 10: // DEAD_TABLET_SERVERS
return DEAD_TABLET_SERVERS;
- case 11: // DEAD_LOGGERS
- return DEAD_LOGGERS;
default:
return null;
}
@@ -169,12 +154,6 @@ public String getFieldName() {
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))));
- tmpMap.put(_Fields.RECOVERY, new org.apache.thrift.meta_data.FieldMetaData("recovery", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RecoveryStatus.class))));
- tmpMap.put(_Fields.LOGGERS, new org.apache.thrift.meta_data.FieldMetaData("loggers", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LoggerStatus.class))));
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MasterState.class)));
tmpMap.put(_Fields.GOAL_STATE, new org.apache.thrift.meta_data.FieldMetaData("goalState", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -187,9 +166,6 @@ public String getFieldName() {
tmpMap.put(_Fields.DEAD_TABLET_SERVERS, new org.apache.thrift.meta_data.FieldMetaData("deadTabletServers", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeadServer.class))));
- tmpMap.put(_Fields.DEAD_LOGGERS, new org.apache.thrift.meta_data.FieldMetaData("deadLoggers", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeadServer.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterMonitorInfo.class, metaDataMap);
}
@@ -201,28 +177,22 @@ public MasterMonitorInfo(
Map<String,TableInfo> tableMap,
List<TabletServerStatus> tServerInfo,
Map<String,Byte> badTServers,
- List<RecoveryStatus> recovery,
- List<LoggerStatus> loggers,
MasterState state,
MasterGoalState goalState,
int unassignedTablets,
Set<String> serversShuttingDown,
- List<DeadServer> deadTabletServers,
- List<DeadServer> deadLoggers)
+ List<DeadServer> deadTabletServers)
{
this();
this.tableMap = tableMap;
this.tServerInfo = tServerInfo;
this.badTServers = badTServers;
- this.recovery = recovery;
- this.loggers = loggers;
this.state = state;
this.goalState = goalState;
this.unassignedTablets = unassignedTablets;
setUnassignedTabletsIsSet(true);
this.serversShuttingDown = serversShuttingDown;
this.deadTabletServers = deadTabletServers;
- this.deadLoggers = deadLoggers;
}
/**
@@ -268,20 +238,6 @@ public MasterMonitorInfo(MasterMonitorInfo other) {
}
this.badTServers = __this__badTServers;
}
- if (other.isSetRecovery()) {
- List<RecoveryStatus> __this__recovery = new ArrayList<RecoveryStatus>();
- for (RecoveryStatus other_element : other.recovery) {
- __this__recovery.add(new RecoveryStatus(other_element));
- }
- this.recovery = __this__recovery;
- }
- if (other.isSetLoggers()) {
- List<LoggerStatus> __this__loggers = new ArrayList<LoggerStatus>();
- for (LoggerStatus other_element : other.loggers) {
- __this__loggers.add(new LoggerStatus(other_element));
- }
- this.loggers = __this__loggers;
- }
if (other.isSetState()) {
this.state = other.state;
}
@@ -303,13 +259,6 @@ public MasterMonitorInfo(MasterMonitorInfo other) {
}
this.deadTabletServers = __this__deadTabletServers;
}
- if (other.isSetDeadLoggers()) {
- List<DeadServer> __this__deadLoggers = new ArrayList<DeadServer>();
- for (DeadServer other_element : other.deadLoggers) {
- __this__deadLoggers.add(new DeadServer(other_element));
- }
- this.deadLoggers = __this__deadLoggers;
- }
}
public MasterMonitorInfo deepCopy() {
@@ -321,15 +270,12 @@ public void clear() {
this.tableMap = null;
this.tServerInfo = null;
this.badTServers = null;
- this.recovery = null;
- this.loggers = null;
this.state = null;
this.goalState = null;
setUnassignedTabletsIsSet(false);
this.unassignedTablets = 0;
this.serversShuttingDown = null;
this.deadTabletServers = null;
- this.deadLoggers = null;
}
public int getTableMapSize() {
@@ -441,84 +387,6 @@ public void setBadTServersIsSet(boolean value) {
}
}
- public int getRecoverySize() {
- return (this.recovery == null) ? 0 : this.recovery.size();
- }
-
- public java.util.Iterator<RecoveryStatus> getRecoveryIterator() {
- return (this.recovery == null) ? null : this.recovery.iterator();
- }
-
- public void addToRecovery(RecoveryStatus elem) {
- if (this.recovery == null) {
- this.recovery = new ArrayList<RecoveryStatus>();
- }
- this.recovery.add(elem);
- }
-
- public List<RecoveryStatus> getRecovery() {
- return this.recovery;
- }
-
- public MasterMonitorInfo setRecovery(List<RecoveryStatus> recovery) {
- this.recovery = recovery;
- return this;
- }
-
- public void unsetRecovery() {
- this.recovery = null;
- }
-
- /** Returns true if field recovery is set (has been assigned a value) and false otherwise */
- public boolean isSetRecovery() {
- return this.recovery != null;
- }
-
- public void setRecoveryIsSet(boolean value) {
- if (!value) {
- this.recovery = null;
- }
- }
-
- public int getLoggersSize() {
- return (this.loggers == null) ? 0 : this.loggers.size();
- }
-
- public java.util.Iterator<LoggerStatus> getLoggersIterator() {
- return (this.loggers == null) ? null : this.loggers.iterator();
- }
-
- public void addToLoggers(LoggerStatus elem) {
- if (this.loggers == null) {
- this.loggers = new ArrayList<LoggerStatus>();
- }
- this.loggers.add(elem);
- }
-
- public List<LoggerStatus> getLoggers() {
- return this.loggers;
- }
-
- public MasterMonitorInfo setLoggers(List<LoggerStatus> loggers) {
- this.loggers = loggers;
- return this;
- }
-
- public void unsetLoggers() {
- this.loggers = null;
- }
-
- /** Returns true if field loggers is set (has been assigned a value) and false otherwise */
- public boolean isSetLoggers() {
- return this.loggers != null;
- }
-
- public void setLoggersIsSet(boolean value) {
- if (!value) {
- this.loggers = null;
- }
- }
-
/**
*
* @see MasterState
@@ -684,45 +552,6 @@ public void setDeadTabletServersIsSet(boolean value) {
}
}
- public int getDeadLoggersSize() {
- return (this.deadLoggers == null) ? 0 : this.deadLoggers.size();
- }
-
- public java.util.Iterator<DeadServer> getDeadLoggersIterator() {
- return (this.deadLoggers == null) ? null : this.deadLoggers.iterator();
- }
-
- public void addToDeadLoggers(DeadServer elem) {
- if (this.deadLoggers == null) {
- this.deadLoggers = new ArrayList<DeadServer>();
- }
- this.deadLoggers.add(elem);
- }
-
- public List<DeadServer> getDeadLoggers() {
- return this.deadLoggers;
- }
-
- public MasterMonitorInfo setDeadLoggers(List<DeadServer> deadLoggers) {
- this.deadLoggers = deadLoggers;
- return this;
- }
-
- public void unsetDeadLoggers() {
- this.deadLoggers = null;
- }
-
- /** Returns true if field deadLoggers is set (has been assigned a value) and false otherwise */
- public boolean isSetDeadLoggers() {
- return this.deadLoggers != null;
- }
-
- public void setDeadLoggersIsSet(boolean value) {
- if (!value) {
- this.deadLoggers = null;
- }
- }
-
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_MAP:
@@ -749,22 +578,6 @@ public void setFieldValue(_Fields field, Object value) {
}
break;
- case RECOVERY:
- if (value == null) {
- unsetRecovery();
- } else {
- setRecovery((List<RecoveryStatus>)value);
- }
- break;
-
- case LOGGERS:
- if (value == null) {
- unsetLoggers();
- } else {
- setLoggers((List<LoggerStatus>)value);
- }
- break;
-
case STATE:
if (value == null) {
unsetState();
@@ -805,14 +618,6 @@ public void setFieldValue(_Fields field, Object value) {
}
break;
- case DEAD_LOGGERS:
- if (value == null) {
- unsetDeadLoggers();
- } else {
- setDeadLoggers((List<DeadServer>)value);
- }
- break;
-
}
}
@@ -827,12 +632,6 @@ public Object getFieldValue(_Fields field) {
case BAD_TSERVERS:
return getBadTServers();
- case RECOVERY:
- return getRecovery();
-
- case LOGGERS:
- return getLoggers();
-
case STATE:
return getState();
@@ -848,9 +647,6 @@ public Object getFieldValue(_Fields field) {
case DEAD_TABLET_SERVERS:
return getDeadTabletServers();
- case DEAD_LOGGERS:
- return getDeadLoggers();
-
}
throw new IllegalStateException();
}
@@ -868,10 +664,6 @@ public boolean isSet(_Fields field) {
return isSetTServerInfo();
case BAD_TSERVERS:
return isSetBadTServers();
- case RECOVERY:
- return isSetRecovery();
- case LOGGERS:
- return isSetLoggers();
case STATE:
return isSetState();
case GOAL_STATE:
@@ -882,8 +674,6 @@ public boolean isSet(_Fields field) {
return isSetServersShuttingDown();
case DEAD_TABLET_SERVERS:
return isSetDeadTabletServers();
- case DEAD_LOGGERS:
- return isSetDeadLoggers();
}
throw new IllegalStateException();
}
@@ -928,24 +718,6 @@ public boolean equals(MasterMonitorInfo that) {
return false;
}
- boolean this_present_recovery = true && this.isSetRecovery();
- boolean that_present_recovery = true && that.isSetRecovery();
- if (this_present_recovery || that_present_recovery) {
- if (!(this_present_recovery && that_present_recovery))
- return false;
- if (!this.recovery.equals(that.recovery))
- return false;
- }
-
- boolean this_present_loggers = true && this.isSetLoggers();
- boolean that_present_loggers = true && that.isSetLoggers();
- if (this_present_loggers || that_present_loggers) {
- if (!(this_present_loggers && that_present_loggers))
- return false;
- if (!this.loggers.equals(that.loggers))
- return false;
- }
-
boolean this_present_state = true && this.isSetState();
boolean that_present_state = true && that.isSetState();
if (this_present_state || that_present_state) {
@@ -991,15 +763,6 @@ public boolean equals(MasterMonitorInfo that) {
return false;
}
- boolean this_present_deadLoggers = true && this.isSetDeadLoggers();
- boolean that_present_deadLoggers = true && that.isSetDeadLoggers();
- if (this_present_deadLoggers || that_present_deadLoggers) {
- if (!(this_present_deadLoggers && that_present_deadLoggers))
- return false;
- if (!this.deadLoggers.equals(that.deadLoggers))
- return false;
- }
-
return true;
}
@@ -1046,26 +809,6 @@ public int compareTo(MasterMonitorInfo other) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRecovery()).compareTo(typedOther.isSetRecovery());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRecovery()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recovery, typedOther.recovery);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLoggers()).compareTo(typedOther.isSetLoggers());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLoggers()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loggers, typedOther.loggers);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
if (lastComparison != 0) {
return lastComparison;
@@ -1116,16 +859,6 @@ public int compareTo(MasterMonitorInfo other) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDeadLoggers()).compareTo(typedOther.isSetDeadLoggers());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDeadLoggers()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deadLoggers, typedOther.deadLoggers);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -1200,42 +933,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
- case 4: // RECOVERY
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
- this.recovery = new ArrayList<RecoveryStatus>(_list20.size);
- for (int _i21 = 0; _i21 < _list20.size; ++_i21)
- {
- RecoveryStatus _elem22;
- _elem22 = new RecoveryStatus();
- _elem22.read(iprot);
- this.recovery.add(_elem22);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5: // LOGGERS
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list23 = iprot.readListBegin();
- this.loggers = new ArrayList<LoggerStatus>(_list23.size);
- for (int _i24 = 0; _i24 < _list23.size; ++_i24)
- {
- LoggerStatus _elem25;
- _elem25 = new LoggerStatus();
- _elem25.read(iprot);
- this.loggers.add(_elem25);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
case 6: // STATE
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.state = MasterState.findByValue(iprot.readI32());
@@ -1261,13 +958,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
case 9: // SERVERS_SHUTTING_DOWN
if (field.type == org.apache.thrift.protocol.TType.SET) {
{
- org.apache.thrift.protocol.TSet _set26 = iprot.readSetBegin();
- this.serversShuttingDown = new HashSet<String>(2*_set26.size);
- for (int _i27 = 0; _i27 < _set26.size; ++_i27)
+ org.apache.thrift.protocol.TSet _set20 = iprot.readSetBegin();
+ this.serversShuttingDown = new HashSet<String>(2*_set20.size);
+ for (int _i21 = 0; _i21 < _set20.size; ++_i21)
{
- String _elem28;
- _elem28 = iprot.readString();
- this.serversShuttingDown.add(_elem28);
+ String _elem22;
+ _elem22 = iprot.readString();
+ this.serversShuttingDown.add(_elem22);
}
iprot.readSetEnd();
}
@@ -1278,32 +975,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
case 10: // DEAD_TABLET_SERVERS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
- this.deadTabletServers = new ArrayList<DeadServer>(_list29.size);
- for (int _i30 = 0; _i30 < _list29.size; ++_i30)
- {
- DeadServer _elem31;
- _elem31 = new DeadServer();
- _elem31.read(iprot);
- this.deadTabletServers.add(_elem31);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 11: // DEAD_LOGGERS
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
- this.deadLoggers = new ArrayList<DeadServer>(_list32.size);
- for (int _i33 = 0; _i33 < _list32.size; ++_i33)
+ org.apache.thrift.protocol.TList _list23 = iprot.readListBegin();
+ this.deadTabletServers = new ArrayList<DeadServer>(_list23.size);
+ for (int _i24 = 0; _i24 < _list23.size; ++_i24)
{
- DeadServer _elem34;
- _elem34 = new DeadServer();
- _elem34.read(iprot);
- this.deadLoggers.add(_elem34);
+ DeadServer _elem25;
+ _elem25 = new DeadServer();
+ _elem25.read(iprot);
+ this.deadTabletServers.add(_elem25);
}
iprot.readListEnd();
}
@@ -1330,10 +1009,10 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
oprot.writeFieldBegin(TABLE_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.tableMap.size()));
- for (Map.Entry<String, TableInfo> _iter35 : this.tableMap.entrySet())
+ for (Map.Entry<String, TableInfo> _iter26 : this.tableMap.entrySet())
{
- oprot.writeString(_iter35.getKey());
- _iter35.getValue().write(oprot);
+ oprot.writeString(_iter26.getKey());
+ _iter26.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -1343,9 +1022,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
oprot.writeFieldBegin(T_SERVER_INFO_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.tServerInfo.size()));
- for (TabletServerStatus _iter36 : this.tServerInfo)
+ for (TabletServerStatus _iter27 : this.tServerInfo)
{
- _iter36.write(oprot);
+ _iter27.write(oprot);
}
oprot.writeListEnd();
}
@@ -1355,39 +1034,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
oprot.writeFieldBegin(BAD_TSERVERS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, this.badTServers.size()));
- for (Map.Entry<String, Byte> _iter37 : this.badTServers.entrySet())
+ for (Map.Entry<String, Byte> _iter28 : this.badTServers.entrySet())
{
- oprot.writeString(_iter37.getKey());
- oprot.writeByte(_iter37.getValue());
+ oprot.writeString(_iter28.getKey());
+ oprot.writeByte(_iter28.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
- if (this.recovery != null) {
- oprot.writeFieldBegin(RECOVERY_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.recovery.size()));
- for (RecoveryStatus _iter38 : this.recovery)
- {
- _iter38.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.loggers != null) {
- oprot.writeFieldBegin(LOGGERS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.loggers.size()));
- for (LoggerStatus _iter39 : this.loggers)
- {
- _iter39.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
if (this.state != null) {
oprot.writeFieldBegin(STATE_FIELD_DESC);
oprot.writeI32(this.state.getValue());
@@ -1405,9 +1060,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
oprot.writeFieldBegin(SERVERS_SHUTTING_DOWN_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, this.serversShuttingDown.size()));
- for (String _iter40 : this.serversShuttingDown)
+ for (String _iter29 : this.serversShuttingDown)
{
- oprot.writeString(_iter40);
+ oprot.writeString(_iter29);
}
oprot.writeSetEnd();
}
@@ -1417,21 +1072,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
oprot.writeFieldBegin(DEAD_TABLET_SERVERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.deadTabletServers.size()));
- for (DeadServer _iter41 : this.deadTabletServers)
- {
- _iter41.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.deadLoggers != null) {
- oprot.writeFieldBegin(DEAD_LOGGERS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.deadLoggers.size()));
- for (DeadServer _iter42 : this.deadLoggers)
+ for (DeadServer _iter30 : this.deadTabletServers)
{
- _iter42.write(oprot);
+ _iter30.write(oprot);
}
oprot.writeListEnd();
}
@@ -1470,22 +1113,6 @@ public String toString() {
}
first = false;
if (!first) sb.append(", ");
- sb.append("recovery:");
- if (this.recovery == null) {
- sb.append("null");
- } else {
- sb.append(this.recovery);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("loggers:");
- if (this.loggers == null) {
- sb.append("null");
- } else {
- sb.append(this.loggers);
- }
- first = false;
- if (!first) sb.append(", ");
sb.append("state:");
if (this.state == null) {
sb.append("null");
@@ -1521,14 +1148,6 @@ public String toString() {
sb.append(this.deadTabletServers);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("deadLoggers:");
- if (this.deadLoggers == null) {
- sb.append("null");
- } else {
- sb.append(this.deadLoggers);
- }
- first = false;
sb.append(")");
return sb.toString();
}
View
355 core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java
@@ -23,28 +23,19 @@
@SuppressWarnings("all") public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, RecoveryStatus._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RecoveryStatus");
- private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField MAP_PROGRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("mapProgress", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
- private static final org.apache.thrift.protocol.TField REDUCE_PROGRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("reduceProgress", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
private static final org.apache.thrift.protocol.TField RUNTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("runtime", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final org.apache.thrift.protocol.TField COPY_PROGRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("copyProgress", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
+ private static final org.apache.thrift.protocol.TField PROGRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("progress", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
- public String host;
public String name;
- public double mapProgress;
- public double reduceProgress;
public int runtime;
- public double copyProgress;
+ public double progress;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HOST((short)1, "host"),
NAME((short)2, "name"),
- MAP_PROGRESS((short)3, "mapProgress"),
- REDUCE_PROGRESS((short)4, "reduceProgress"),
RUNTIME((short)5, "runtime"),
- COPY_PROGRESS((short)6, "copyProgress");
+ PROGRESS((short)6, "progress");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -59,18 +50,12 @@
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // HOST
- return HOST;
case 2: // NAME
return NAME;
- case 3: // MAP_PROGRESS
- return MAP_PROGRESS;
- case 4: // REDUCE_PROGRESS
- return REDUCE_PROGRESS;
case 5: // RUNTIME
return RUNTIME;
- case 6: // COPY_PROGRESS
- return COPY_PROGRESS;
+ case 6: // PROGRESS
+ return PROGRESS;
default:
return null;
}
@@ -111,26 +96,18 @@ public String getFieldName() {
}
// isset id assignments
- private static final int __MAPPROGRESS_ISSET_ID = 0;
- private static final int __REDUCEPROGRESS_ISSET_ID = 1;
- private static final int __RUNTIME_ISSET_ID = 2;
- private static final int __COPYPROGRESS_ISSET_ID = 3;
- private BitSet __isset_bit_vector = new BitSet(4);
+ private static final int __RUNTIME_ISSET_ID = 0;
+ private static final int __PROGRESS_ISSET_ID = 1;
+ private BitSet __isset_bit_vector = new BitSet(2);
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.MAP_PROGRESS, new org.apache.thrift.meta_data.FieldMetaData("mapProgress", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- tmpMap.put(_Fields.REDUCE_PROGRESS, new org.apache.thrift.meta_data.FieldMetaData("reduceProgress", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.RUNTIME, new org.apache.thrift.meta_data.FieldMetaData("runtime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.COPY_PROGRESS, new org.apache.thrift.meta_data.FieldMetaData("copyProgress", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.PROGRESS, new org.apache.thrift.meta_data.FieldMetaData("progress", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RecoveryStatus.class, metaDataMap);
@@ -140,24 +117,16 @@ public RecoveryStatus() {
}
public RecoveryStatus(
- String host,
String name,
- double mapProgress,
- double reduceProgress,
int runtime,
- double copyProgress)
+ double progress)
{
this();
- this.host = host;
this.name = name;
- this.mapProgress = mapProgress;
- setMapProgressIsSet(true);
- this.reduceProgress = reduceProgress;
- setReduceProgressIsSet(true);
this.runtime = runtime;
setRuntimeIsSet(true);
- this.copyProgress = copyProgress;
- setCopyProgressIsSet(true);
+ this.progress = progress;
+ setProgressIsSet(true);
}
/**
@@ -166,16 +135,11 @@ public RecoveryStatus(
public RecoveryStatus(RecoveryStatus other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
- if (other.isSetHost()) {
- this.host = other.host;
- }
if (other.isSetName()) {
this.name = other.name;
}
- this.mapProgress = other.mapProgress;
- this.reduceProgress = other.reduceProgress;
this.runtime = other.runtime;
- this.copyProgress = other.copyProgress;
+ this.progress = other.progress;
}
public RecoveryStatus deepCopy() {
@@ -184,40 +148,11 @@ public RecoveryStatus deepCopy() {
@Override
public void clear() {
- this.host = null;
this.name = null;
- setMapProgressIsSet(false);
- this.mapProgress = 0.0;
- setReduceProgressIsSet(false);
- this.reduceProgress = 0.0;
setRuntimeIsSet(false);
this.runtime = 0;
- setCopyProgressIsSet(false);
- this.copyProgress = 0.0;
- }
-
- public String getHost() {
- return this.host;
- }
-
- public RecoveryStatus setHost(String host) {
- this.host = host;
- return this;
- }
-
- public void unsetHost() {
- this.host = null;
- }
-
- /** Returns true if field host is set (has been assigned a value) and false otherwise */
- public boolean isSetHost() {
- return this.host != null;
- }
-
- public void setHostIsSet(boolean value) {
- if (!value) {
- this.host = null;
- }
+ setProgressIsSet(false);
+ this.progress = 0.0;
}
public String getName() {
@@ -244,52 +179,6 @@ public void setNameIsSet(boolean value) {
}
}
- public double getMapProgress() {
- return this.mapProgress;
- }
-
- public RecoveryStatus setMapProgress(double mapProgress) {
- this.mapProgress = mapProgress;
- setMapProgressIsSet(true);
- return this;
- }
-
- public void unsetMapProgress() {
- __isset_bit_vector.clear(__MAPPROGRESS_ISSET_ID);
- }
-
- /** Returns true if field mapProgress is set (has been assigned a value) and false otherwise */
- public boolean isSetMapProgress() {
- return __isset_bit_vector.get(__MAPPROGRESS_ISSET_ID);
- }
-
- public void setMapProgressIsSet(boolean value) {
- __isset_bit_vector.set(__MAPPROGRESS_ISSET_ID, value);
- }
-
- public double getReduceProgress() {
- return this.reduceProgress;
- }
-
- public RecoveryStatus setReduceProgress(double reduceProgress) {
- this.reduceProgress = reduceProgress;
- setReduceProgressIsSet(true);
- return this;
- }
-
- public void unsetReduceProgress() {
- __isset_bit_vector.clear(__REDUCEPROGRESS_ISSET_ID);
- }
-
- /** Returns true if field reduceProgress is set (has been assigned a value) and false otherwise */
- public boolean isSetReduceProgress() {
- return __isset_bit_vector.get(__REDUCEPROGRESS_ISSET_ID);
- }
-
- public void setReduceProgressIsSet(boolean value) {
- __isset_bit_vector.set(__REDUCEPROGRESS_ISSET_ID, value);
- }
-
public int getRuntime() {
return this.runtime;
}
@@ -313,39 +202,31 @@ public void setRuntimeIsSet(boolean value) {
__isset_bit_vector.set(__RUNTIME_ISSET_ID, value);
}
- public double getCopyProgress() {
- return this.copyProgress;
+ public double getProgress() {
+ return this.progress;
}
- public RecoveryStatus setCopyProgress(double copyProgress) {
- this.copyProgress = copyProgress;
- setCopyProgressIsSet(true);
+ public RecoveryStatus setProgress(double progress) {
+ this.progress = progress;
+ setProgressIsSet(true);
return this;
}
- public void unsetCopyProgress() {
- __isset_bit_vector.clear(__COPYPROGRESS_ISSET_ID);
+ public void unsetProgress() {
+ __isset_bit_vector.clear(__PROGRESS_ISSET_ID);
}
- /** Returns true if field copyProgress is set (has been assigned a value) and false otherwise */
- public boolean isSetCopyProgress() {
- return __isset_bit_vector.get(__COPYPROGRESS_ISSET_ID);
+ /** Returns true if field progress is set (has been assigned a value) and false otherwise */
+ public boolean isSetProgress() {
+ return __isset_bit_vector.get(__PROGRESS_ISSET_ID);
}
- public void setCopyProgressIsSet(boolean value) {
- __isset_bit_vector.set(__COPYPROGRESS_ISSET_ID, value);
+ public void setProgressIsSet(boolean value) {
+ __isset_bit_vector.set(__PROGRESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case HOST:
- if (value == null) {
- unsetHost();
- } else {
- setHost((String)value);
- }
- break;
-
case NAME:
if (value == null) {
unsetName();
@@ -354,22 +235,6 @@ public void setFieldValue(_Fields field, Object value) {
}
break;
- case MAP_PROGRESS:
- if (value == null) {
- unsetMapProgress();
- } else {
- setMapProgress((Double)value);
- }
- break;
-
- case REDUCE_PROGRESS:
- if (value == null) {
- unsetReduceProgress();
- } else {
- setReduceProgress((Double)value);
- }
- break;
-
case RUNTIME:
if (value == null) {
unsetRuntime();
@@ -378,11 +243,11 @@ public void setFieldValue(_Fields field, Object value) {
}
break;
- case COPY_PROGRESS:
+ case PROGRESS:
if (value == null) {
- unsetCopyProgress();
+ unsetProgress();
} else {
- setCopyProgress((Double)value);
+ setProgress((Double)value);
}
break;
@@ -391,23 +256,14 @@ public void setFieldValue(_Fields field, Object value) {
public Object getFieldValue(_Fields field) {
switch (field) {
- case HOST:
- return getHost();
-
case NAME:
return getName();
- case MAP_PROGRESS:
- return new Double(getMapProgress());
-
- case REDUCE_PROGRESS:
- return new Double(getReduceProgress());
-
case RUNTIME:
return new Integer(getRuntime());
- case COPY_PROGRESS:
- return new Double(getCopyProgress());
+ case PROGRESS:
+ return new Double(getProgress());
}
throw new IllegalStateException();
@@ -420,18 +276,12 @@ public boolean isSet(_Fields field) {
}
switch (field) {
- case HOST:
- return isSetHost();
case NAME:
return isSetName();
- case MAP_PROGRESS:
- return isSetMapProgress();
- case REDUCE_PROGRESS:
- return isSetReduceProgress();
case RUNTIME:
return isSetRuntime();
- case COPY_PROGRESS:
- return isSetCopyProgress();
+ case PROGRESS:
+ return isSetProgress();
}
throw new IllegalStateException();
}
@@ -449,15 +299,6 @@ public boolean equals(RecoveryStatus that) {
if (that == null)
return false;
- boolean this_present_host = true && this.isSetHost();
- boolean that_present_host = true && that.isSetHost();
- if (this_present_host || that_present_host) {
- if (!(this_present_host && that_present_host))
- return false;
- if (!this.host.equals(that.host))
- return false;
- }
-
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
@@ -467,24 +308,6 @@ public boolean equals(RecoveryStatus that) {
return false;
}
- boolean this_present_mapProgress = true;
- boolean that_present_mapProgress = true;
- if (this_present_mapProgress || that_present_mapProgress) {
- if (!(this_present_mapProgress && that_present_mapProgress))
- return false;
- if (this.mapProgress != that.mapProgress)
- return false;
- }
-
- boolean this_present_reduceProgress = true;
- boolean that_present_reduceProgress = true;
- if (this_present_reduceProgress || that_present_reduceProgress) {
- if (!(this_present_reduceProgress && that_present_reduceProgress))
- return false;
- if (this.reduceProgress != that.reduceProgress)
- return false;
- }
-
boolean this_present_runtime = true;
boolean that_present_runtime = true;
if (this_present_runtime || that_present_runtime) {
@@ -494,12 +317,12 @@ public boolean equals(RecoveryStatus that) {
return false;
}
- boolean this_present_copyProgress = true;
- boolean that_present_copyProgress = true;
- if (this_present_copyProgress || that_present_copyProgress) {
- if (!(this_present_copyProgress && that_present_copyProgress))
+ boolean this_present_progress = true;
+ boolean that_present_progress = true;
+ if (this_present_progress || that_present_progress) {
+ if (!(this_present_progress && that_present_progress))
return false;
- if (this.copyProgress != that.copyProgress)
+ if (this.progress != that.progress)
return false;
}
@@ -519,16 +342,6 @@ public int compareTo(RecoveryStatus other) {
int lastComparison = 0;
RecoveryStatus typedOther = (RecoveryStatus)other;
- lastComparison = Boolean.valueOf(isSetHost()).compareTo(typedOther.isSetHost());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHost()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
if (lastComparison != 0) {
return lastComparison;
@@ -539,26 +352,6 @@ public int compareTo(RecoveryStatus other) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMapProgress()).compareTo(typedOther.isSetMapProgress());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMapProgress()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mapProgress, typedOther.mapProgress);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetReduceProgress()).compareTo(typedOther.isSetReduceProgress());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReduceProgress()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reduceProgress, typedOther.reduceProgress);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = Boolean.valueOf(isSetRuntime()).compareTo(typedOther.isSetRuntime());
if (lastComparison != 0) {
return lastComparison;
@@ -569,12 +362,12 @@ public int compareTo(RecoveryStatus other) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCopyProgress()).compareTo(typedOther.isSetCopyProgress());
+ lastComparison = Boolean.valueOf(isSetProgress()).compareTo(typedOther.isSetProgress());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetCopyProgress()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.copyProgress, typedOther.copyProgress);
+ if (isSetProgress()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.progress, typedOther.progress);
if (lastComparison != 0) {
return lastComparison;
}
@@ -596,13 +389,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
break;
}
switch (field.id) {
- case 1: // HOST
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.host = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
case 2: // NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.name = iprot.readString();
@@ -610,22 +396,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
- case 3: // MAP_PROGRESS
- if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
- this.mapProgress = iprot.readDouble();
- setMapProgressIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // REDUCE_PROGRESS
- if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
- this.reduceProgress = iprot.readDouble();
- setReduceProgressIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
case 5: // RUNTIME
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.runtime = iprot.readI32();
@@ -634,10 +404,10 @@ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.t
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
- case 6: // COPY_PROGRESS
+ case 6: // PROGRESS
if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
- this.copyProgress = iprot.readDouble();
- setCopyProgressIsSet(true);
+ this.progress = iprot.readDouble();
+ setProgressIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -657,27 +427,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.host != null) {
- oprot.writeFieldBegin(HOST_FIELD_DESC);
- oprot.writeString(this