diff --git hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java index b290a40734..5935220454 100644 --- hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java +++ hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java @@ -58,7 +58,6 @@ import org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse; import org.apache.hadoop.hive.metastore.api.LockState; import org.apache.hadoop.hive.metastore.api.LockType; -import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; import org.apache.hadoop.hive.metastore.api.ShowLocksRequest; @@ -424,7 +423,7 @@ public void testNoBuckets() throws Exception { /** * this is a clone from TestTxnStatement2.... */ - public static void runWorker(HiveConf hiveConf) throws MetaException { + public static void runWorker(HiveConf hiveConf) throws Exception { AtomicBoolean stop = new AtomicBoolean(true); Worker t = new Worker(); t.setThreadId((int) t.getId()); diff --git itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java index 5af047f465..9883452c76 100644 --- itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java +++ itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java @@ -1245,7 +1245,7 @@ private void verifyFooBarResult(String tblName, int count) throws Exception, IOE } private void runMajorCompaction( - String dbName, String tblName, String... partNames) throws MetaException { + String dbName, String tblName, String... partNames) throws Exception { TxnStore txnHandler = TxnUtils.getTxnStore(conf); Worker t = new Worker(); t.setThreadId((int) t.getId()); @@ -1908,7 +1908,7 @@ static void createTestDataFile(String filename, String[] lines) throws IOExcepti } - static void runInitiator(HiveConf hiveConf) throws MetaException { + static void runInitiator(HiveConf hiveConf) throws Exception { AtomicBoolean stop = new AtomicBoolean(true); Initiator t = new Initiator(); t.setThreadId((int) t.getId()); @@ -1918,7 +1918,7 @@ static void runInitiator(HiveConf hiveConf) throws MetaException { t.run(); } - static void runWorker(HiveConf hiveConf) throws MetaException { + static void runWorker(HiveConf hiveConf) throws Exception { AtomicBoolean stop = new AtomicBoolean(true); Worker t = new Worker(); t.setThreadId((int) t.getId()); @@ -1928,7 +1928,7 @@ static void runWorker(HiveConf hiveConf) throws MetaException { t.run(); } - static void runCleaner(HiveConf hiveConf) throws MetaException { + static void runCleaner(HiveConf hiveConf) throws Exception { AtomicBoolean stop = new AtomicBoolean(true); Cleaner t = new Cleaner(); t.setThreadId((int) t.getId()); diff --git jdbc/src/java/org/apache/hive/jdbc/Utils.java jdbc/src/java/org/apache/hive/jdbc/Utils.java index 852942e6a2..f3a0513298 100644 --- jdbc/src/java/org/apache/hive/jdbc/Utils.java +++ jdbc/src/java/org/apache/hive/jdbc/Utils.java @@ -327,7 +327,7 @@ public static JdbcConnectionParams parseURL(String uri) throws JdbcUriParseExcep * @return * @throws SQLException */ - public static JdbcConnectionParams parseURL(String uri, Properties info) + public static JdbcConnectionParams parseURL(String uri, Properties info) throws JdbcUriParseException, SQLException, ZooKeeperHiveClientException { JdbcConnectionParams connParams = extractURLComponents(uri, info); if (ZooKeeperHiveClientHelper.isZkDynamicDiscoveryMode(connParams.getSessionVars())) { diff --git ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java index 18253c9bab..06b0209aa0 100644 --- ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java +++ ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java @@ -59,7 +59,7 @@ /** * A class to clean directories after compactions. This will run in a separate thread. */ -public class Cleaner extends CompactorThread { +public class Cleaner extends MetaStoreCompactorThread { static final private String CLASS_NAME = Cleaner.class.getName(); static final private Logger LOG = LoggerFactory.getLogger(CLASS_NAME); private long cleanerCheckInterval = 0; @@ -67,7 +67,7 @@ private ReplChangeManager replChangeManager; @Override - public void init(AtomicBoolean stop, AtomicBoolean looped) throws MetaException { + public void init(AtomicBoolean stop, AtomicBoolean looped) throws Exception { super.init(stop, looped); replChangeManager = ReplChangeManager.getInstance(conf); } diff --git ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java index 42ce1746fd..95d619fbfb 100644 --- ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java +++ ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java @@ -47,6 +47,7 @@ import org.apache.hadoop.hive.common.ValidWriteIdList; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; +import org.apache.hadoop.hive.metastore.IMetaStoreClient; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; import org.apache.hadoop.hive.metastore.api.CompactionType; import org.apache.hadoop.hive.metastore.api.FieldSchema; @@ -58,7 +59,6 @@ import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants; import org.apache.hadoop.hive.metastore.txn.CompactionInfo; -import org.apache.hadoop.hive.metastore.txn.TxnStore; import org.apache.hadoop.hive.ql.DriverUtils; import org.apache.hadoop.hive.ql.exec.DDLTask; import org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter; @@ -96,6 +96,7 @@ import org.apache.hive.common.util.HiveStringUtils; import org.apache.hive.common.util.Ref; import org.apache.parquet.Strings; +import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -226,7 +227,7 @@ private void overrideMRProps(JobConf job, Map properties) { * @throws java.io.IOException if the job fails */ void run(HiveConf conf, String jobName, Table t, Partition p, StorageDescriptor sd, ValidWriteIdList writeIds, - CompactionInfo ci, Worker.StatsUpdater su, TxnStore txnHandler) throws IOException { + CompactionInfo ci, Worker.StatsUpdater su, IMetaStoreClient msc) throws IOException { if(conf.getBoolVar(HiveConf.ConfVars.HIVE_IN_TEST) && conf.getBoolVar(HiveConf.ConfVars.HIVETESTMODEFAILCOMPACTION)) { throw new RuntimeException(HiveConf.ConfVars.HIVETESTMODEFAILCOMPACTION.name() + "=true"); @@ -268,7 +269,7 @@ void run(HiveConf conf, String jobName, Table t, Partition p, StorageDescriptor launchCompactionJob(jobMinorCompact, null, CompactionType.MINOR, null, parsedDeltas.subList(jobSubId * maxDeltastoHandle, (jobSubId + 1) * maxDeltastoHandle), - maxDeltastoHandle, -1, conf, txnHandler, ci.id, jobName); + maxDeltastoHandle, -1, conf, msc, ci.id, jobName); } //now recompute state since we've done minor compactions and have different 'best' set of deltas dir = AcidUtils.getAcidState(new Path(sd.getLocation()), conf, writeIds); @@ -312,7 +313,7 @@ void run(HiveConf conf, String jobName, Table t, Partition p, StorageDescriptor } launchCompactionJob(job, baseDir, ci.type, dirsToSearch, dir.getCurrentDirectories(), - dir.getCurrentDirectories().size(), dir.getObsolete().size(), conf, txnHandler, ci.id, jobName); + dir.getCurrentDirectories().size(), dir.getObsolete().size(), conf, msc, ci.id, jobName); su.gatherStats(); } @@ -539,7 +540,7 @@ private void launchCompactionJob(JobConf job, Path baseDir, CompactionType compa StringableList dirsToSearch, List parsedDeltas, int curDirNumber, int obsoleteDirNumber, HiveConf hiveConf, - TxnStore txnHandler, long id, String jobName) throws IOException { + IMetaStoreClient msc, long id, String jobName) throws IOException { job.setBoolean(IS_MAJOR, compactionType == CompactionType.MAJOR); if(dirsToSearch == null) { dirsToSearch = new StringableList(); @@ -579,7 +580,11 @@ private void launchCompactionJob(JobConf job, Path baseDir, CompactionType compa RunningJob rj = jc.submitJob(job); LOG.info("Submitted compaction job '" + job.getJobName() + "' with jobID=" + rj.getID() + " compaction ID=" + id); - txnHandler.setHadoopJobId(rj.getID().toString(), id); + try { + msc.setHadoopJobid(rj.getID().toString(), id); + } catch (TException e) { + LOG.warn("Error setting hadoop jobId=rj.getID().toString(), compactionId=" + id, e); + } rj.waitForCompletion(); if (!rj.isSuccessful()) { throw new IOException((compactionType == CompactionType.MAJOR ? "Major" : "Minor") + diff --git ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java index f5b901d6e8..0c057792e4 100644 --- ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java +++ ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java @@ -17,23 +17,19 @@ */ package org.apache.hadoop.hive.ql.txn.compactor; +import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.conf.HiveConf; -import org.apache.hadoop.hive.metastore.MetaStoreThread; import org.apache.hadoop.hive.metastore.RawStore; -import org.apache.hadoop.hive.metastore.RawStoreProxy; import org.apache.hadoop.hive.metastore.Warehouse; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.Partition; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; import org.apache.hadoop.hive.metastore.api.Table; -import org.apache.hadoop.hive.metastore.conf.MetastoreConf; import org.apache.hadoop.hive.metastore.txn.CompactionInfo; -import org.apache.hadoop.hive.metastore.txn.TxnStore; -import org.apache.hadoop.hive.metastore.txn.TxnUtils; import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.security.UserGroupInformation; import org.slf4j.Logger; @@ -42,26 +38,29 @@ import java.io.IOException; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; -import static org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.getDefaultCatalog; /** * Superclass for all threads in the compactor. */ -public abstract class CompactorThread extends Thread implements MetaStoreThread { +public abstract class CompactorThread extends Thread implements Configurable { static final private String CLASS_NAME = CompactorThread.class.getName(); - static final private Logger LOG = LoggerFactory.getLogger(CLASS_NAME); + protected static final Logger LOG = LoggerFactory.getLogger(CLASS_NAME); protected HiveConf conf; - protected TxnStore txnHandler; protected RawStore rs; - protected int threadId; protected AtomicBoolean stop; protected AtomicBoolean looped; + protected int threadId; + + public void setThreadId(int threadId) { + this.threadId = threadId; + } + @Override public void setConf(Configuration configuration) { // TODO MS-SPLIT for now, keep a copy of HiveConf around as we need to call other methods with @@ -77,24 +76,11 @@ public Configuration getConf() { return conf; } - @Override - public void setThreadId(int threadId) { - this.threadId = threadId; - } - - @Override - public void init(AtomicBoolean stop, AtomicBoolean looped) throws MetaException { - this.stop = stop; - this.looped = looped; + public void init(AtomicBoolean stop, AtomicBoolean looped) throws Exception { setPriority(MIN_PRIORITY); setDaemon(true); // this means the process will exit without waiting for this thread - - // Get our own instance of the transaction handler - txnHandler = TxnUtils.getTxnStore(conf); - - // Get our own connection to the database so we can get table and partition information. - rs = RawStoreProxy.getProxy(conf, conf, - MetastoreConf.getVar(conf, MetastoreConf.ConfVars.RAW_STORE_IMPL), threadId); + this.stop = stop; + this.looped = looped; } /** @@ -103,14 +89,15 @@ public void init(AtomicBoolean stop, AtomicBoolean looped) throws MetaException * @return metastore table * @throws org.apache.hadoop.hive.metastore.api.MetaException if the table cannot be found. */ - protected Table resolveTable(CompactionInfo ci) throws MetaException { - try { - return rs.getTable(getDefaultCatalog(conf), ci.dbname, ci.tableName); - } catch (MetaException e) { - LOG.error("Unable to find table " + ci.getFullTableName() + ", " + e.getMessage()); - throw e; - } - } + abstract Table resolveTable(CompactionInfo ci) throws MetaException; + + /** + * Get list of partitions by name. + * @param ci compaction info. + * @return list of partitions + * @throws MetaException if an error occurs. + */ + abstract List getPartitionsByNames(CompactionInfo ci) throws MetaException; /** * Get the partition being compacted. @@ -123,8 +110,7 @@ protected Partition resolvePartition(CompactionInfo ci) throws Exception { if (ci.partName != null) { List parts; try { - parts = rs.getPartitionsByNames(getDefaultCatalog(conf), ci.dbname, ci.tableName, - Collections.singletonList(ci.partName)); + parts = getPartitionsByNames(ci); if (parts == null || parts.size() == 0) { // The partition got dropped before we went looking for it. return null; @@ -220,4 +206,33 @@ protected boolean runJobAsSelf(String owner) { protected String tableName(Table t) { return Warehouse.getQualifiedName(t); } + + /** + * + * @param classname name of the class the extends {@link CompactorThread} + * @return the class instantiated. + * @throws Exception + */ + public static CompactorThread instantiateThread(String classname) throws Exception { + Class c = Class.forName(classname); + Object o = c.newInstance(); + if (CompactorThread.class.isAssignableFrom(o.getClass())) { + return (CompactorThread) o; + } else { + String s = classname + " is not an instance of CompactorThread."; + LOG.error(s); + throw new IOException(s); + } + } + + private static AtomicInteger nextThreadId = new AtomicInteger(1000000); + + public static void initializeAndStartThread(CompactorThread thread, + Configuration conf) throws Exception { + LOG.info("Starting compactor thread of type " + thread.getClass().getName()); + thread.setConf(conf); + thread.setThreadId(nextThreadId.incrementAndGet()); + thread.init(new AtomicBoolean(), new AtomicBoolean()); + thread.start(); + } } diff --git ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java index cdcc0e9548..a0df82cb20 100644 --- ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java +++ ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java @@ -60,7 +60,7 @@ * A class to initiate compactions. This will run in a separate thread. * It's critical that there exactly 1 of these in a given warehouse. */ -public class Initiator extends CompactorThread { +public class Initiator extends MetaStoreCompactorThread { static final private String CLASS_NAME = Initiator.class.getName(); static final private Logger LOG = LoggerFactory.getLogger(CLASS_NAME); @@ -202,7 +202,7 @@ public void run() { } @Override - public void init(AtomicBoolean stop, AtomicBoolean looped) throws MetaException { + public void init(AtomicBoolean stop, AtomicBoolean looped) throws Exception { super.init(stop, looped); checkInterval = conf.getTimeVar(HiveConf.ConfVars.HIVE_COMPACTOR_CHECK_INTERVAL, TimeUnit.MILLISECONDS) ; diff --git ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MetaStoreCompactorThread.java ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MetaStoreCompactorThread.java new file mode 100644 index 0000000000..1ddc54d68a --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MetaStoreCompactorThread.java @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.txn.compactor; + +import org.apache.hadoop.hive.metastore.MetaStoreThread; +import org.apache.hadoop.hive.metastore.RawStore; +import org.apache.hadoop.hive.metastore.RawStoreProxy; +import org.apache.hadoop.hive.metastore.api.MetaException; +import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; +import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.Table; +import org.apache.hadoop.hive.metastore.conf.MetastoreConf; +import org.apache.hadoop.hive.metastore.txn.CompactionInfo; +import org.apache.hadoop.hive.metastore.txn.TxnStore; +import org.apache.hadoop.hive.metastore.txn.TxnUtils; + +import java.util.Collections; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; + +import static org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.getDefaultCatalog; + +/** + * Compactor threads that runs in the metastore. It uses a {@link TxnStore} + * to access the internal database. + */ +public class MetaStoreCompactorThread extends CompactorThread implements MetaStoreThread { + + protected TxnStore txnHandler; + protected RawStore rs; + protected int threadId; + + @Override + public void setThreadId(int threadId) { + this.threadId = threadId; + } + + @Override + public void init(AtomicBoolean stop, AtomicBoolean looped) throws Exception { + super.init(stop, looped); + + // Get our own instance of the transaction handler + txnHandler = TxnUtils.getTxnStore(conf); + + // Get our own connection to the database so we can get table and partition information. + rs = RawStoreProxy.getProxy(conf, conf, + MetastoreConf.getVar(conf, MetastoreConf.ConfVars.RAW_STORE_IMPL), threadId); + } + + @Override Table resolveTable(CompactionInfo ci) throws MetaException { + try { + return rs.getTable(getDefaultCatalog(conf), ci.dbname, ci.tableName); + } catch (MetaException e) { + LOG.error("Unable to find table " + ci.getFullTableName() + ", " + e.getMessage()); + throw e; + } + } + + @Override List getPartitionsByNames(CompactionInfo ci) throws MetaException { + try { + return rs.getPartitionsByNames(getDefaultCatalog(conf), ci.dbname, ci.tableName, + Collections.singletonList(ci.partName)); + } catch (MetaException e) { + LOG.error("Unable to get partitions by name for CompactionInfo=" + ci); + throw e; + } catch (NoSuchObjectException e) { + LOG.error("Unable to get partitions by name for CompactionInfo=" + ci); + throw new MetaException(e.toString()); + } + } +} diff --git ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/RemoteCompactorThread.java ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/RemoteCompactorThread.java new file mode 100644 index 0000000000..9678786612 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/RemoteCompactorThread.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.txn.compactor; + +import org.apache.hadoop.hive.metastore.HiveMetaStoreUtils; +import org.apache.hadoop.hive.metastore.IMetaStoreClient; +import org.apache.hadoop.hive.metastore.api.MetaException; +import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.Table; +import org.apache.hadoop.hive.metastore.txn.CompactionInfo; +import org.apache.thrift.TException; + +import java.util.Collections; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; +import static org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.getDefaultCatalog; + +/** + * Compactor thread that can run outside the metastore. It will + * use the metastore thrift API which will default to a remote connection + * if the thread is running outside the metastore or to a function call + * if it's running within the metastore. + */ +public class RemoteCompactorThread extends CompactorThread { + protected IMetaStoreClient msc; + + public void init(AtomicBoolean stop, AtomicBoolean looped) throws Exception { + super.init(stop, looped); + this.msc = HiveMetaStoreUtils.getHiveMetastoreClient(conf); + } + + @Override Table resolveTable(CompactionInfo ci) throws MetaException { + try { + return msc.getTable(getDefaultCatalog(conf), ci.dbname, ci.tableName); + } catch (TException e) { + LOG.error("Unable to find table " + ci.getFullTableName() + ", " + e.getMessage()); + throw new MetaException(e.toString()); + } + } + + @Override List getPartitionsByNames(CompactionInfo ci) throws MetaException { + try { + return msc.getPartitionsByNames(getDefaultCatalog(conf), ci.dbname, ci.tableName, + Collections.singletonList(ci.partName)); + } catch (TException e) { + LOG.error("Unable to get partitions by name for CompactionInfo=" + ci); + throw new MetaException(e.toString()); + } + } +} diff --git ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java index 21043415d3..fbac3251d7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java +++ ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java @@ -21,20 +21,20 @@ import org.apache.hadoop.hive.common.JavaUtils; import org.apache.hadoop.hive.common.ValidCompactorWriteIdList; import org.apache.hadoop.hive.common.ValidTxnList; -import org.apache.hadoop.hive.metastore.api.AbortTxnRequest; -import org.apache.hadoop.hive.metastore.api.CommitTxnRequest; -import org.apache.hadoop.hive.metastore.api.GetValidWriteIdsRequest; -import org.apache.hadoop.hive.metastore.api.HeartbeatRequest; +import org.apache.hadoop.hive.metastore.HiveMetaStoreUtils; +import org.apache.hadoop.hive.metastore.IMetaStoreClient; +import org.apache.hadoop.hive.metastore.MetaStoreThread; import org.apache.hadoop.hive.metastore.api.MetaException; -import org.apache.hadoop.hive.metastore.api.OpenTxnRequest; import org.apache.hadoop.hive.metastore.api.Partition; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.conf.MetastoreConf; -import org.apache.hadoop.hive.metastore.txn.TxnCommonUtils; -import org.apache.hadoop.hive.metastore.txn.TxnStore; import org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager; +import org.apache.hadoop.hive.ql.lockmgr.LockException; +import org.apache.hadoop.hive.ql.metadata.Hive; +import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.mapred.JobConf; +import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.hadoop.hive.conf.HiveConf; @@ -63,10 +63,10 @@ * A class to do compactions. This will run in a separate thread. It will spin on the * compaction queue and look for new work to do. */ -public class Worker extends CompactorThread { +public class Worker extends RemoteCompactorThread implements MetaStoreThread { static final private String CLASS_NAME = Worker.class.getName(); static final private Logger LOG = LoggerFactory.getLogger(CLASS_NAME); - static final private long SLEEP_TIME = 5000; + static final private long SLEEP_TIME = 10000; static final private int baseThreadNum = 10002; private String workerName; @@ -89,13 +89,18 @@ public static String hostname() { // don't go through Initiator for user initiated compactions) @Override public void run() { + LOG.info("Starting Worker thread"); do { boolean launchedJob = false; // Make sure nothing escapes this run method and kills the metastore at large, // so wrap it in a big catch Throwable statement. CompactionHeartbeater heartbeater = null; try { - final CompactionInfo ci = txnHandler.findNextToCompact(workerName); + if (msc == null) { + msc = HiveMetaStoreUtils.getHiveMetastoreClient(conf); + } + final CompactionInfo ci = CompactionInfo.optionalCompactionInfoStructToInfo( + msc.findNextCompact(workerName)); LOG.debug("Processing compaction request " + ci); if (ci == null && !stop.get()) { @@ -115,11 +120,11 @@ public void run() { if (t1 == null) { LOG.info("Unable to find table " + ci.getFullTableName() + ", assuming it was dropped and moving on."); - txnHandler.markCleaned(ci); + msc.markCleaned(CompactionInfo.compactionInfoToStruct(ci)); continue; } } catch (MetaException e) { - txnHandler.markCleaned(ci); + msc.markCleaned(CompactionInfo.compactionInfoToStruct(ci)); continue; } // This chicanery is to get around the fact that the table needs to be final in order to @@ -133,11 +138,11 @@ public void run() { if (p == null && ci.partName != null) { LOG.info("Unable to find partition " + ci.getFullPartitionName() + ", assuming it was dropped and moving on."); - txnHandler.markCleaned(ci); + msc.markCleaned(CompactionInfo.compactionInfoToStruct(ci)); continue; } } catch (Exception e) { - txnHandler.markCleaned(ci); + msc.markCleaned(CompactionInfo.compactionInfoToStruct(ci)); continue; } @@ -147,7 +152,7 @@ public void run() { // Check that the table or partition isn't sorted, as we don't yet support that. if (sd.getSortCols() != null && !sd.getSortCols().isEmpty()) { LOG.error("Attempt to compact sorted table, which is not yet supported!"); - txnHandler.markCleaned(ci); + msc.markCleaned(CompactionInfo.compactionInfoToStruct(ci)); continue; } @@ -161,7 +166,7 @@ public void run() { String runAs; if (ci.runAs == null) { runAs = findUserToRunAs(sd.getLocation(), t); - txnHandler.setRunAs(ci.id, runAs); + msc.setRunAs(ci.id, runAs); } else { runAs = ci.runAs; } @@ -175,38 +180,37 @@ public void run() { * openTxn requires Context() which is set up based on query parse/plan.... long txnid = txnMgr.openTxn(null, null); */ - OpenTxnRequest otReq = new OpenTxnRequest(1, runAs, hostname()); - otReq.setAgentInfo(getName());//ThreadName - long compactorTxnId = txnHandler.openTxns(otReq).getTxn_ids().get(0); + long compactorTxnId = msc.openTxns(runAs, 1).getTxn_ids().get(0); //todo: now we can update compaction_queue entry with this id //also make sure to write to TXN_COMPONENTS so that if txn aborts, we don't delete the metadata about it from TXNS!!!! - heartbeater = new CompactionHeartbeater(txnHandler, compactorTxnId, fullTableName, conf); + heartbeater = new CompactionHeartbeater(compactorTxnId, fullTableName, conf); heartbeater.start(); - ValidTxnList validTxnList = TxnCommonUtils.createValidReadTxnList(txnHandler.getOpenTxns(), compactorTxnId); - GetValidWriteIdsRequest rqst = new GetValidWriteIdsRequest(Collections.singletonList(fullTableName)); + ValidTxnList validTxnList = msc.getValidTxns(compactorTxnId); //with this ValidWriteIdList is capped at whatever HWM validTxnList has - rqst.setValidTxnList(validTxnList.writeToString()); final ValidCompactorWriteIdList tblValidWriteIds = - TxnUtils.createValidCompactWriteIdList(txnHandler.getValidWriteIds(rqst).getTblValidWriteIds().get(0)); + TxnUtils.createValidCompactWriteIdList(msc.getValidWriteIds( + Collections.singletonList(fullTableName), validTxnList.writeToString()).get(0)); LOG.debug("ValidCompactWriteIdList: " + tblValidWriteIds.writeToString()); conf.set(ValidTxnList.VALID_TXNS_KEY, validTxnList.writeToString()); //todo: this is a RDBMS call - so is setRunAs() above - could combine into 1 - txnHandler.setCompactionHighestWriteId(ci, tblValidWriteIds.getHighWatermark()); + msc.setCompactionHighestWriteid(CompactionInfo.compactionInfoToStruct(ci), + tblValidWriteIds.getHighWatermark()); final StringBuilder jobName = new StringBuilder(workerName); jobName.append("-compactor-"); jobName.append(ci.getFullPartitionName()); LOG.info("Starting " + ci.type.toString() + " compaction for " + ci.getFullPartitionName() + " in " + JavaUtils.txnIdToString(compactorTxnId)); - final StatsUpdater su = StatsUpdater.init(ci, txnHandler.findColumnsWithStats(ci), conf, - runJobAsSelf(runAs) ? runAs : t.getOwner()); + final StatsUpdater su = StatsUpdater.init(ci, msc.findColumnsWithStats( + CompactionInfo.compactionInfoToStruct(ci)), + conf, runJobAsSelf(runAs) ? runAs : t.getOwner()); final CompactorMR mr = new CompactorMR(); launchedJob = true; try { if (runJobAsSelf(runAs)) { - mr.run(conf, jobName.toString(), t, p, sd, tblValidWriteIds, ci, su, txnHandler); + mr.run(conf, jobName.toString(), t, p, sd, tblValidWriteIds, ci, su, msc); } else { UserGroupInformation ugi = UserGroupInformation.createProxyUser(t.getOwner(), UserGroupInformation.getLoginUser()); @@ -214,7 +218,7 @@ public void run() { ugi.doAs(new PrivilegedExceptionAction() { @Override public Object run() throws Exception { - mr.run(conf, jobName.toString(), t, fp, sd, tblValidWriteIds, ci, su, txnHandler); + mr.run(conf, jobName.toString(), t, fp, sd, tblValidWriteIds, ci, su, msc); return null; } }); @@ -226,16 +230,28 @@ public Object run() throws Exception { } } heartbeater.cancel(); - txnHandler.markCompacted(ci); - txnHandler.commitTxn(new CommitTxnRequest(compactorTxnId)); + msc.markCompacted(CompactionInfo.compactionInfoToStruct(ci)); + msc.commitTxn(compactorTxnId); if (conf.getBoolVar(HiveConf.ConfVars.HIVE_IN_TEST)) { mrJob = mr.getMrJob(); } } catch (Exception e) { LOG.error("Caught exception while trying to compact " + ci + ". Marking failed to avoid repeated failures, " + StringUtils.stringifyException(e)); - txnHandler.markFailed(ci); - txnHandler.abortTxn(new AbortTxnRequest(compactorTxnId)); + msc.markFailed(CompactionInfo.compactionInfoToStruct(ci)); + msc.abortTxns(Collections.singletonList(compactorTxnId)); + } + } catch (TException | IOException t) { + LOG.error("Caught an exception in the main loop of compactor worker " + workerName + ", " + + StringUtils.stringifyException(t)); + if (msc != null) { + msc.close(); + } + msc = null; + try { + Thread.sleep(SLEEP_TIME); + } catch (InterruptedException e) { + LOG.error("Interrupted while sleeping to instantiate metastore client"); } } catch (Throwable t) { LOG.error("Caught an exception in the main loop of compactor worker " + workerName + ", " + @@ -259,7 +275,7 @@ public Object run() throws Exception { } @Override - public void init(AtomicBoolean stop, AtomicBoolean looped) throws MetaException { + public void init(AtomicBoolean stop, AtomicBoolean looped) throws Exception { super.init(stop, looped); StringBuilder name = new StringBuilder(hostname()); @@ -373,17 +389,16 @@ void gatherStats() { static final class CompactionHeartbeater extends Thread { static final private Logger LOG = LoggerFactory.getLogger(CompactionHeartbeater.class); - private final TxnStore txnHandler; private final AtomicBoolean stop = new AtomicBoolean(); private final long compactorTxnId; private final String tableName; private final HiveConf conf; private final long interval; - public CompactionHeartbeater(TxnStore txnHandler, long compactorTxnId, String tableName, HiveConf conf) { - this.txnHandler = txnHandler; + public CompactionHeartbeater(long compactorTxnId, String tableName, HiveConf conf) { this.tableName = tableName; this.compactorTxnId = compactorTxnId; this.conf = conf; + this.interval = MetastoreConf.getTimeVar(conf, MetastoreConf.ConfVars.TXN_TIMEOUT, TimeUnit.MILLISECONDS) / 2; setDaemon(true); @@ -393,13 +408,12 @@ public CompactionHeartbeater(TxnStore txnHandler, long compactorTxnId, String ta @Override public void run() { try { + // We need to create our own metastore client since the thrifts clients + // are not thread safe. + IMetaStoreClient msc = HiveMetaStoreUtils.getHiveMetastoreClient(conf); LOG.debug("Heartbeating compaction transaction id {} for table: {}", compactorTxnId, tableName); - HeartbeatRequest heartbeatRequest = new HeartbeatRequest(); - - heartbeatRequest.setTxnid(compactorTxnId); - heartbeatRequest.setLockid(0); while(!stop.get()) { - txnHandler.heartbeat(heartbeatRequest); + msc.heartbeat(compactorTxnId, 0); Thread.sleep(interval); } } catch (Exception e) { diff --git ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java index 546ff955b7..1425dafd57 100644 --- ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java +++ ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java @@ -1189,18 +1189,18 @@ else if(TxnStore.ATTEMPTED_RESPONSE.equals(compact.getState())) { } return compactionsByState; } - public static void runWorker(HiveConf hiveConf) throws MetaException { + public static void runWorker(HiveConf hiveConf) throws Exception { runCompactorThread(hiveConf, CompactorThreadType.WORKER); } - public static void runCleaner(HiveConf hiveConf) throws MetaException { + public static void runCleaner(HiveConf hiveConf) throws Exception { runCompactorThread(hiveConf, CompactorThreadType.CLEANER); } - public static void runInitiator(HiveConf hiveConf) throws MetaException { + public static void runInitiator(HiveConf hiveConf) throws Exception { runCompactorThread(hiveConf, CompactorThreadType.INITIATOR); } private enum CompactorThreadType {INITIATOR, WORKER, CLEANER} private static void runCompactorThread(HiveConf hiveConf, CompactorThreadType type) - throws MetaException { + throws Exception { AtomicBoolean stop = new AtomicBoolean(true); CompactorThread t = null; switch (type) { diff --git ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java index 52453a2ec4..157d1adfe7 100644 --- ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java +++ ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java @@ -24,7 +24,6 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.RemoteIterator; import org.apache.hadoop.hive.conf.HiveConf; -import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.txn.TxnDbUtil; import org.apache.hadoop.hive.ql.io.HiveInputFormat; import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; @@ -153,11 +152,11 @@ protected String makeValuesClause(int[][] rows) { return TestTxnCommands2.makeValuesClause(rows); } - void runWorker(HiveConf hiveConf) throws MetaException { + void runWorker(HiveConf hiveConf) throws Exception { TestTxnCommands2.runWorker(hiveConf); } - void runCleaner(HiveConf hiveConf) throws MetaException { + void runCleaner(HiveConf hiveConf) throws Exception { TestTxnCommands2.runCleaner(hiveConf); } diff --git service/src/java/org/apache/hive/service/server/HiveServer2.java service/src/java/org/apache/hive/service/server/HiveServer2.java index 0c55654475..f9fb854106 100644 --- service/src/java/org/apache/hive/service/server/HiveServer2.java +++ service/src/java/org/apache/hive/service/server/HiveServer2.java @@ -83,6 +83,8 @@ import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer; import org.apache.hadoop.hive.ql.session.ClearDanglingScratchDir; import org.apache.hadoop.hive.ql.session.SessionState; +import org.apache.hadoop.hive.ql.txn.compactor.CompactorThread; +import org.apache.hadoop.hive.ql.txn.compactor.Worker; import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.hive.shims.Utils; import org.apache.hadoop.security.UserGroupInformation; @@ -286,6 +288,12 @@ public void run() { throw new ServiceException(e); } + try { + maybeStartCompactorThreads(hiveConf); + } catch (Exception e) { + throw new RuntimeException(e); + } + // Setup web UI final int webUIPort; final String webHost; @@ -1005,6 +1013,16 @@ private static void startHiveServer2() throws Throwable { } } + private void maybeStartCompactorThreads(HiveConf hiveConf) throws Exception { + if (MetastoreConf.getVar(hiveConf, MetastoreConf.ConfVars.HIVE_METASTORE_RUNWORKER_IN).equals("hs2")) { + int numWorkers = MetastoreConf.getIntVar(hiveConf, MetastoreConf.ConfVars.COMPACTOR_WORKER_THREADS); + for (int i = 0; i < numWorkers; i++) { + Worker w = new Worker(); + CompactorThread.initializeAndStartThread(w, hiveConf); + } + } + } + /** * Remove all znodes corresponding to the given version number from ZooKeeper * diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionInfoStruct.java standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionInfoStruct.java new file mode 100644 index 0000000000..4ab10d0c87 --- /dev/null +++ standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionInfoStruct.java @@ -0,0 +1,1434 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class CompactionInfoStruct implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionInfoStruct"); + + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField RUNAS_FIELD_DESC = new org.apache.thrift.protocol.TField("runas", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField TOOMANYABORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("toomanyaborts", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)9); + private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start", org.apache.thrift.protocol.TType.I64, (short)11); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CompactionInfoStructStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CompactionInfoStructTupleSchemeFactory()); + } + + private long id; // required + private String dbname; // required + private String tablename; // required + private String partitionname; // optional + private CompactionType type; // required + private String runas; // optional + private String properties; // optional + private boolean toomanyaborts; // optional + private String state; // optional + private String workerId; // optional + private long start; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ID((short)1, "id"), + DBNAME((short)2, "dbname"), + TABLENAME((short)3, "tablename"), + PARTITIONNAME((short)4, "partitionname"), + /** + * + * @see CompactionType + */ + TYPE((short)5, "type"), + RUNAS((short)6, "runas"), + PROPERTIES((short)7, "properties"), + TOOMANYABORTS((short)8, "toomanyaborts"), + STATE((short)9, "state"), + WORKER_ID((short)10, "workerId"), + START((short)11, "start"); + + private static final Map byName = new HashMap(); + + 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: // ID + return ID; + case 2: // DBNAME + return DBNAME; + case 3: // TABLENAME + return TABLENAME; + case 4: // PARTITIONNAME + return PARTITIONNAME; + case 5: // TYPE + return TYPE; + case 6: // RUNAS + return RUNAS; + case 7: // PROPERTIES + return PROPERTIES; + case 8: // TOOMANYABORTS + return TOOMANYABORTS; + case 9: // STATE + return STATE; + case 10: // WORKER_ID + return WORKER_ID; + case 11: // START + return START; + 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 + private static final int __ID_ISSET_ID = 0; + private static final int __TOOMANYABORTS_ISSET_ID = 1; + private static final int __START_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.RUNAS,_Fields.PROPERTIES,_Fields.TOOMANYABORTS,_Fields.STATE,_Fields.WORKER_ID,_Fields.START}; + 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionType.class))); + tmpMap.put(_Fields.RUNAS, new org.apache.thrift.meta_data.FieldMetaData("runas", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TOOMANYABORTS, new org.apache.thrift.meta_data.FieldMetaData("toomanyaborts", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionInfoStruct.class, metaDataMap); + } + + public CompactionInfoStruct() { + } + + public CompactionInfoStruct( + long id, + String dbname, + String tablename, + CompactionType type) + { + this(); + this.id = id; + setIdIsSet(true); + this.dbname = dbname; + this.tablename = tablename; + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public CompactionInfoStruct(CompactionInfoStruct other) { + __isset_bitfield = other.__isset_bitfield; + this.id = other.id; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTablename()) { + this.tablename = other.tablename; + } + if (other.isSetPartitionname()) { + this.partitionname = other.partitionname; + } + if (other.isSetType()) { + this.type = other.type; + } + if (other.isSetRunas()) { + this.runas = other.runas; + } + if (other.isSetProperties()) { + this.properties = other.properties; + } + this.toomanyaborts = other.toomanyaborts; + if (other.isSetState()) { + this.state = other.state; + } + if (other.isSetWorkerId()) { + this.workerId = other.workerId; + } + this.start = other.start; + } + + public CompactionInfoStruct deepCopy() { + return new CompactionInfoStruct(this); + } + + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; + this.dbname = null; + this.tablename = null; + this.partitionname = null; + this.type = null; + this.runas = null; + this.properties = null; + setToomanyabortsIsSet(false); + this.toomanyaborts = false; + this.state = null; + this.workerId = null; + setStartIsSet(false); + this.start = 0; + } + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + setIdIsSet(true); + } + + public void unsetId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTablename() { + return this.tablename; + } + + public void setTablename(String tablename) { + this.tablename = tablename; + } + + public void unsetTablename() { + this.tablename = null; + } + + /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ + public boolean isSetTablename() { + return this.tablename != null; + } + + public void setTablenameIsSet(boolean value) { + if (!value) { + this.tablename = null; + } + } + + public String getPartitionname() { + return this.partitionname; + } + + public void setPartitionname(String partitionname) { + this.partitionname = partitionname; + } + + public void unsetPartitionname() { + this.partitionname = null; + } + + /** Returns true if field partitionname is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionname() { + return this.partitionname != null; + } + + public void setPartitionnameIsSet(boolean value) { + if (!value) { + this.partitionname = null; + } + } + + /** + * + * @see CompactionType + */ + public CompactionType getType() { + return this.type; + } + + /** + * + * @see CompactionType + */ + public void setType(CompactionType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public String getRunas() { + return this.runas; + } + + public void setRunas(String runas) { + this.runas = runas; + } + + public void unsetRunas() { + this.runas = null; + } + + /** Returns true if field runas is set (has been assigned a value) and false otherwise */ + public boolean isSetRunas() { + return this.runas != null; + } + + public void setRunasIsSet(boolean value) { + if (!value) { + this.runas = null; + } + } + + public String getProperties() { + return this.properties; + } + + public void setProperties(String properties) { + this.properties = properties; + } + + public void unsetProperties() { + this.properties = null; + } + + /** Returns true if field properties is set (has been assigned a value) and false otherwise */ + public boolean isSetProperties() { + return this.properties != null; + } + + public void setPropertiesIsSet(boolean value) { + if (!value) { + this.properties = null; + } + } + + public boolean isToomanyaborts() { + return this.toomanyaborts; + } + + public void setToomanyaborts(boolean toomanyaborts) { + this.toomanyaborts = toomanyaborts; + setToomanyabortsIsSet(true); + } + + public void unsetToomanyaborts() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOOMANYABORTS_ISSET_ID); + } + + /** Returns true if field toomanyaborts is set (has been assigned a value) and false otherwise */ + public boolean isSetToomanyaborts() { + return EncodingUtils.testBit(__isset_bitfield, __TOOMANYABORTS_ISSET_ID); + } + + public void setToomanyabortsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOOMANYABORTS_ISSET_ID, value); + } + + public String getState() { + return this.state; + } + + public void setState(String state) { + this.state = state; + } + + public void unsetState() { + this.state = null; + } + + /** Returns true if field state is set (has been assigned a value) and false otherwise */ + public boolean isSetState() { + return this.state != null; + } + + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } + } + + public String getWorkerId() { + return this.workerId; + } + + public void setWorkerId(String workerId) { + this.workerId = workerId; + } + + public void unsetWorkerId() { + this.workerId = null; + } + + /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ + public boolean isSetWorkerId() { + return this.workerId != null; + } + + public void setWorkerIdIsSet(boolean value) { + if (!value) { + this.workerId = null; + } + } + + public long getStart() { + return this.start; + } + + public void setStart(long start) { + this.start = start; + setStartIsSet(true); + } + + public void unsetStart() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID); + } + + /** Returns true if field start is set (has been assigned a value) and false otherwise */ + public boolean isSetStart() { + return EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID); + } + + public void setStartIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((Long)value); + } + break; + + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTablename(); + } else { + setTablename((String)value); + } + break; + + case PARTITIONNAME: + if (value == null) { + unsetPartitionname(); + } else { + setPartitionname((String)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((CompactionType)value); + } + break; + + case RUNAS: + if (value == null) { + unsetRunas(); + } else { + setRunas((String)value); + } + break; + + case PROPERTIES: + if (value == null) { + unsetProperties(); + } else { + setProperties((String)value); + } + break; + + case TOOMANYABORTS: + if (value == null) { + unsetToomanyaborts(); + } else { + setToomanyaborts((Boolean)value); + } + break; + + case STATE: + if (value == null) { + unsetState(); + } else { + setState((String)value); + } + break; + + case WORKER_ID: + if (value == null) { + unsetWorkerId(); + } else { + setWorkerId((String)value); + } + break; + + case START: + if (value == null) { + unsetStart(); + } else { + setStart((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ID: + return getId(); + + case DBNAME: + return getDbname(); + + case TABLENAME: + return getTablename(); + + case PARTITIONNAME: + return getPartitionname(); + + case TYPE: + return getType(); + + case RUNAS: + return getRunas(); + + case PROPERTIES: + return getProperties(); + + case TOOMANYABORTS: + return isToomanyaborts(); + + case STATE: + return getState(); + + case WORKER_ID: + return getWorkerId(); + + case START: + return getStart(); + + } + 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 ID: + return isSetId(); + case DBNAME: + return isSetDbname(); + case TABLENAME: + return isSetTablename(); + case PARTITIONNAME: + return isSetPartitionname(); + case TYPE: + return isSetType(); + case RUNAS: + return isSetRunas(); + case PROPERTIES: + return isSetProperties(); + case TOOMANYABORTS: + return isSetToomanyaborts(); + case STATE: + return isSetState(); + case WORKER_ID: + return isSetWorkerId(); + case START: + return isSetStart(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CompactionInfoStruct) + return this.equals((CompactionInfoStruct)that); + return false; + } + + public boolean equals(CompactionInfoStruct that) { + if (that == null) + return false; + + boolean this_present_id = true; + boolean that_present_id = true; + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tablename = true && this.isSetTablename(); + boolean that_present_tablename = true && that.isSetTablename(); + if (this_present_tablename || that_present_tablename) { + if (!(this_present_tablename && that_present_tablename)) + return false; + if (!this.tablename.equals(that.tablename)) + return false; + } + + boolean this_present_partitionname = true && this.isSetPartitionname(); + boolean that_present_partitionname = true && that.isSetPartitionname(); + if (this_present_partitionname || that_present_partitionname) { + if (!(this_present_partitionname && that_present_partitionname)) + return false; + if (!this.partitionname.equals(that.partitionname)) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_runas = true && this.isSetRunas(); + boolean that_present_runas = true && that.isSetRunas(); + if (this_present_runas || that_present_runas) { + if (!(this_present_runas && that_present_runas)) + return false; + if (!this.runas.equals(that.runas)) + return false; + } + + boolean this_present_properties = true && this.isSetProperties(); + boolean that_present_properties = true && that.isSetProperties(); + if (this_present_properties || that_present_properties) { + if (!(this_present_properties && that_present_properties)) + return false; + if (!this.properties.equals(that.properties)) + return false; + } + + boolean this_present_toomanyaborts = true && this.isSetToomanyaborts(); + boolean that_present_toomanyaborts = true && that.isSetToomanyaborts(); + if (this_present_toomanyaborts || that_present_toomanyaborts) { + if (!(this_present_toomanyaborts && that_present_toomanyaborts)) + return false; + if (this.toomanyaborts != that.toomanyaborts) + return false; + } + + boolean this_present_state = true && this.isSetState(); + boolean that_present_state = true && that.isSetState(); + if (this_present_state || that_present_state) { + if (!(this_present_state && that_present_state)) + return false; + if (!this.state.equals(that.state)) + return false; + } + + boolean this_present_workerId = true && this.isSetWorkerId(); + boolean that_present_workerId = true && that.isSetWorkerId(); + if (this_present_workerId || that_present_workerId) { + if (!(this_present_workerId && that_present_workerId)) + return false; + if (!this.workerId.equals(that.workerId)) + return false; + } + + boolean this_present_start = true && this.isSetStart(); + boolean that_present_start = true && that.isSetStart(); + if (this_present_start || that_present_start) { + if (!(this_present_start && that_present_start)) + return false; + if (this.start != that.start) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_id = true; + list.add(present_id); + if (present_id) + list.add(id); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tablename = true && (isSetTablename()); + list.add(present_tablename); + if (present_tablename) + list.add(tablename); + + boolean present_partitionname = true && (isSetPartitionname()); + list.add(present_partitionname); + if (present_partitionname) + list.add(partitionname); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + + boolean present_runas = true && (isSetRunas()); + list.add(present_runas); + if (present_runas) + list.add(runas); + + boolean present_properties = true && (isSetProperties()); + list.add(present_properties); + if (present_properties) + list.add(properties); + + boolean present_toomanyaborts = true && (isSetToomanyaborts()); + list.add(present_toomanyaborts); + if (present_toomanyaborts) + list.add(toomanyaborts); + + boolean present_state = true && (isSetState()); + list.add(present_state); + if (present_state) + list.add(state); + + boolean present_workerId = true && (isSetWorkerId()); + list.add(present_workerId); + if (present_workerId) + list.add(workerId); + + boolean present_start = true && (isSetStart()); + list.add(present_start); + if (present_start) + list.add(start); + + return list.hashCode(); + } + + @Override + public int compareTo(CompactionInfoStruct other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRunas()).compareTo(other.isSetRunas()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRunas()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runas, other.runas); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProperties()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetToomanyaborts()).compareTo(other.isSetToomanyaborts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToomanyaborts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toomanyaborts, other.toomanyaborts); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWorkerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStart()).compareTo(other.isSetStart()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStart()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start, other.start); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("CompactionInfoStruct("); + boolean first = true; + + sb.append("id:"); + sb.append(this.id); + first = false; + if (!first) sb.append(", "); + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + if (isSetPartitionname()) { + if (!first) sb.append(", "); + sb.append("partitionname:"); + if (this.partitionname == null) { + sb.append("null"); + } else { + sb.append(this.partitionname); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (isSetRunas()) { + if (!first) sb.append(", "); + sb.append("runas:"); + if (this.runas == null) { + sb.append("null"); + } else { + sb.append(this.runas); + } + first = false; + } + if (isSetProperties()) { + if (!first) sb.append(", "); + sb.append("properties:"); + if (this.properties == null) { + sb.append("null"); + } else { + sb.append(this.properties); + } + first = false; + } + if (isSetToomanyaborts()) { + if (!first) sb.append(", "); + sb.append("toomanyaborts:"); + sb.append(this.toomanyaborts); + first = false; + } + if (isSetState()) { + if (!first) sb.append(", "); + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + } + if (isSetWorkerId()) { + if (!first) sb.append(", "); + sb.append("workerId:"); + if (this.workerId == null) { + sb.append("null"); + } else { + sb.append(this.workerId); + } + first = false; + } + if (isSetStart()) { + if (!first) sb.append(", "); + sb.append("start:"); + sb.append(this.start); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); + } + + if (!isSetDbname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); + } + + if (!isSetTablename()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); + } + + if (!isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + } + + 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 { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class CompactionInfoStructStandardSchemeFactory implements SchemeFactory { + public CompactionInfoStructStandardScheme getScheme() { + return new CompactionInfoStructStandardScheme(); + } + } + + private static class CompactionInfoStructStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionInfoStruct struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TABLENAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PARTITIONNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // RUNAS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.runas = iprot.readString(); + struct.setRunasIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // PROPERTIES + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.properties = iprot.readString(); + struct.setPropertiesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // TOOMANYABORTS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.toomanyaborts = iprot.readBool(); + struct.setToomanyabortsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.state = iprot.readString(); + struct.setStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // WORKER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.workerId = iprot.readString(); + struct.setWorkerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // START + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.start = iprot.readI64(); + struct.setStartIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, CompactionInfoStruct struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI64(struct.id); + oprot.writeFieldEnd(); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tablename != null) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } + if (struct.partitionname != null) { + if (struct.isSetPartitionname()) { + oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); + oprot.writeString(struct.partitionname); + oprot.writeFieldEnd(); + } + } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.runas != null) { + if (struct.isSetRunas()) { + oprot.writeFieldBegin(RUNAS_FIELD_DESC); + oprot.writeString(struct.runas); + oprot.writeFieldEnd(); + } + } + if (struct.properties != null) { + if (struct.isSetProperties()) { + oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); + oprot.writeString(struct.properties); + oprot.writeFieldEnd(); + } + } + if (struct.isSetToomanyaborts()) { + oprot.writeFieldBegin(TOOMANYABORTS_FIELD_DESC); + oprot.writeBool(struct.toomanyaborts); + oprot.writeFieldEnd(); + } + if (struct.state != null) { + if (struct.isSetState()) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeString(struct.state); + oprot.writeFieldEnd(); + } + } + if (struct.workerId != null) { + if (struct.isSetWorkerId()) { + oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); + oprot.writeString(struct.workerId); + oprot.writeFieldEnd(); + } + } + if (struct.isSetStart()) { + oprot.writeFieldBegin(START_FIELD_DESC); + oprot.writeI64(struct.start); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CompactionInfoStructTupleSchemeFactory implements SchemeFactory { + public CompactionInfoStructTupleScheme getScheme() { + return new CompactionInfoStructTupleScheme(); + } + } + + private static class CompactionInfoStructTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CompactionInfoStruct struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.id); + oprot.writeString(struct.dbname); + oprot.writeString(struct.tablename); + oprot.writeI32(struct.type.getValue()); + BitSet optionals = new BitSet(); + if (struct.isSetPartitionname()) { + optionals.set(0); + } + if (struct.isSetRunas()) { + optionals.set(1); + } + if (struct.isSetProperties()) { + optionals.set(2); + } + if (struct.isSetToomanyaborts()) { + optionals.set(3); + } + if (struct.isSetState()) { + optionals.set(4); + } + if (struct.isSetWorkerId()) { + optionals.set(5); + } + if (struct.isSetStart()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetPartitionname()) { + oprot.writeString(struct.partitionname); + } + if (struct.isSetRunas()) { + oprot.writeString(struct.runas); + } + if (struct.isSetProperties()) { + oprot.writeString(struct.properties); + } + if (struct.isSetToomanyaborts()) { + oprot.writeBool(struct.toomanyaborts); + } + if (struct.isSetState()) { + oprot.writeString(struct.state); + } + if (struct.isSetWorkerId()) { + oprot.writeString(struct.workerId); + } + if (struct.isSetStart()) { + oprot.writeI64(struct.start); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CompactionInfoStruct struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } + if (incoming.get(1)) { + struct.runas = iprot.readString(); + struct.setRunasIsSet(true); + } + if (incoming.get(2)) { + struct.properties = iprot.readString(); + struct.setPropertiesIsSet(true); + } + if (incoming.get(3)) { + struct.toomanyaborts = iprot.readBool(); + struct.setToomanyabortsIsSet(true); + } + if (incoming.get(4)) { + struct.state = iprot.readString(); + struct.setStateIsSet(true); + } + if (incoming.get(5)) { + struct.workerId = iprot.readString(); + struct.setWorkerIdIsSet(true); + } + if (incoming.get(6)) { + struct.start = iprot.readI64(); + struct.setStartIsSet(true); + } + } + } + +} + diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OptionalCompactionInfoStruct.java standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OptionalCompactionInfoStruct.java new file mode 100644 index 0000000000..aabd5be919 --- /dev/null +++ standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OptionalCompactionInfoStruct.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class OptionalCompactionInfoStruct implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OptionalCompactionInfoStruct"); + + private static final org.apache.thrift.protocol.TField CI_FIELD_DESC = new org.apache.thrift.protocol.TField("ci", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new OptionalCompactionInfoStructStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OptionalCompactionInfoStructTupleSchemeFactory()); + } + + private CompactionInfoStruct ci; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + CI((short)1, "ci"); + + private static final Map byName = new HashMap(); + + 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: // CI + return CI; + 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 + private static final _Fields optionals[] = {_Fields.CI}; + 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.CI, new org.apache.thrift.meta_data.FieldMetaData("ci", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "CompactionInfoStruct"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OptionalCompactionInfoStruct.class, metaDataMap); + } + + public OptionalCompactionInfoStruct() { + } + + /** + * Performs a deep copy on other. + */ + public OptionalCompactionInfoStruct(OptionalCompactionInfoStruct other) { + if (other.isSetCi()) { + this.ci = other.ci; + } + } + + public OptionalCompactionInfoStruct deepCopy() { + return new OptionalCompactionInfoStruct(this); + } + + @Override + public void clear() { + this.ci = null; + } + + public CompactionInfoStruct getCi() { + return this.ci; + } + + public void setCi(CompactionInfoStruct ci) { + this.ci = ci; + } + + public void unsetCi() { + this.ci = null; + } + + /** Returns true if field ci is set (has been assigned a value) and false otherwise */ + public boolean isSetCi() { + return this.ci != null; + } + + public void setCiIsSet(boolean value) { + if (!value) { + this.ci = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case CI: + if (value == null) { + unsetCi(); + } else { + setCi((CompactionInfoStruct)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case CI: + return getCi(); + + } + 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 CI: + return isSetCi(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof OptionalCompactionInfoStruct) + return this.equals((OptionalCompactionInfoStruct)that); + return false; + } + + public boolean equals(OptionalCompactionInfoStruct that) { + if (that == null) + return false; + + boolean this_present_ci = true && this.isSetCi(); + boolean that_present_ci = true && that.isSetCi(); + if (this_present_ci || that_present_ci) { + if (!(this_present_ci && that_present_ci)) + return false; + if (!this.ci.equals(that.ci)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_ci = true && (isSetCi()); + list.add(present_ci); + if (present_ci) + list.add(ci); + + return list.hashCode(); + } + + @Override + public int compareTo(OptionalCompactionInfoStruct other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetCi()).compareTo(other.isSetCi()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCi()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ci, other.ci); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("OptionalCompactionInfoStruct("); + boolean first = true; + + if (isSetCi()) { + sb.append("ci:"); + if (this.ci == null) { + sb.append("null"); + } else { + sb.append(this.ci); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + 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); + } + } + + private static class OptionalCompactionInfoStructStandardSchemeFactory implements SchemeFactory { + public OptionalCompactionInfoStructStandardScheme getScheme() { + return new OptionalCompactionInfoStructStandardScheme(); + } + } + + private static class OptionalCompactionInfoStructStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, OptionalCompactionInfoStruct struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // CI + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ci = new CompactionInfoStruct(); + struct.ci.read(iprot); + struct.setCiIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, OptionalCompactionInfoStruct struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.ci != null) { + if (struct.isSetCi()) { + oprot.writeFieldBegin(CI_FIELD_DESC); + struct.ci.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class OptionalCompactionInfoStructTupleSchemeFactory implements SchemeFactory { + public OptionalCompactionInfoStructTupleScheme getScheme() { + return new OptionalCompactionInfoStructTupleScheme(); + } + } + + private static class OptionalCompactionInfoStructTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, OptionalCompactionInfoStruct struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetCi()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetCi()) { + struct.ci.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, OptionalCompactionInfoStruct struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.ci = new CompactionInfoStruct(); + struct.ci.read(iprot); + struct.setCiIsSet(true); + } + } + } + +} + diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index b6a0893524..f1cd8fdec0 100644 --- standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -374,6 +374,22 @@ public void add_dynamic_partitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; + public OptionalCompactionInfoStruct find_next_compact(String workerId) throws MetaException, org.apache.thrift.TException; + + public void set_compaction_highest_writeid(CompactionInfoStruct cr, long high_watermark) throws org.apache.thrift.TException; + + public void set_run_as(long cq_id, String user) throws org.apache.thrift.TException; + + public List find_columns_with_stats(CompactionInfoStruct cr) throws org.apache.thrift.TException; + + public void mark_cleaned(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException; + + public void mark_compacted(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException; + + public void mark_failed(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException; + + public void set_hadoop_jobid(String jobId, long cq_id) throws org.apache.thrift.TException; + public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException; public CurrentNotificationEventId get_current_notificationEventId() throws org.apache.thrift.TException; @@ -808,6 +824,22 @@ public void add_dynamic_partitions(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void find_next_compact(String workerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void set_compaction_highest_writeid(CompactionInfoStruct cr, long high_watermark, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void set_run_as(long cq_id, String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void find_columns_with_stats(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mark_cleaned(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mark_compacted(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mark_failed(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void set_hadoop_jobid(String jobId, long cq_id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void get_next_notification(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_current_notificationEventId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -5749,6 +5781,187 @@ public void recv_add_dynamic_partitions() throws NoSuchTxnException, TxnAbortedE return; } + public OptionalCompactionInfoStruct find_next_compact(String workerId) throws MetaException, org.apache.thrift.TException + { + send_find_next_compact(workerId); + return recv_find_next_compact(); + } + + public void send_find_next_compact(String workerId) throws org.apache.thrift.TException + { + find_next_compact_args args = new find_next_compact_args(); + args.setWorkerId(workerId); + sendBase("find_next_compact", args); + } + + public OptionalCompactionInfoStruct recv_find_next_compact() throws MetaException, org.apache.thrift.TException + { + find_next_compact_result result = new find_next_compact_result(); + receiveBase(result, "find_next_compact"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "find_next_compact failed: unknown result"); + } + + public void set_compaction_highest_writeid(CompactionInfoStruct cr, long high_watermark) throws org.apache.thrift.TException + { + send_set_compaction_highest_writeid(cr, high_watermark); + recv_set_compaction_highest_writeid(); + } + + public void send_set_compaction_highest_writeid(CompactionInfoStruct cr, long high_watermark) throws org.apache.thrift.TException + { + set_compaction_highest_writeid_args args = new set_compaction_highest_writeid_args(); + args.setCr(cr); + args.setHigh_watermark(high_watermark); + sendBase("set_compaction_highest_writeid", args); + } + + public void recv_set_compaction_highest_writeid() throws org.apache.thrift.TException + { + set_compaction_highest_writeid_result result = new set_compaction_highest_writeid_result(); + receiveBase(result, "set_compaction_highest_writeid"); + return; + } + + public void set_run_as(long cq_id, String user) throws org.apache.thrift.TException + { + send_set_run_as(cq_id, user); + recv_set_run_as(); + } + + public void send_set_run_as(long cq_id, String user) throws org.apache.thrift.TException + { + set_run_as_args args = new set_run_as_args(); + args.setCq_id(cq_id); + args.setUser(user); + sendBase("set_run_as", args); + } + + public void recv_set_run_as() throws org.apache.thrift.TException + { + set_run_as_result result = new set_run_as_result(); + receiveBase(result, "set_run_as"); + return; + } + + public List find_columns_with_stats(CompactionInfoStruct cr) throws org.apache.thrift.TException + { + send_find_columns_with_stats(cr); + return recv_find_columns_with_stats(); + } + + public void send_find_columns_with_stats(CompactionInfoStruct cr) throws org.apache.thrift.TException + { + find_columns_with_stats_args args = new find_columns_with_stats_args(); + args.setCr(cr); + sendBase("find_columns_with_stats", args); + } + + public List recv_find_columns_with_stats() throws org.apache.thrift.TException + { + find_columns_with_stats_result result = new find_columns_with_stats_result(); + receiveBase(result, "find_columns_with_stats"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "find_columns_with_stats failed: unknown result"); + } + + public void mark_cleaned(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException + { + send_mark_cleaned(cr); + recv_mark_cleaned(); + } + + public void send_mark_cleaned(CompactionInfoStruct cr) throws org.apache.thrift.TException + { + mark_cleaned_args args = new mark_cleaned_args(); + args.setCr(cr); + sendBase("mark_cleaned", args); + } + + public void recv_mark_cleaned() throws MetaException, org.apache.thrift.TException + { + mark_cleaned_result result = new mark_cleaned_result(); + receiveBase(result, "mark_cleaned"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + + public void mark_compacted(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException + { + send_mark_compacted(cr); + recv_mark_compacted(); + } + + public void send_mark_compacted(CompactionInfoStruct cr) throws org.apache.thrift.TException + { + mark_compacted_args args = new mark_compacted_args(); + args.setCr(cr); + sendBase("mark_compacted", args); + } + + public void recv_mark_compacted() throws MetaException, org.apache.thrift.TException + { + mark_compacted_result result = new mark_compacted_result(); + receiveBase(result, "mark_compacted"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + + public void mark_failed(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException + { + send_mark_failed(cr); + recv_mark_failed(); + } + + public void send_mark_failed(CompactionInfoStruct cr) throws org.apache.thrift.TException + { + mark_failed_args args = new mark_failed_args(); + args.setCr(cr); + sendBase("mark_failed", args); + } + + public void recv_mark_failed() throws MetaException, org.apache.thrift.TException + { + mark_failed_result result = new mark_failed_result(); + receiveBase(result, "mark_failed"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + + public void set_hadoop_jobid(String jobId, long cq_id) throws org.apache.thrift.TException + { + send_set_hadoop_jobid(jobId, cq_id); + recv_set_hadoop_jobid(); + } + + public void send_set_hadoop_jobid(String jobId, long cq_id) throws org.apache.thrift.TException + { + set_hadoop_jobid_args args = new set_hadoop_jobid_args(); + args.setJobId(jobId); + args.setCq_id(cq_id); + sendBase("set_hadoop_jobid", args); + } + + public void recv_set_hadoop_jobid() throws org.apache.thrift.TException + { + set_hadoop_jobid_result result = new set_hadoop_jobid_result(); + receiveBase(result, "set_hadoop_jobid"); + return; + } + public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException { send_get_next_notification(rqst); @@ -12921,6 +13134,271 @@ public void getResult() throws NoSuchTxnException, TxnAbortedException, org.apac } } + public void find_next_compact(String workerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + find_next_compact_call method_call = new find_next_compact_call(workerId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_next_compact_call extends org.apache.thrift.async.TAsyncMethodCall { + private String workerId; + public find_next_compact_call(String workerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.workerId = workerId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("find_next_compact", org.apache.thrift.protocol.TMessageType.CALL, 0)); + find_next_compact_args args = new find_next_compact_args(); + args.setWorkerId(workerId); + args.write(prot); + prot.writeMessageEnd(); + } + + public OptionalCompactionInfoStruct getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_find_next_compact(); + } + } + + public void set_compaction_highest_writeid(CompactionInfoStruct cr, long high_watermark, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + set_compaction_highest_writeid_call method_call = new set_compaction_highest_writeid_call(cr, high_watermark, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_compaction_highest_writeid_call extends org.apache.thrift.async.TAsyncMethodCall { + private CompactionInfoStruct cr; + private long high_watermark; + public set_compaction_highest_writeid_call(CompactionInfoStruct cr, long high_watermark, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.cr = cr; + this.high_watermark = high_watermark; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_compaction_highest_writeid", org.apache.thrift.protocol.TMessageType.CALL, 0)); + set_compaction_highest_writeid_args args = new set_compaction_highest_writeid_args(); + args.setCr(cr); + args.setHigh_watermark(high_watermark); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_set_compaction_highest_writeid(); + } + } + + public void set_run_as(long cq_id, String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + set_run_as_call method_call = new set_run_as_call(cq_id, user, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_run_as_call extends org.apache.thrift.async.TAsyncMethodCall { + private long cq_id; + private String user; + public set_run_as_call(long cq_id, String user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.cq_id = cq_id; + this.user = user; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_run_as", org.apache.thrift.protocol.TMessageType.CALL, 0)); + set_run_as_args args = new set_run_as_args(); + args.setCq_id(cq_id); + args.setUser(user); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_set_run_as(); + } + } + + public void find_columns_with_stats(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + find_columns_with_stats_call method_call = new find_columns_with_stats_call(cr, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_columns_with_stats_call extends org.apache.thrift.async.TAsyncMethodCall { + private CompactionInfoStruct cr; + public find_columns_with_stats_call(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.cr = cr; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("find_columns_with_stats", org.apache.thrift.protocol.TMessageType.CALL, 0)); + find_columns_with_stats_args args = new find_columns_with_stats_args(); + args.setCr(cr); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_find_columns_with_stats(); + } + } + + public void mark_cleaned(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mark_cleaned_call method_call = new mark_cleaned_call(cr, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_cleaned_call extends org.apache.thrift.async.TAsyncMethodCall { + private CompactionInfoStruct cr; + public mark_cleaned_call(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.cr = cr; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mark_cleaned", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mark_cleaned_args args = new mark_cleaned_args(); + args.setCr(cr); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mark_cleaned(); + } + } + + public void mark_compacted(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mark_compacted_call method_call = new mark_compacted_call(cr, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_compacted_call extends org.apache.thrift.async.TAsyncMethodCall { + private CompactionInfoStruct cr; + public mark_compacted_call(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.cr = cr; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mark_compacted", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mark_compacted_args args = new mark_compacted_args(); + args.setCr(cr); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mark_compacted(); + } + } + + public void mark_failed(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mark_failed_call method_call = new mark_failed_call(cr, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_failed_call extends org.apache.thrift.async.TAsyncMethodCall { + private CompactionInfoStruct cr; + public mark_failed_call(CompactionInfoStruct cr, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.cr = cr; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mark_failed", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mark_failed_args args = new mark_failed_args(); + args.setCr(cr); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mark_failed(); + } + } + + public void set_hadoop_jobid(String jobId, long cq_id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + set_hadoop_jobid_call method_call = new set_hadoop_jobid_call(jobId, cq_id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_hadoop_jobid_call extends org.apache.thrift.async.TAsyncMethodCall { + private String jobId; + private long cq_id; + public set_hadoop_jobid_call(String jobId, long cq_id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.jobId = jobId; + this.cq_id = cq_id; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_hadoop_jobid", org.apache.thrift.protocol.TMessageType.CALL, 0)); + set_hadoop_jobid_args args = new set_hadoop_jobid_args(); + args.setJobId(jobId); + args.setCq_id(cq_id); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_set_hadoop_jobid(); + } + } + public void get_next_notification(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_next_notification_call method_call = new get_next_notification_call(rqst, resultHandler, this, ___protocolFactory, ___transport); @@ -14671,6 +15149,14 @@ protected Processor(I iface, Map extends org.apache.thrift.ProcessFunction { + public find_next_compact() { + super("find_next_compact"); + } + + public find_next_compact_args getEmptyArgsInstance() { + return new find_next_compact_args(); + } + + protected boolean isOneway() { + return false; + } + + public find_next_compact_result getResult(I iface, find_next_compact_args args) throws org.apache.thrift.TException { + find_next_compact_result result = new find_next_compact_result(); + try { + result.success = iface.find_next_compact(args.workerId); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_compaction_highest_writeid extends org.apache.thrift.ProcessFunction { + public set_compaction_highest_writeid() { + super("set_compaction_highest_writeid"); + } + + public set_compaction_highest_writeid_args getEmptyArgsInstance() { + return new set_compaction_highest_writeid_args(); + } + + protected boolean isOneway() { + return false; + } + + public set_compaction_highest_writeid_result getResult(I iface, set_compaction_highest_writeid_args args) throws org.apache.thrift.TException { + set_compaction_highest_writeid_result result = new set_compaction_highest_writeid_result(); + iface.set_compaction_highest_writeid(args.cr, args.high_watermark); + return result; + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_run_as extends org.apache.thrift.ProcessFunction { + public set_run_as() { + super("set_run_as"); + } + + public set_run_as_args getEmptyArgsInstance() { + return new set_run_as_args(); + } + + protected boolean isOneway() { + return false; + } + + public set_run_as_result getResult(I iface, set_run_as_args args) throws org.apache.thrift.TException { + set_run_as_result result = new set_run_as_result(); + iface.set_run_as(args.cq_id, args.user); + return result; + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_columns_with_stats extends org.apache.thrift.ProcessFunction { + public find_columns_with_stats() { + super("find_columns_with_stats"); + } + + public find_columns_with_stats_args getEmptyArgsInstance() { + return new find_columns_with_stats_args(); + } + + protected boolean isOneway() { + return false; + } + + public find_columns_with_stats_result getResult(I iface, find_columns_with_stats_args args) throws org.apache.thrift.TException { + find_columns_with_stats_result result = new find_columns_with_stats_result(); + result.success = iface.find_columns_with_stats(args.cr); + return result; + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_cleaned extends org.apache.thrift.ProcessFunction { + public mark_cleaned() { + super("mark_cleaned"); + } + + public mark_cleaned_args getEmptyArgsInstance() { + return new mark_cleaned_args(); + } + + protected boolean isOneway() { + return false; + } + + public mark_cleaned_result getResult(I iface, mark_cleaned_args args) throws org.apache.thrift.TException { + mark_cleaned_result result = new mark_cleaned_result(); + try { + iface.mark_cleaned(args.cr); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_compacted extends org.apache.thrift.ProcessFunction { + public mark_compacted() { + super("mark_compacted"); + } + + public mark_compacted_args getEmptyArgsInstance() { + return new mark_compacted_args(); + } + + protected boolean isOneway() { + return false; + } + + public mark_compacted_result getResult(I iface, mark_compacted_args args) throws org.apache.thrift.TException { + mark_compacted_result result = new mark_compacted_result(); + try { + iface.mark_compacted(args.cr); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_failed extends org.apache.thrift.ProcessFunction { + public mark_failed() { + super("mark_failed"); + } + + public mark_failed_args getEmptyArgsInstance() { + return new mark_failed_args(); + } + + protected boolean isOneway() { + return false; + } + + public mark_failed_result getResult(I iface, mark_failed_args args) throws org.apache.thrift.TException { + mark_failed_result result = new mark_failed_result(); + try { + iface.mark_failed(args.cr); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_hadoop_jobid extends org.apache.thrift.ProcessFunction { + public set_hadoop_jobid() { + super("set_hadoop_jobid"); + } + + public set_hadoop_jobid_args getEmptyArgsInstance() { + return new set_hadoop_jobid_args(); + } + + protected boolean isOneway() { + return false; + } + + public set_hadoop_jobid_result getResult(I iface, set_hadoop_jobid_args args) throws org.apache.thrift.TException { + set_hadoop_jobid_result result = new set_hadoop_jobid_result(); + iface.set_hadoop_jobid(args.jobId, args.cq_id); + return result; + } + } + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_next_notification extends org.apache.thrift.ProcessFunction { public get_next_notification() { super("get_next_notification"); @@ -20418,6 +21080,14 @@ protected AsyncProcessor(I iface, Map extends org.apache.thrift.AsyncProcessFunction { - public get_next_notification() { - super("get_next_notification"); - } - - public get_next_notification_args getEmptyArgsInstance() { - return new get_next_notification_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(NotificationEventResponse o) { - get_next_notification_result result = new get_next_notification_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_next_notification_result result = new get_next_notification_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_next_notification_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_next_notification(args.rqst,resultHandler); - } - } - - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_current_notificationEventId extends org.apache.thrift.AsyncProcessFunction { - public get_current_notificationEventId() { - super("get_current_notificationEventId"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_next_compact extends org.apache.thrift.AsyncProcessFunction { + public find_next_compact() { + super("find_next_compact"); } - public get_current_notificationEventId_args getEmptyArgsInstance() { - return new get_current_notificationEventId_args(); + public find_next_compact_args getEmptyArgsInstance() { + return new find_next_compact_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(CurrentNotificationEventId o) { - get_current_notificationEventId_result result = new get_current_notificationEventId_result(); + return new AsyncMethodCallback() { + public void onComplete(OptionalCompactionInfoStruct o) { + find_next_compact_result result = new find_next_compact_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -30762,58 +31381,13 @@ public void onComplete(CurrentNotificationEventId o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - get_current_notificationEventId_result result = new get_current_notificationEventId_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_current_notificationEventId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_current_notificationEventId(resultHandler); - } - } - - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_notification_events_count extends org.apache.thrift.AsyncProcessFunction { - public get_notification_events_count() { - super("get_notification_events_count"); - } - - public get_notification_events_count_args getEmptyArgsInstance() { - return new get_notification_events_count_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(NotificationEventsCountResponse o) { - get_notification_events_count_result result = new get_notification_events_count_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + find_next_compact_result result = new find_next_compact_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_notification_events_count_result result = new get_notification_events_count_result(); + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -30833,26 +31407,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, get_notification_events_count_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_notification_events_count(args.rqst,resultHandler); + public void start(I iface, find_next_compact_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.find_next_compact(args.workerId,resultHandler); } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class fire_listener_event extends org.apache.thrift.AsyncProcessFunction { - public fire_listener_event() { - super("fire_listener_event"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_compaction_highest_writeid extends org.apache.thrift.AsyncProcessFunction { + public set_compaction_highest_writeid() { + super("set_compaction_highest_writeid"); } - public fire_listener_event_args getEmptyArgsInstance() { - return new fire_listener_event_args(); + public set_compaction_highest_writeid_args getEmptyArgsInstance() { + return new set_compaction_highest_writeid_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(FireEventResponse o) { - fire_listener_event_result result = new fire_listener_event_result(); - result.success = o; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + set_compaction_highest_writeid_result result = new set_compaction_highest_writeid_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -30864,7 +31437,7 @@ public void onComplete(FireEventResponse o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - fire_listener_event_result result = new fire_listener_event_result(); + set_compaction_highest_writeid_result result = new set_compaction_highest_writeid_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -30884,25 +31457,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, fire_listener_event_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.fire_listener_event(args.rqst,resultHandler); + public void start(I iface, set_compaction_highest_writeid_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.set_compaction_highest_writeid(args.cr, args.high_watermark,resultHandler); } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class flushCache extends org.apache.thrift.AsyncProcessFunction { - public flushCache() { - super("flushCache"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_run_as extends org.apache.thrift.AsyncProcessFunction { + public set_run_as() { + super("set_run_as"); } - public flushCache_args getEmptyArgsInstance() { - return new flushCache_args(); + public set_run_as_args getEmptyArgsInstance() { + return new set_run_as_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Void o) { - flushCache_result result = new flushCache_result(); + set_run_as_result result = new set_run_as_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -30914,7 +31487,7 @@ public void onComplete(Void o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - flushCache_result result = new flushCache_result(); + set_run_as_result result = new set_run_as_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -30934,25 +31507,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, flushCache_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.flushCache(resultHandler); + public void start(I iface, set_run_as_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.set_run_as(args.cq_id, args.user,resultHandler); } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_write_notification_log extends org.apache.thrift.AsyncProcessFunction { - public add_write_notification_log() { - super("add_write_notification_log"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_columns_with_stats extends org.apache.thrift.AsyncProcessFunction> { + public find_columns_with_stats() { + super("find_columns_with_stats"); } - public add_write_notification_log_args getEmptyArgsInstance() { - return new add_write_notification_log_args(); + public find_columns_with_stats_args getEmptyArgsInstance() { + return new find_columns_with_stats_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(WriteNotificationLogResponse o) { - add_write_notification_log_result result = new add_write_notification_log_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + find_columns_with_stats_result result = new find_columns_with_stats_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -30965,7 +31538,7 @@ public void onComplete(WriteNotificationLogResponse o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - add_write_notification_log_result result = new add_write_notification_log_result(); + find_columns_with_stats_result result = new find_columns_with_stats_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -30985,26 +31558,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, add_write_notification_log_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_write_notification_log(args.rqst,resultHandler); + public void start(I iface, find_columns_with_stats_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.find_columns_with_stats(args.cr,resultHandler); } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class cm_recycle extends org.apache.thrift.AsyncProcessFunction { - public cm_recycle() { - super("cm_recycle"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_cleaned extends org.apache.thrift.AsyncProcessFunction { + public mark_cleaned() { + super("mark_cleaned"); } - public cm_recycle_args getEmptyArgsInstance() { - return new cm_recycle_args(); + public mark_cleaned_args getEmptyArgsInstance() { + return new mark_cleaned_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(CmRecycleResponse o) { - cm_recycle_result result = new cm_recycle_result(); - result.success = o; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + mark_cleaned_result result = new mark_cleaned_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; @@ -31016,7 +31588,531 @@ public void onComplete(CmRecycleResponse o) { public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - cm_recycle_result result = new cm_recycle_result(); + mark_cleaned_result result = new mark_cleaned_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, mark_cleaned_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.mark_cleaned(args.cr,resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_compacted extends org.apache.thrift.AsyncProcessFunction { + public mark_compacted() { + super("mark_compacted"); + } + + public mark_compacted_args getEmptyArgsInstance() { + return new mark_compacted_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + mark_compacted_result result = new mark_compacted_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + mark_compacted_result result = new mark_compacted_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, mark_compacted_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.mark_compacted(args.cr,resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_failed extends org.apache.thrift.AsyncProcessFunction { + public mark_failed() { + super("mark_failed"); + } + + public mark_failed_args getEmptyArgsInstance() { + return new mark_failed_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + mark_failed_result result = new mark_failed_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + mark_failed_result result = new mark_failed_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, mark_failed_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.mark_failed(args.cr,resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_hadoop_jobid extends org.apache.thrift.AsyncProcessFunction { + public set_hadoop_jobid() { + super("set_hadoop_jobid"); + } + + public set_hadoop_jobid_args getEmptyArgsInstance() { + return new set_hadoop_jobid_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + set_hadoop_jobid_result result = new set_hadoop_jobid_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + set_hadoop_jobid_result result = new set_hadoop_jobid_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, set_hadoop_jobid_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.set_hadoop_jobid(args.jobId, args.cq_id,resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_next_notification extends org.apache.thrift.AsyncProcessFunction { + public get_next_notification() { + super("get_next_notification"); + } + + public get_next_notification_args getEmptyArgsInstance() { + return new get_next_notification_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(NotificationEventResponse o) { + get_next_notification_result result = new get_next_notification_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_next_notification_result result = new get_next_notification_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_next_notification_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_next_notification(args.rqst,resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_current_notificationEventId extends org.apache.thrift.AsyncProcessFunction { + public get_current_notificationEventId() { + super("get_current_notificationEventId"); + } + + public get_current_notificationEventId_args getEmptyArgsInstance() { + return new get_current_notificationEventId_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(CurrentNotificationEventId o) { + get_current_notificationEventId_result result = new get_current_notificationEventId_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_current_notificationEventId_result result = new get_current_notificationEventId_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_current_notificationEventId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_current_notificationEventId(resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_notification_events_count extends org.apache.thrift.AsyncProcessFunction { + public get_notification_events_count() { + super("get_notification_events_count"); + } + + public get_notification_events_count_args getEmptyArgsInstance() { + return new get_notification_events_count_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(NotificationEventsCountResponse o) { + get_notification_events_count_result result = new get_notification_events_count_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_notification_events_count_result result = new get_notification_events_count_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_notification_events_count_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_notification_events_count(args.rqst,resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class fire_listener_event extends org.apache.thrift.AsyncProcessFunction { + public fire_listener_event() { + super("fire_listener_event"); + } + + public fire_listener_event_args getEmptyArgsInstance() { + return new fire_listener_event_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(FireEventResponse o) { + fire_listener_event_result result = new fire_listener_event_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + fire_listener_event_result result = new fire_listener_event_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, fire_listener_event_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.fire_listener_event(args.rqst,resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class flushCache extends org.apache.thrift.AsyncProcessFunction { + public flushCache() { + super("flushCache"); + } + + public flushCache_args getEmptyArgsInstance() { + return new flushCache_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + flushCache_result result = new flushCache_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + flushCache_result result = new flushCache_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, flushCache_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.flushCache(resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_write_notification_log extends org.apache.thrift.AsyncProcessFunction { + public add_write_notification_log() { + super("add_write_notification_log"); + } + + public add_write_notification_log_args getEmptyArgsInstance() { + return new add_write_notification_log_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(WriteNotificationLogResponse o) { + add_write_notification_log_result result = new add_write_notification_log_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_write_notification_log_result result = new add_write_notification_log_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_write_notification_log_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_write_notification_log(args.rqst,resultHandler); + } + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class cm_recycle extends org.apache.thrift.AsyncProcessFunction { + public cm_recycle() { + super("cm_recycle"); + } + + public cm_recycle_args getEmptyArgsInstance() { + return new cm_recycle_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(CmRecycleResponse o) { + cm_recycle_result result = new cm_recycle_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + cm_recycle_result result = new cm_recycle_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); @@ -199687,15 +200783,5953 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class heartbeat_resultStandardSchemeFactory implements SchemeFactory { - public heartbeat_resultStandardScheme getScheme() { - return new heartbeat_resultStandardScheme(); + private static class heartbeat_resultStandardSchemeFactory implements SchemeFactory { + public heartbeat_resultStandardScheme getScheme() { + return new heartbeat_resultStandardScheme(); + } + } + + private static class heartbeat_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchLockException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchTxnException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new TxnAbortedException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class heartbeat_resultTupleSchemeFactory implements SchemeFactory { + public heartbeat_resultTupleScheme getScheme() { + return new heartbeat_resultTupleScheme(); + } + } + + private static class heartbeat_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.o1 = new NoSuchLockException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new NoSuchTxnException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new TxnAbortedException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class heartbeat_txn_range_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_args"); + + private static final org.apache.thrift.protocol.TField TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("txns", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new heartbeat_txn_range_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new heartbeat_txn_range_argsTupleSchemeFactory()); + } + + private HeartbeatTxnRangeRequest txns; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TXNS((short)1, "txns"); + + private static final Map byName = new HashMap(); + + 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: // TXNS + return TXNS; + 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.TXNS, new org.apache.thrift.meta_data.FieldMetaData("txns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_args.class, metaDataMap); + } + + public heartbeat_txn_range_args() { + } + + public heartbeat_txn_range_args( + HeartbeatTxnRangeRequest txns) + { + this(); + this.txns = txns; + } + + /** + * Performs a deep copy on other. + */ + public heartbeat_txn_range_args(heartbeat_txn_range_args other) { + if (other.isSetTxns()) { + this.txns = new HeartbeatTxnRangeRequest(other.txns); + } + } + + public heartbeat_txn_range_args deepCopy() { + return new heartbeat_txn_range_args(this); + } + + @Override + public void clear() { + this.txns = null; + } + + public HeartbeatTxnRangeRequest getTxns() { + return this.txns; + } + + public void setTxns(HeartbeatTxnRangeRequest txns) { + this.txns = txns; + } + + public void unsetTxns() { + this.txns = null; + } + + /** Returns true if field txns is set (has been assigned a value) and false otherwise */ + public boolean isSetTxns() { + return this.txns != null; + } + + public void setTxnsIsSet(boolean value) { + if (!value) { + this.txns = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXNS: + if (value == null) { + unsetTxns(); + } else { + setTxns((HeartbeatTxnRangeRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXNS: + return getTxns(); + + } + 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 TXNS: + return isSetTxns(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof heartbeat_txn_range_args) + return this.equals((heartbeat_txn_range_args)that); + return false; + } + + public boolean equals(heartbeat_txn_range_args that) { + if (that == null) + return false; + + boolean this_present_txns = true && this.isSetTxns(); + boolean that_present_txns = true && that.isSetTxns(); + if (this_present_txns || that_present_txns) { + if (!(this_present_txns && that_present_txns)) + return false; + if (!this.txns.equals(that.txns)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txns = true && (isSetTxns()); + list.add(present_txns); + if (present_txns) + list.add(txns); + + return list.hashCode(); + } + + @Override + public int compareTo(heartbeat_txn_range_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxns()).compareTo(other.isSetTxns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txns, other.txns); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("heartbeat_txn_range_args("); + boolean first = true; + + sb.append("txns:"); + if (this.txns == null) { + sb.append("null"); + } else { + sb.append(this.txns); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (txns != null) { + txns.validate(); + } + } + + 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); + } + } + + private static class heartbeat_txn_range_argsStandardSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_argsStandardScheme getScheme() { + return new heartbeat_txn_range_argsStandardScheme(); + } + } + + private static class heartbeat_txn_range_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TXNS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.txns = new HeartbeatTxnRangeRequest(); + struct.txns.read(iprot); + struct.setTxnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.txns != null) { + oprot.writeFieldBegin(TXNS_FIELD_DESC); + struct.txns.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class heartbeat_txn_range_argsTupleSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_argsTupleScheme getScheme() { + return new heartbeat_txn_range_argsTupleScheme(); + } + } + + private static class heartbeat_txn_range_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTxns()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTxns()) { + struct.txns.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.txns = new HeartbeatTxnRangeRequest(); + struct.txns.read(iprot); + struct.setTxnsIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class heartbeat_txn_range_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new heartbeat_txn_range_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new heartbeat_txn_range_resultTupleSchemeFactory()); + } + + private HeartbeatTxnRangeResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + 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 0: // SUCCESS + return SUCCESS; + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_result.class, metaDataMap); + } + + public heartbeat_txn_range_result() { + } + + public heartbeat_txn_range_result( + HeartbeatTxnRangeResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public heartbeat_txn_range_result(heartbeat_txn_range_result other) { + if (other.isSetSuccess()) { + this.success = new HeartbeatTxnRangeResponse(other.success); + } + } + + public heartbeat_txn_range_result deepCopy() { + return new heartbeat_txn_range_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public HeartbeatTxnRangeResponse getSuccess() { + return this.success; + } + + public void setSuccess(HeartbeatTxnRangeResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((HeartbeatTxnRangeResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + 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 SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof heartbeat_txn_range_result) + return this.equals((heartbeat_txn_range_result)that); + return false; + } + + public boolean equals(heartbeat_txn_range_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(heartbeat_txn_range_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("heartbeat_txn_range_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + 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); + } + } + + private static class heartbeat_txn_range_resultStandardSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_resultStandardScheme getScheme() { + return new heartbeat_txn_range_resultStandardScheme(); + } + } + + private static class heartbeat_txn_range_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new HeartbeatTxnRangeResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class heartbeat_txn_range_resultTupleSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_resultTupleScheme getScheme() { + return new heartbeat_txn_range_resultTupleScheme(); + } + } + + private static class heartbeat_txn_range_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new HeartbeatTxnRangeResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory()); + } + + private CompactionRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + 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: // RQST + return RQST; + 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); + } + + public compact_args() { + } + + public compact_args( + CompactionRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public compact_args(compact_args other) { + if (other.isSetRqst()) { + this.rqst = new CompactionRequest(other.rqst); + } + } + + public compact_args deepCopy() { + return new compact_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public CompactionRequest getRqst() { + return this.rqst; + } + + public void setRqst(CompactionRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((CompactionRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + 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 RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact_args) + return this.equals((compact_args)that); + return false; + } + + public boolean equals(compact_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(compact_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("compact_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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); + } + } + + private static class compact_argsStandardSchemeFactory implements SchemeFactory { + public compact_argsStandardScheme getScheme() { + return new compact_argsStandardScheme(); + } + } + + private static class compact_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, compact_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact_argsTupleSchemeFactory implements SchemeFactory { + public compact_argsTupleScheme getScheme() { + return new compact_argsTupleScheme(); + } + } + + private static class compact_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact_resultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + 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) { + 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; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); + } + + public compact_result() { + } + + /** + * Performs a deep copy on other. + */ + public compact_result(compact_result other) { + } + + public compact_result deepCopy() { + return new compact_result(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + 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) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact_result) + return this.equals((compact_result)that); + return false; + } + + public boolean equals(compact_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(compact_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("compact_result("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + 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); + } + } + + private static class compact_resultStandardSchemeFactory implements SchemeFactory { + public compact_resultStandardScheme getScheme() { + return new compact_resultStandardScheme(); + } + } + + private static class compact_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, compact_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact_resultTupleSchemeFactory implements SchemeFactory { + public compact_resultTupleScheme getScheme() { + return new compact_resultTupleScheme(); + } + } + + private static class compact_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class compact2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact2_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact2_argsTupleSchemeFactory()); + } + + private CompactionRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + 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: // RQST + return RQST; + 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_args.class, metaDataMap); + } + + public compact2_args() { + } + + public compact2_args( + CompactionRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public compact2_args(compact2_args other) { + if (other.isSetRqst()) { + this.rqst = new CompactionRequest(other.rqst); + } + } + + public compact2_args deepCopy() { + return new compact2_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public CompactionRequest getRqst() { + return this.rqst; + } + + public void setRqst(CompactionRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((CompactionRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + 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 RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact2_args) + return this.equals((compact2_args)that); + return false; + } + + public boolean equals(compact2_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(compact2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("compact2_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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); + } + } + + private static class compact2_argsStandardSchemeFactory implements SchemeFactory { + public compact2_argsStandardScheme getScheme() { + return new compact2_argsStandardScheme(); + } + } + + private static class compact2_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, compact2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact2_argsTupleSchemeFactory implements SchemeFactory { + public compact2_argsTupleScheme getScheme() { + return new compact2_argsTupleScheme(); + } + } + + private static class compact2_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class compact2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact2_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact2_resultTupleSchemeFactory()); + } + + private CompactionResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + 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 0: // SUCCESS + return SUCCESS; + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_result.class, metaDataMap); + } + + public compact2_result() { + } + + public compact2_result( + CompactionResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public compact2_result(compact2_result other) { + if (other.isSetSuccess()) { + this.success = new CompactionResponse(other.success); + } + } + + public compact2_result deepCopy() { + return new compact2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public CompactionResponse getSuccess() { + return this.success; + } + + public void setSuccess(CompactionResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((CompactionResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + 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 SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact2_result) + return this.equals((compact2_result)that); + return false; + } + + public boolean equals(compact2_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(compact2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("compact2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + 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); + } + } + + private static class compact2_resultStandardSchemeFactory implements SchemeFactory { + public compact2_resultStandardScheme getScheme() { + return new compact2_resultStandardScheme(); + } + } + + private static class compact2_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new CompactionResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, compact2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact2_resultTupleSchemeFactory implements SchemeFactory { + public compact2_resultTupleScheme getScheme() { + return new compact2_resultTupleScheme(); + } + } + + private static class compact2_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new CompactionResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class show_compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new show_compact_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new show_compact_argsTupleSchemeFactory()); + } + + private ShowCompactRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + 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: // RQST + return RQST; + 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_args.class, metaDataMap); + } + + public show_compact_args() { + } + + public show_compact_args( + ShowCompactRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public show_compact_args(show_compact_args other) { + if (other.isSetRqst()) { + this.rqst = new ShowCompactRequest(other.rqst); + } + } + + public show_compact_args deepCopy() { + return new show_compact_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public ShowCompactRequest getRqst() { + return this.rqst; + } + + public void setRqst(ShowCompactRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((ShowCompactRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + 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 RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof show_compact_args) + return this.equals((show_compact_args)that); + return false; + } + + public boolean equals(show_compact_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(show_compact_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("show_compact_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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); + } + } + + private static class show_compact_argsStandardSchemeFactory implements SchemeFactory { + public show_compact_argsStandardScheme getScheme() { + return new show_compact_argsStandardScheme(); + } + } + + private static class show_compact_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new ShowCompactRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, show_compact_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class show_compact_argsTupleSchemeFactory implements SchemeFactory { + public show_compact_argsTupleScheme getScheme() { + return new show_compact_argsTupleScheme(); + } + } + + private static class show_compact_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new ShowCompactRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class show_compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new show_compact_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new show_compact_resultTupleSchemeFactory()); + } + + private ShowCompactResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + 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 0: // SUCCESS + return SUCCESS; + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_result.class, metaDataMap); + } + + public show_compact_result() { + } + + public show_compact_result( + ShowCompactResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public show_compact_result(show_compact_result other) { + if (other.isSetSuccess()) { + this.success = new ShowCompactResponse(other.success); + } + } + + public show_compact_result deepCopy() { + return new show_compact_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public ShowCompactResponse getSuccess() { + return this.success; + } + + public void setSuccess(ShowCompactResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((ShowCompactResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + 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 SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof show_compact_result) + return this.equals((show_compact_result)that); + return false; + } + + public boolean equals(show_compact_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(show_compact_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("show_compact_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + 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); + } + } + + private static class show_compact_resultStandardSchemeFactory implements SchemeFactory { + public show_compact_resultStandardScheme getScheme() { + return new show_compact_resultStandardScheme(); + } + } + + private static class show_compact_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new ShowCompactResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, show_compact_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class show_compact_resultTupleSchemeFactory implements SchemeFactory { + public show_compact_resultTupleScheme getScheme() { + return new show_compact_resultTupleScheme(); + } + } + + private static class show_compact_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new ShowCompactResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_dynamic_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_dynamic_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_dynamic_partitions_argsTupleSchemeFactory()); + } + + private AddDynamicPartitions rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + 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: // RQST + return RQST; + 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddDynamicPartitions.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_args.class, metaDataMap); + } + + public add_dynamic_partitions_args() { + } + + public add_dynamic_partitions_args( + AddDynamicPartitions rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public add_dynamic_partitions_args(add_dynamic_partitions_args other) { + if (other.isSetRqst()) { + this.rqst = new AddDynamicPartitions(other.rqst); + } + } + + public add_dynamic_partitions_args deepCopy() { + return new add_dynamic_partitions_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public AddDynamicPartitions getRqst() { + return this.rqst; + } + + public void setRqst(AddDynamicPartitions rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((AddDynamicPartitions)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + 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 RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_dynamic_partitions_args) + return this.equals((add_dynamic_partitions_args)that); + return false; + } + + public boolean equals(add_dynamic_partitions_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(add_dynamic_partitions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_dynamic_partitions_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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); + } + } + + private static class add_dynamic_partitions_argsStandardSchemeFactory implements SchemeFactory { + public add_dynamic_partitions_argsStandardScheme getScheme() { + return new add_dynamic_partitions_argsStandardScheme(); + } + } + + private static class add_dynamic_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new AddDynamicPartitions(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_dynamic_partitions_argsTupleSchemeFactory implements SchemeFactory { + public add_dynamic_partitions_argsTupleScheme getScheme() { + return new add_dynamic_partitions_argsTupleScheme(); + } + } + + private static class add_dynamic_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new AddDynamicPartitions(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_dynamic_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_result"); + + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_dynamic_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_dynamic_partitions_resultTupleSchemeFactory()); + } + + private NoSuchTxnException o1; // required + private TxnAbortedException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + 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: // O1 + return O1; + case 2: // O2 + return O2; + 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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_result.class, metaDataMap); + } + + public add_dynamic_partitions_result() { + } + + public add_dynamic_partitions_result( + NoSuchTxnException o1, + TxnAbortedException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public add_dynamic_partitions_result(add_dynamic_partitions_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchTxnException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new TxnAbortedException(other.o2); + } + } + + public add_dynamic_partitions_result deepCopy() { + return new add_dynamic_partitions_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchTxnException getO1() { + return this.o1; + } + + public void setO1(NoSuchTxnException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public TxnAbortedException getO2() { + return this.o2; + } + + public void setO2(TxnAbortedException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchTxnException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((TxnAbortedException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + 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 O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_dynamic_partitions_result) + return this.equals((add_dynamic_partitions_result)that); + return false; + } + + public boolean equals(add_dynamic_partitions_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(add_dynamic_partitions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_dynamic_partitions_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + 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); + } + } + + private static class add_dynamic_partitions_resultStandardSchemeFactory implements SchemeFactory { + public add_dynamic_partitions_resultStandardScheme getScheme() { + return new add_dynamic_partitions_resultStandardScheme(); + } + } + + private static class add_dynamic_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchTxnException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new TxnAbortedException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_dynamic_partitions_resultTupleSchemeFactory implements SchemeFactory { + public add_dynamic_partitions_resultTupleScheme getScheme() { + return new add_dynamic_partitions_resultTupleScheme(); + } + } + + private static class add_dynamic_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new NoSuchTxnException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new TxnAbortedException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_next_compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("find_next_compact_args"); + + private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new find_next_compact_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new find_next_compact_argsTupleSchemeFactory()); + } + + private String workerId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + WORKER_ID((short)1, "workerId"); + + private static final Map byName = new HashMap(); + + 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: // WORKER_ID + return WORKER_ID; + 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.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", 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(find_next_compact_args.class, metaDataMap); + } + + public find_next_compact_args() { + } + + public find_next_compact_args( + String workerId) + { + this(); + this.workerId = workerId; + } + + /** + * Performs a deep copy on other. + */ + public find_next_compact_args(find_next_compact_args other) { + if (other.isSetWorkerId()) { + this.workerId = other.workerId; + } + } + + public find_next_compact_args deepCopy() { + return new find_next_compact_args(this); + } + + @Override + public void clear() { + this.workerId = null; + } + + public String getWorkerId() { + return this.workerId; + } + + public void setWorkerId(String workerId) { + this.workerId = workerId; + } + + public void unsetWorkerId() { + this.workerId = null; + } + + /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ + public boolean isSetWorkerId() { + return this.workerId != null; + } + + public void setWorkerIdIsSet(boolean value) { + if (!value) { + this.workerId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case WORKER_ID: + if (value == null) { + unsetWorkerId(); + } else { + setWorkerId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case WORKER_ID: + return getWorkerId(); + + } + 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 WORKER_ID: + return isSetWorkerId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof find_next_compact_args) + return this.equals((find_next_compact_args)that); + return false; + } + + public boolean equals(find_next_compact_args that) { + if (that == null) + return false; + + boolean this_present_workerId = true && this.isSetWorkerId(); + boolean that_present_workerId = true && that.isSetWorkerId(); + if (this_present_workerId || that_present_workerId) { + if (!(this_present_workerId && that_present_workerId)) + return false; + if (!this.workerId.equals(that.workerId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_workerId = true && (isSetWorkerId()); + list.add(present_workerId); + if (present_workerId) + list.add(workerId); + + return list.hashCode(); + } + + @Override + public int compareTo(find_next_compact_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWorkerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("find_next_compact_args("); + boolean first = true; + + sb.append("workerId:"); + if (this.workerId == null) { + sb.append("null"); + } else { + sb.append(this.workerId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + 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); + } + } + + private static class find_next_compact_argsStandardSchemeFactory implements SchemeFactory { + public find_next_compact_argsStandardScheme getScheme() { + return new find_next_compact_argsStandardScheme(); + } + } + + private static class find_next_compact_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, find_next_compact_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // WORKER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.workerId = iprot.readString(); + struct.setWorkerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, find_next_compact_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.workerId != null) { + oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); + oprot.writeString(struct.workerId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class find_next_compact_argsTupleSchemeFactory implements SchemeFactory { + public find_next_compact_argsTupleScheme getScheme() { + return new find_next_compact_argsTupleScheme(); + } + } + + private static class find_next_compact_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, find_next_compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetWorkerId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetWorkerId()) { + oprot.writeString(struct.workerId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, find_next_compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.workerId = iprot.readString(); + struct.setWorkerIdIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_next_compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("find_next_compact_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new find_next_compact_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new find_next_compact_resultTupleSchemeFactory()); + } + + private OptionalCompactionInfoStruct success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + 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 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalCompactionInfoStruct.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(find_next_compact_result.class, metaDataMap); + } + + public find_next_compact_result() { + } + + public find_next_compact_result( + OptionalCompactionInfoStruct success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public find_next_compact_result(find_next_compact_result other) { + if (other.isSetSuccess()) { + this.success = new OptionalCompactionInfoStruct(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public find_next_compact_result deepCopy() { + return new find_next_compact_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public OptionalCompactionInfoStruct getSuccess() { + return this.success; + } + + public void setSuccess(OptionalCompactionInfoStruct success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((OptionalCompactionInfoStruct)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + 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 SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof find_next_compact_result) + return this.equals((find_next_compact_result)that); + return false; + } + + public boolean equals(find_next_compact_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(find_next_compact_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("find_next_compact_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + 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); + } + } + + private static class find_next_compact_resultStandardSchemeFactory implements SchemeFactory { + public find_next_compact_resultStandardScheme getScheme() { + return new find_next_compact_resultStandardScheme(); + } + } + + private static class find_next_compact_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, find_next_compact_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new OptionalCompactionInfoStruct(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, find_next_compact_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class find_next_compact_resultTupleSchemeFactory implements SchemeFactory { + public find_next_compact_resultTupleScheme getScheme() { + return new find_next_compact_resultTupleScheme(); + } + } + + private static class find_next_compact_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, find_next_compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, find_next_compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new OptionalCompactionInfoStruct(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_compaction_highest_writeid_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_compaction_highest_writeid_args"); + + private static final org.apache.thrift.protocol.TField CR_FIELD_DESC = new org.apache.thrift.protocol.TField("cr", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField HIGH_WATERMARK_FIELD_DESC = new org.apache.thrift.protocol.TField("high_watermark", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_compaction_highest_writeid_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_compaction_highest_writeid_argsTupleSchemeFactory()); + } + + private CompactionInfoStruct cr; // required + private long high_watermark; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + CR((short)1, "cr"), + HIGH_WATERMARK((short)2, "high_watermark"); + + private static final Map byName = new HashMap(); + + 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: // CR + return CR; + case 2: // HIGH_WATERMARK + return HIGH_WATERMARK; + 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 + private static final int __HIGH_WATERMARK_ISSET_ID = 0; + private byte __isset_bitfield = 0; + 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.CR, new org.apache.thrift.meta_data.FieldMetaData("cr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionInfoStruct.class))); + tmpMap.put(_Fields.HIGH_WATERMARK, new org.apache.thrift.meta_data.FieldMetaData("high_watermark", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_compaction_highest_writeid_args.class, metaDataMap); + } + + public set_compaction_highest_writeid_args() { + } + + public set_compaction_highest_writeid_args( + CompactionInfoStruct cr, + long high_watermark) + { + this(); + this.cr = cr; + this.high_watermark = high_watermark; + setHigh_watermarkIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public set_compaction_highest_writeid_args(set_compaction_highest_writeid_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetCr()) { + this.cr = new CompactionInfoStruct(other.cr); + } + this.high_watermark = other.high_watermark; + } + + public set_compaction_highest_writeid_args deepCopy() { + return new set_compaction_highest_writeid_args(this); + } + + @Override + public void clear() { + this.cr = null; + setHigh_watermarkIsSet(false); + this.high_watermark = 0; + } + + public CompactionInfoStruct getCr() { + return this.cr; + } + + public void setCr(CompactionInfoStruct cr) { + this.cr = cr; + } + + public void unsetCr() { + this.cr = null; + } + + /** Returns true if field cr is set (has been assigned a value) and false otherwise */ + public boolean isSetCr() { + return this.cr != null; + } + + public void setCrIsSet(boolean value) { + if (!value) { + this.cr = null; + } + } + + public long getHigh_watermark() { + return this.high_watermark; + } + + public void setHigh_watermark(long high_watermark) { + this.high_watermark = high_watermark; + setHigh_watermarkIsSet(true); + } + + public void unsetHigh_watermark() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGH_WATERMARK_ISSET_ID); + } + + /** Returns true if field high_watermark is set (has been assigned a value) and false otherwise */ + public boolean isSetHigh_watermark() { + return EncodingUtils.testBit(__isset_bitfield, __HIGH_WATERMARK_ISSET_ID); + } + + public void setHigh_watermarkIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGH_WATERMARK_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case CR: + if (value == null) { + unsetCr(); + } else { + setCr((CompactionInfoStruct)value); + } + break; + + case HIGH_WATERMARK: + if (value == null) { + unsetHigh_watermark(); + } else { + setHigh_watermark((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case CR: + return getCr(); + + case HIGH_WATERMARK: + return getHigh_watermark(); + + } + 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 CR: + return isSetCr(); + case HIGH_WATERMARK: + return isSetHigh_watermark(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof set_compaction_highest_writeid_args) + return this.equals((set_compaction_highest_writeid_args)that); + return false; + } + + public boolean equals(set_compaction_highest_writeid_args that) { + if (that == null) + return false; + + boolean this_present_cr = true && this.isSetCr(); + boolean that_present_cr = true && that.isSetCr(); + if (this_present_cr || that_present_cr) { + if (!(this_present_cr && that_present_cr)) + return false; + if (!this.cr.equals(that.cr)) + return false; + } + + boolean this_present_high_watermark = true; + boolean that_present_high_watermark = true; + if (this_present_high_watermark || that_present_high_watermark) { + if (!(this_present_high_watermark && that_present_high_watermark)) + return false; + if (this.high_watermark != that.high_watermark) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_cr = true && (isSetCr()); + list.add(present_cr); + if (present_cr) + list.add(cr); + + boolean present_high_watermark = true; + list.add(present_high_watermark); + if (present_high_watermark) + list.add(high_watermark); + + return list.hashCode(); + } + + @Override + public int compareTo(set_compaction_highest_writeid_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetCr()).compareTo(other.isSetCr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cr, other.cr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHigh_watermark()).compareTo(other.isSetHigh_watermark()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHigh_watermark()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.high_watermark, other.high_watermark); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("set_compaction_highest_writeid_args("); + boolean first = true; + + sb.append("cr:"); + if (this.cr == null) { + sb.append("null"); + } else { + sb.append(this.cr); + } + first = false; + if (!first) sb.append(", "); + sb.append("high_watermark:"); + sb.append(this.high_watermark); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (cr != null) { + cr.validate(); + } + } + + 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 { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class set_compaction_highest_writeid_argsStandardSchemeFactory implements SchemeFactory { + public set_compaction_highest_writeid_argsStandardScheme getScheme() { + return new set_compaction_highest_writeid_argsStandardScheme(); + } + } + + private static class set_compaction_highest_writeid_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_compaction_highest_writeid_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // CR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HIGH_WATERMARK + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.high_watermark = iprot.readI64(); + struct.setHigh_watermarkIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, set_compaction_highest_writeid_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.cr != null) { + oprot.writeFieldBegin(CR_FIELD_DESC); + struct.cr.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(HIGH_WATERMARK_FIELD_DESC); + oprot.writeI64(struct.high_watermark); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_compaction_highest_writeid_argsTupleSchemeFactory implements SchemeFactory { + public set_compaction_highest_writeid_argsTupleScheme getScheme() { + return new set_compaction_highest_writeid_argsTupleScheme(); + } + } + + private static class set_compaction_highest_writeid_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_compaction_highest_writeid_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetCr()) { + optionals.set(0); + } + if (struct.isSetHigh_watermark()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetCr()) { + struct.cr.write(oprot); + } + if (struct.isSetHigh_watermark()) { + oprot.writeI64(struct.high_watermark); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_compaction_highest_writeid_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); + } + if (incoming.get(1)) { + struct.high_watermark = iprot.readI64(); + struct.setHigh_watermarkIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_compaction_highest_writeid_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_compaction_highest_writeid_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_compaction_highest_writeid_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_compaction_highest_writeid_resultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + 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) { + 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; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_compaction_highest_writeid_result.class, metaDataMap); + } + + public set_compaction_highest_writeid_result() { + } + + /** + * Performs a deep copy on other. + */ + public set_compaction_highest_writeid_result(set_compaction_highest_writeid_result other) { + } + + public set_compaction_highest_writeid_result deepCopy() { + return new set_compaction_highest_writeid_result(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + 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) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof set_compaction_highest_writeid_result) + return this.equals((set_compaction_highest_writeid_result)that); + return false; + } + + public boolean equals(set_compaction_highest_writeid_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(set_compaction_highest_writeid_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("set_compaction_highest_writeid_result("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + 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); + } + } + + private static class set_compaction_highest_writeid_resultStandardSchemeFactory implements SchemeFactory { + public set_compaction_highest_writeid_resultStandardScheme getScheme() { + return new set_compaction_highest_writeid_resultStandardScheme(); + } + } + + private static class set_compaction_highest_writeid_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_compaction_highest_writeid_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, set_compaction_highest_writeid_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_compaction_highest_writeid_resultTupleSchemeFactory implements SchemeFactory { + public set_compaction_highest_writeid_resultTupleScheme getScheme() { + return new set_compaction_highest_writeid_resultTupleScheme(); + } + } + + private static class set_compaction_highest_writeid_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_compaction_highest_writeid_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_compaction_highest_writeid_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_run_as_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_run_as_args"); + + private static final org.apache.thrift.protocol.TField CQ_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cq_id", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_run_as_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_run_as_argsTupleSchemeFactory()); + } + + private long cq_id; // required + private String user; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + CQ_ID((short)1, "cq_id"), + USER((short)2, "user"); + + private static final Map byName = new HashMap(); + + 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: // CQ_ID + return CQ_ID; + case 2: // USER + return USER; + 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 + private static final int __CQ_ID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + 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.CQ_ID, new org.apache.thrift.meta_data.FieldMetaData("cq_id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", 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(set_run_as_args.class, metaDataMap); + } + + public set_run_as_args() { + } + + public set_run_as_args( + long cq_id, + String user) + { + this(); + this.cq_id = cq_id; + setCq_idIsSet(true); + this.user = user; + } + + /** + * Performs a deep copy on other. + */ + public set_run_as_args(set_run_as_args other) { + __isset_bitfield = other.__isset_bitfield; + this.cq_id = other.cq_id; + if (other.isSetUser()) { + this.user = other.user; + } + } + + public set_run_as_args deepCopy() { + return new set_run_as_args(this); + } + + @Override + public void clear() { + setCq_idIsSet(false); + this.cq_id = 0; + this.user = null; + } + + public long getCq_id() { + return this.cq_id; + } + + public void setCq_id(long cq_id) { + this.cq_id = cq_id; + setCq_idIsSet(true); + } + + public void unsetCq_id() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CQ_ID_ISSET_ID); + } + + /** Returns true if field cq_id is set (has been assigned a value) and false otherwise */ + public boolean isSetCq_id() { + return EncodingUtils.testBit(__isset_bitfield, __CQ_ID_ISSET_ID); + } + + public void setCq_idIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CQ_ID_ISSET_ID, value); + } + + public String getUser() { + return this.user; + } + + public void setUser(String user) { + this.user = user; + } + + public void unsetUser() { + this.user = null; + } + + /** Returns true if field user is set (has been assigned a value) and false otherwise */ + public boolean isSetUser() { + return this.user != null; + } + + public void setUserIsSet(boolean value) { + if (!value) { + this.user = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case CQ_ID: + if (value == null) { + unsetCq_id(); + } else { + setCq_id((Long)value); + } + break; + + case USER: + if (value == null) { + unsetUser(); + } else { + setUser((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case CQ_ID: + return getCq_id(); + + case USER: + return getUser(); + + } + 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 CQ_ID: + return isSetCq_id(); + case USER: + return isSetUser(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof set_run_as_args) + return this.equals((set_run_as_args)that); + return false; + } + + public boolean equals(set_run_as_args that) { + if (that == null) + return false; + + boolean this_present_cq_id = true; + boolean that_present_cq_id = true; + if (this_present_cq_id || that_present_cq_id) { + if (!(this_present_cq_id && that_present_cq_id)) + return false; + if (this.cq_id != that.cq_id) + return false; + } + + boolean this_present_user = true && this.isSetUser(); + boolean that_present_user = true && that.isSetUser(); + if (this_present_user || that_present_user) { + if (!(this_present_user && that_present_user)) + return false; + if (!this.user.equals(that.user)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_cq_id = true; + list.add(present_cq_id); + if (present_cq_id) + list.add(cq_id); + + boolean present_user = true && (isSetUser()); + list.add(present_user); + if (present_user) + list.add(user); + + return list.hashCode(); + } + + @Override + public int compareTo(set_run_as_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetCq_id()).compareTo(other.isSetCq_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCq_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cq_id, other.cq_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("set_run_as_args("); + boolean first = true; + + sb.append("cq_id:"); + sb.append(this.cq_id); + first = false; + if (!first) sb.append(", "); + sb.append("user:"); + if (this.user == null) { + sb.append("null"); + } else { + sb.append(this.user); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + 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 { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class set_run_as_argsStandardSchemeFactory implements SchemeFactory { + public set_run_as_argsStandardScheme getScheme() { + return new set_run_as_argsStandardScheme(); + } + } + + private static class set_run_as_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_run_as_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // CQ_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.cq_id = iprot.readI64(); + struct.setCq_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // USER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user = iprot.readString(); + struct.setUserIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, set_run_as_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(CQ_ID_FIELD_DESC); + oprot.writeI64(struct.cq_id); + oprot.writeFieldEnd(); + if (struct.user != null) { + oprot.writeFieldBegin(USER_FIELD_DESC); + oprot.writeString(struct.user); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_run_as_argsTupleSchemeFactory implements SchemeFactory { + public set_run_as_argsTupleScheme getScheme() { + return new set_run_as_argsTupleScheme(); + } + } + + private static class set_run_as_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_run_as_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetCq_id()) { + optionals.set(0); + } + if (struct.isSetUser()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetCq_id()) { + oprot.writeI64(struct.cq_id); + } + if (struct.isSetUser()) { + oprot.writeString(struct.user); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_run_as_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.cq_id = iprot.readI64(); + struct.setCq_idIsSet(true); + } + if (incoming.get(1)) { + struct.user = iprot.readString(); + struct.setUserIsSet(true); + } + } + } + + } + + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_run_as_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_run_as_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_run_as_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_run_as_resultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + 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) { + 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; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_run_as_result.class, metaDataMap); + } + + public set_run_as_result() { + } + + /** + * Performs a deep copy on other. + */ + public set_run_as_result(set_run_as_result other) { + } + + public set_run_as_result deepCopy() { + return new set_run_as_result(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + 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) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof set_run_as_result) + return this.equals((set_run_as_result)that); + return false; + } + + public boolean equals(set_run_as_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(set_run_as_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + 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 { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("set_run_as_result("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + 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); + } + } + + private static class set_run_as_resultStandardSchemeFactory implements SchemeFactory { + public set_run_as_resultStandardScheme getScheme() { + return new set_run_as_resultStandardScheme(); } } - private static class heartbeat_resultStandardScheme extends StandardScheme { + private static class set_run_as_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, set_run_as_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -199705,33 +206739,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_result st break; } switch (schemeField.id) { - case 1: // O1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o1 = new NoSuchLockException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // O2 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o2 = new NoSuchTxnException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // O3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o3 = new TxnAbortedException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -199741,104 +206748,53 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_result st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, set_run_as_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.o1 != null) { - oprot.writeFieldBegin(O1_FIELD_DESC); - struct.o1.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.o2 != null) { - oprot.writeFieldBegin(O2_FIELD_DESC); - struct.o2.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.o3 != null) { - oprot.writeFieldBegin(O3_FIELD_DESC); - struct.o3.write(oprot); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class heartbeat_resultTupleSchemeFactory implements SchemeFactory { - public heartbeat_resultTupleScheme getScheme() { - return new heartbeat_resultTupleScheme(); + private static class set_run_as_resultTupleSchemeFactory implements SchemeFactory { + public set_run_as_resultTupleScheme getScheme() { + return new set_run_as_resultTupleScheme(); } } - private static class heartbeat_resultTupleScheme extends TupleScheme { + private static class set_run_as_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, set_run_as_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetO1()) { - optionals.set(0); - } - if (struct.isSetO2()) { - optionals.set(1); - } - if (struct.isSetO3()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - if (struct.isSetO2()) { - struct.o2.write(oprot); - } - if (struct.isSetO3()) { - struct.o3.write(oprot); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, set_run_as_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.o1 = new NoSuchLockException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - if (incoming.get(1)) { - struct.o2 = new NoSuchTxnException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - if (incoming.get(2)) { - struct.o3 = new TxnAbortedException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class heartbeat_txn_range_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_columns_with_stats_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("find_columns_with_stats_args"); - private static final org.apache.thrift.protocol.TField TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("txns", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField CR_FIELD_DESC = new org.apache.thrift.protocol.TField("cr", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new heartbeat_txn_range_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new heartbeat_txn_range_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new find_columns_with_stats_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new find_columns_with_stats_argsTupleSchemeFactory()); } - private HeartbeatTxnRangeRequest txns; // required + private CompactionInfoStruct cr; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TXNS((short)1, "txns"); + CR((short)1, "cr"); private static final Map byName = new HashMap(); @@ -199853,8 +206809,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_result str */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TXNS - return TXNS; + case 1: // CR + return CR; default: return null; } @@ -199898,70 +206854,70 @@ public String getFieldName() { 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.TXNS, new org.apache.thrift.meta_data.FieldMetaData("txns", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeRequest.class))); + tmpMap.put(_Fields.CR, new org.apache.thrift.meta_data.FieldMetaData("cr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionInfoStruct.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(find_columns_with_stats_args.class, metaDataMap); } - public heartbeat_txn_range_args() { + public find_columns_with_stats_args() { } - public heartbeat_txn_range_args( - HeartbeatTxnRangeRequest txns) + public find_columns_with_stats_args( + CompactionInfoStruct cr) { this(); - this.txns = txns; + this.cr = cr; } /** * Performs a deep copy on other. */ - public heartbeat_txn_range_args(heartbeat_txn_range_args other) { - if (other.isSetTxns()) { - this.txns = new HeartbeatTxnRangeRequest(other.txns); + public find_columns_with_stats_args(find_columns_with_stats_args other) { + if (other.isSetCr()) { + this.cr = new CompactionInfoStruct(other.cr); } } - public heartbeat_txn_range_args deepCopy() { - return new heartbeat_txn_range_args(this); + public find_columns_with_stats_args deepCopy() { + return new find_columns_with_stats_args(this); } @Override public void clear() { - this.txns = null; + this.cr = null; } - public HeartbeatTxnRangeRequest getTxns() { - return this.txns; + public CompactionInfoStruct getCr() { + return this.cr; } - public void setTxns(HeartbeatTxnRangeRequest txns) { - this.txns = txns; + public void setCr(CompactionInfoStruct cr) { + this.cr = cr; } - public void unsetTxns() { - this.txns = null; + public void unsetCr() { + this.cr = null; } - /** Returns true if field txns is set (has been assigned a value) and false otherwise */ - public boolean isSetTxns() { - return this.txns != null; + /** Returns true if field cr is set (has been assigned a value) and false otherwise */ + public boolean isSetCr() { + return this.cr != null; } - public void setTxnsIsSet(boolean value) { + public void setCrIsSet(boolean value) { if (!value) { - this.txns = null; + this.cr = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TXNS: + case CR: if (value == null) { - unsetTxns(); + unsetCr(); } else { - setTxns((HeartbeatTxnRangeRequest)value); + setCr((CompactionInfoStruct)value); } break; @@ -199970,8 +206926,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case TXNS: - return getTxns(); + case CR: + return getCr(); } throw new IllegalStateException(); @@ -199984,8 +206940,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case TXNS: - return isSetTxns(); + case CR: + return isSetCr(); } throw new IllegalStateException(); } @@ -199994,21 +206950,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof heartbeat_txn_range_args) - return this.equals((heartbeat_txn_range_args)that); + if (that instanceof find_columns_with_stats_args) + return this.equals((find_columns_with_stats_args)that); return false; } - public boolean equals(heartbeat_txn_range_args that) { + public boolean equals(find_columns_with_stats_args that) { if (that == null) return false; - boolean this_present_txns = true && this.isSetTxns(); - boolean that_present_txns = true && that.isSetTxns(); - if (this_present_txns || that_present_txns) { - if (!(this_present_txns && that_present_txns)) + boolean this_present_cr = true && this.isSetCr(); + boolean that_present_cr = true && that.isSetCr(); + if (this_present_cr || that_present_cr) { + if (!(this_present_cr && that_present_cr)) return false; - if (!this.txns.equals(that.txns)) + if (!this.cr.equals(that.cr)) return false; } @@ -200019,28 +206975,28 @@ public boolean equals(heartbeat_txn_range_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_txns = true && (isSetTxns()); - list.add(present_txns); - if (present_txns) - list.add(txns); + boolean present_cr = true && (isSetCr()); + list.add(present_cr); + if (present_cr) + list.add(cr); return list.hashCode(); } @Override - public int compareTo(heartbeat_txn_range_args other) { + public int compareTo(find_columns_with_stats_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTxns()).compareTo(other.isSetTxns()); + lastComparison = Boolean.valueOf(isSetCr()).compareTo(other.isSetCr()); if (lastComparison != 0) { return lastComparison; } - if (isSetTxns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txns, other.txns); + if (isSetCr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cr, other.cr); if (lastComparison != 0) { return lastComparison; } @@ -200062,14 +207018,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("heartbeat_txn_range_args("); + StringBuilder sb = new StringBuilder("find_columns_with_stats_args("); boolean first = true; - sb.append("txns:"); - if (this.txns == null) { + sb.append("cr:"); + if (this.cr == null) { sb.append("null"); } else { - sb.append(this.txns); + sb.append(this.cr); } first = false; sb.append(")"); @@ -200079,8 +207035,8 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (txns != null) { - txns.validate(); + if (cr != null) { + cr.validate(); } } @@ -200100,15 +207056,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class heartbeat_txn_range_argsStandardSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_argsStandardScheme getScheme() { - return new heartbeat_txn_range_argsStandardScheme(); + private static class find_columns_with_stats_argsStandardSchemeFactory implements SchemeFactory { + public find_columns_with_stats_argsStandardScheme getScheme() { + return new find_columns_with_stats_argsStandardScheme(); } } - private static class heartbeat_txn_range_argsStandardScheme extends StandardScheme { + private static class find_columns_with_stats_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, find_columns_with_stats_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -200118,11 +207074,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range break; } switch (schemeField.id) { - case 1: // TXNS + case 1: // CR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.txns = new HeartbeatTxnRangeRequest(); - struct.txns.read(iprot); - struct.setTxnsIsSet(true); + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -200136,13 +207092,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, find_columns_with_stats_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.txns != null) { - oprot.writeFieldBegin(TXNS_FIELD_DESC); - struct.txns.write(oprot); + if (struct.cr != null) { + oprot.writeFieldBegin(CR_FIELD_DESC); + struct.cr.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -200151,53 +207107,53 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_rang } - private static class heartbeat_txn_range_argsTupleSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_argsTupleScheme getScheme() { - return new heartbeat_txn_range_argsTupleScheme(); + private static class find_columns_with_stats_argsTupleSchemeFactory implements SchemeFactory { + public find_columns_with_stats_argsTupleScheme getScheme() { + return new find_columns_with_stats_argsTupleScheme(); } } - private static class heartbeat_txn_range_argsTupleScheme extends TupleScheme { + private static class find_columns_with_stats_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, find_columns_with_stats_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetTxns()) { + if (struct.isSetCr()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetTxns()) { - struct.txns.write(oprot); + if (struct.isSetCr()) { + struct.cr.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, find_columns_with_stats_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.txns = new HeartbeatTxnRangeRequest(); - struct.txns.read(iprot); - struct.setTxnsIsSet(true); + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class heartbeat_txn_range_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class find_columns_with_stats_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("find_columns_with_stats_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new heartbeat_txn_range_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new heartbeat_txn_range_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new find_columns_with_stats_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new find_columns_with_stats_resultTupleSchemeFactory()); } - private HeartbeatTxnRangeResponse success; // required + private List success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -200262,16 +207218,17 @@ public String getFieldName() { static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeResponse.class))); + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(find_columns_with_stats_result.class, metaDataMap); } - public heartbeat_txn_range_result() { + public find_columns_with_stats_result() { } - public heartbeat_txn_range_result( - HeartbeatTxnRangeResponse success) + public find_columns_with_stats_result( + List success) { this(); this.success = success; @@ -200280,14 +207237,15 @@ public heartbeat_txn_range_result( /** * Performs a deep copy on other. */ - public heartbeat_txn_range_result(heartbeat_txn_range_result other) { + public find_columns_with_stats_result(find_columns_with_stats_result other) { if (other.isSetSuccess()) { - this.success = new HeartbeatTxnRangeResponse(other.success); + List __this__success = new ArrayList(other.success); + this.success = __this__success; } } - public heartbeat_txn_range_result deepCopy() { - return new heartbeat_txn_range_result(this); + public find_columns_with_stats_result deepCopy() { + return new find_columns_with_stats_result(this); } @Override @@ -200295,11 +207253,26 @@ public void clear() { this.success = null; } - public HeartbeatTxnRangeResponse getSuccess() { + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { return this.success; } - public void setSuccess(HeartbeatTxnRangeResponse success) { + public void setSuccess(List success) { this.success = success; } @@ -200324,7 +207297,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((HeartbeatTxnRangeResponse)value); + setSuccess((List)value); } break; @@ -200357,12 +207330,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof heartbeat_txn_range_result) - return this.equals((heartbeat_txn_range_result)that); + if (that instanceof find_columns_with_stats_result) + return this.equals((find_columns_with_stats_result)that); return false; } - public boolean equals(heartbeat_txn_range_result that) { + public boolean equals(find_columns_with_stats_result that) { if (that == null) return false; @@ -200391,7 +207364,7 @@ public int hashCode() { } @Override - public int compareTo(heartbeat_txn_range_result other) { + public int compareTo(find_columns_with_stats_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -200425,7 +207398,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("heartbeat_txn_range_result("); + StringBuilder sb = new StringBuilder("find_columns_with_stats_result("); boolean first = true; sb.append("success:"); @@ -200442,9 +207415,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -200463,15 +207433,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class heartbeat_txn_range_resultStandardSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_resultStandardScheme getScheme() { - return new heartbeat_txn_range_resultStandardScheme(); + private static class find_columns_with_stats_resultStandardSchemeFactory implements SchemeFactory { + public find_columns_with_stats_resultStandardScheme getScheme() { + return new find_columns_with_stats_resultStandardScheme(); } } - private static class heartbeat_txn_range_resultStandardScheme extends StandardScheme { + private static class find_columns_with_stats_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, find_columns_with_stats_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -200482,9 +207452,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new HeartbeatTxnRangeResponse(); - struct.success.read(iprot); + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list1564 = iprot.readListBegin(); + struct.success = new ArrayList(_list1564.size); + String _elem1565; + for (int _i1566 = 0; _i1566 < _list1564.size; ++_i1566) + { + _elem1565 = iprot.readString(); + struct.success.add(_elem1565); + } + iprot.readListEnd(); + } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -200499,13 +207478,20 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, find_columns_with_stats_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter1567 : struct.success) + { + oprot.writeString(_iter1567); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -200514,16 +207500,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_rang } - private static class heartbeat_txn_range_resultTupleSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_resultTupleScheme getScheme() { - return new heartbeat_txn_range_resultTupleScheme(); + private static class find_columns_with_stats_resultTupleSchemeFactory implements SchemeFactory { + public find_columns_with_stats_resultTupleScheme getScheme() { + return new find_columns_with_stats_resultTupleScheme(); } } - private static class heartbeat_txn_range_resultTupleScheme extends TupleScheme { + private static class find_columns_with_stats_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, find_columns_with_stats_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -200531,17 +207517,31 @@ public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { - struct.success.write(oprot); + { + oprot.writeI32(struct.success.size()); + for (String _iter1568 : struct.success) + { + oprot.writeString(_iter1568); + } + } } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, find_columns_with_stats_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new HeartbeatTxnRangeResponse(); - struct.success.read(iprot); + { + org.apache.thrift.protocol.TList _list1569 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1569.size); + String _elem1570; + for (int _i1571 = 0; _i1571 < _list1569.size; ++_i1571) + { + _elem1570 = iprot.readString(); + struct.success.add(_elem1570); + } + } struct.setSuccessIsSet(true); } } @@ -200549,22 +207549,22 @@ public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_ } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_cleaned_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mark_cleaned_args"); - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField CR_FIELD_DESC = new org.apache.thrift.protocol.TField("cr", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new compact_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new mark_cleaned_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mark_cleaned_argsTupleSchemeFactory()); } - private CompactionRequest rqst; // required + private CompactionInfoStruct cr; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); + CR((short)1, "cr"); private static final Map byName = new HashMap(); @@ -200579,8 +207579,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // RQST - return RQST; + case 1: // CR + return CR; default: return null; } @@ -200624,70 +207624,70 @@ public String getFieldName() { 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); + tmpMap.put(_Fields.CR, new org.apache.thrift.meta_data.FieldMetaData("cr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionInfoStruct.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mark_cleaned_args.class, metaDataMap); } - public compact_args() { + public mark_cleaned_args() { } - public compact_args( - CompactionRequest rqst) + public mark_cleaned_args( + CompactionInfoStruct cr) { this(); - this.rqst = rqst; + this.cr = cr; } /** * Performs a deep copy on other. */ - public compact_args(compact_args other) { - if (other.isSetRqst()) { - this.rqst = new CompactionRequest(other.rqst); + public mark_cleaned_args(mark_cleaned_args other) { + if (other.isSetCr()) { + this.cr = new CompactionInfoStruct(other.cr); } } - public compact_args deepCopy() { - return new compact_args(this); + public mark_cleaned_args deepCopy() { + return new mark_cleaned_args(this); } @Override public void clear() { - this.rqst = null; + this.cr = null; } - public CompactionRequest getRqst() { - return this.rqst; + public CompactionInfoStruct getCr() { + return this.cr; } - public void setRqst(CompactionRequest rqst) { - this.rqst = rqst; + public void setCr(CompactionInfoStruct cr) { + this.cr = cr; } - public void unsetRqst() { - this.rqst = null; + public void unsetCr() { + this.cr = null; } - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; + /** Returns true if field cr is set (has been assigned a value) and false otherwise */ + public boolean isSetCr() { + return this.cr != null; } - public void setRqstIsSet(boolean value) { + public void setCrIsSet(boolean value) { if (!value) { - this.rqst = null; + this.cr = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case RQST: + case CR: if (value == null) { - unsetRqst(); + unsetCr(); } else { - setRqst((CompactionRequest)value); + setCr((CompactionInfoStruct)value); } break; @@ -200696,8 +207696,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case RQST: - return getRqst(); + case CR: + return getCr(); } throw new IllegalStateException(); @@ -200710,8 +207710,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case RQST: - return isSetRqst(); + case CR: + return isSetCr(); } throw new IllegalStateException(); } @@ -200720,21 +207720,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof compact_args) - return this.equals((compact_args)that); + if (that instanceof mark_cleaned_args) + return this.equals((mark_cleaned_args)that); return false; } - public boolean equals(compact_args that) { + public boolean equals(mark_cleaned_args that) { if (that == null) return false; - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) + boolean this_present_cr = true && this.isSetCr(); + boolean that_present_cr = true && that.isSetCr(); + if (this_present_cr || that_present_cr) { + if (!(this_present_cr && that_present_cr)) return false; - if (!this.rqst.equals(that.rqst)) + if (!this.cr.equals(that.cr)) return false; } @@ -200745,28 +207745,28 @@ public boolean equals(compact_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); + boolean present_cr = true && (isSetCr()); + list.add(present_cr); + if (present_cr) + list.add(cr); return list.hashCode(); } @Override - public int compareTo(compact_args other) { + public int compareTo(mark_cleaned_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + lastComparison = Boolean.valueOf(isSetCr()).compareTo(other.isSetCr()); if (lastComparison != 0) { return lastComparison; } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (isSetCr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cr, other.cr); if (lastComparison != 0) { return lastComparison; } @@ -200788,14 +207788,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("compact_args("); + StringBuilder sb = new StringBuilder("mark_cleaned_args("); boolean first = true; - sb.append("rqst:"); - if (this.rqst == null) { + sb.append("cr:"); + if (this.cr == null) { sb.append("null"); } else { - sb.append(this.rqst); + sb.append(this.cr); } first = false; sb.append(")"); @@ -200805,8 +207805,8 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (rqst != null) { - rqst.validate(); + if (cr != null) { + cr.validate(); } } @@ -200826,15 +207826,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class compact_argsStandardSchemeFactory implements SchemeFactory { - public compact_argsStandardScheme getScheme() { - return new compact_argsStandardScheme(); + private static class mark_cleaned_argsStandardSchemeFactory implements SchemeFactory { + public mark_cleaned_argsStandardScheme getScheme() { + return new mark_cleaned_argsStandardScheme(); } } - private static class compact_argsStandardScheme extends StandardScheme { + private static class mark_cleaned_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, compact_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, mark_cleaned_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -200844,11 +207844,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, compact_args struct break; } switch (schemeField.id) { - case 1: // RQST + case 1: // CR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new CompactionRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -200862,13 +207862,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, compact_args struct struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, compact_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, mark_cleaned_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); + if (struct.cr != null) { + oprot.writeFieldBegin(CR_FIELD_DESC); + struct.cr.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -200877,55 +207877,57 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, compact_args struc } - private static class compact_argsTupleSchemeFactory implements SchemeFactory { - public compact_argsTupleScheme getScheme() { - return new compact_argsTupleScheme(); + private static class mark_cleaned_argsTupleSchemeFactory implements SchemeFactory { + public mark_cleaned_argsTupleScheme getScheme() { + return new mark_cleaned_argsTupleScheme(); } } - private static class compact_argsTupleScheme extends TupleScheme { + private static class mark_cleaned_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, mark_cleaned_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { + if (struct.isSetCr()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); + if (struct.isSetCr()) { + struct.cr.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, mark_cleaned_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.rqst = new CompactionRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_cleaned_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mark_cleaned_result"); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new compact_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new mark_cleaned_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mark_cleaned_resultTupleSchemeFactory()); } + private MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -200940,6 +207942,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 1: // O1 + return O1; default: return null; } @@ -200978,37 +207982,86 @@ 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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mark_cleaned_result.class, metaDataMap); } - public compact_result() { + public mark_cleaned_result() { + } + + public mark_cleaned_result( + MetaException o1) + { + this(); + this.o1 = o1; } /** * Performs a deep copy on other. */ - public compact_result(compact_result other) { + public mark_cleaned_result(mark_cleaned_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } } - public compact_result deepCopy() { - return new compact_result(this); + public mark_cleaned_result deepCopy() { + return new mark_cleaned_result(this); } @Override public void clear() { + this.o1 = null; + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case O1: + return getO1(); + } throw new IllegalStateException(); } @@ -201020,6 +208073,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -201028,15 +208083,24 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof compact_result) - return this.equals((compact_result)that); + if (that instanceof mark_cleaned_result) + return this.equals((mark_cleaned_result)that); return false; } - public boolean equals(compact_result that) { + public boolean equals(mark_cleaned_result that) { if (that == null) return false; + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + return true; } @@ -201044,17 +208108,32 @@ public boolean equals(compact_result that) { public int hashCode() { List list = new ArrayList(); + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + return list.hashCode(); } @Override - public int compareTo(compact_result other) { + public int compareTo(mark_cleaned_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -201072,9 +208151,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("compact_result("); + StringBuilder sb = new StringBuilder("mark_cleaned_result("); boolean first = true; + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; sb.append(")"); return sb.toString(); } @@ -201100,15 +208186,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class compact_resultStandardSchemeFactory implements SchemeFactory { - public compact_resultStandardScheme getScheme() { - return new compact_resultStandardScheme(); + private static class mark_cleaned_resultStandardSchemeFactory implements SchemeFactory { + public mark_cleaned_resultStandardScheme getScheme() { + return new mark_cleaned_resultStandardScheme(); } } - private static class compact_resultStandardScheme extends StandardScheme { + private static class mark_cleaned_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, compact_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, mark_cleaned_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -201118,6 +208204,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, compact_result stru break; } switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -201127,53 +208222,72 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, compact_result stru struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, compact_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, mark_cleaned_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class compact_resultTupleSchemeFactory implements SchemeFactory { - public compact_resultTupleScheme getScheme() { - return new compact_resultTupleScheme(); + private static class mark_cleaned_resultTupleSchemeFactory implements SchemeFactory { + public mark_cleaned_resultTupleScheme getScheme() { + return new mark_cleaned_resultTupleScheme(); } } - private static class compact_resultTupleScheme extends TupleScheme { + private static class mark_cleaned_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, mark_cleaned_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, mark_cleaned_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class compact2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_compacted_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mark_compacted_args"); - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField CR_FIELD_DESC = new org.apache.thrift.protocol.TField("cr", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new compact2_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact2_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new mark_compacted_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mark_compacted_argsTupleSchemeFactory()); } - private CompactionRequest rqst; // required + private CompactionInfoStruct cr; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); + CR((short)1, "cr"); private static final Map byName = new HashMap(); @@ -201188,8 +208302,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struc */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // RQST - return RQST; + case 1: // CR + return CR; default: return null; } @@ -201233,70 +208347,70 @@ public String getFieldName() { 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); + tmpMap.put(_Fields.CR, new org.apache.thrift.meta_data.FieldMetaData("cr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionInfoStruct.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mark_compacted_args.class, metaDataMap); } - public compact2_args() { + public mark_compacted_args() { } - public compact2_args( - CompactionRequest rqst) + public mark_compacted_args( + CompactionInfoStruct cr) { this(); - this.rqst = rqst; + this.cr = cr; } /** * Performs a deep copy on other. */ - public compact2_args(compact2_args other) { - if (other.isSetRqst()) { - this.rqst = new CompactionRequest(other.rqst); + public mark_compacted_args(mark_compacted_args other) { + if (other.isSetCr()) { + this.cr = new CompactionInfoStruct(other.cr); } } - public compact2_args deepCopy() { - return new compact2_args(this); + public mark_compacted_args deepCopy() { + return new mark_compacted_args(this); } @Override public void clear() { - this.rqst = null; + this.cr = null; } - public CompactionRequest getRqst() { - return this.rqst; + public CompactionInfoStruct getCr() { + return this.cr; } - public void setRqst(CompactionRequest rqst) { - this.rqst = rqst; + public void setCr(CompactionInfoStruct cr) { + this.cr = cr; } - public void unsetRqst() { - this.rqst = null; + public void unsetCr() { + this.cr = null; } - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; + /** Returns true if field cr is set (has been assigned a value) and false otherwise */ + public boolean isSetCr() { + return this.cr != null; } - public void setRqstIsSet(boolean value) { + public void setCrIsSet(boolean value) { if (!value) { - this.rqst = null; + this.cr = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case RQST: + case CR: if (value == null) { - unsetRqst(); + unsetCr(); } else { - setRqst((CompactionRequest)value); + setCr((CompactionInfoStruct)value); } break; @@ -201305,8 +208419,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case RQST: - return getRqst(); + case CR: + return getCr(); } throw new IllegalStateException(); @@ -201319,8 +208433,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case RQST: - return isSetRqst(); + case CR: + return isSetCr(); } throw new IllegalStateException(); } @@ -201329,21 +208443,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof compact2_args) - return this.equals((compact2_args)that); + if (that instanceof mark_compacted_args) + return this.equals((mark_compacted_args)that); return false; } - public boolean equals(compact2_args that) { + public boolean equals(mark_compacted_args that) { if (that == null) return false; - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) + boolean this_present_cr = true && this.isSetCr(); + boolean that_present_cr = true && that.isSetCr(); + if (this_present_cr || that_present_cr) { + if (!(this_present_cr && that_present_cr)) return false; - if (!this.rqst.equals(that.rqst)) + if (!this.cr.equals(that.cr)) return false; } @@ -201354,28 +208468,28 @@ public boolean equals(compact2_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); + boolean present_cr = true && (isSetCr()); + list.add(present_cr); + if (present_cr) + list.add(cr); return list.hashCode(); } @Override - public int compareTo(compact2_args other) { + public int compareTo(mark_compacted_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + lastComparison = Boolean.valueOf(isSetCr()).compareTo(other.isSetCr()); if (lastComparison != 0) { return lastComparison; } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (isSetCr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cr, other.cr); if (lastComparison != 0) { return lastComparison; } @@ -201397,14 +208511,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("compact2_args("); + StringBuilder sb = new StringBuilder("mark_compacted_args("); boolean first = true; - sb.append("rqst:"); - if (this.rqst == null) { + sb.append("cr:"); + if (this.cr == null) { sb.append("null"); } else { - sb.append(this.rqst); + sb.append(this.cr); } first = false; sb.append(")"); @@ -201414,8 +208528,8 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (rqst != null) { - rqst.validate(); + if (cr != null) { + cr.validate(); } } @@ -201435,15 +208549,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class compact2_argsStandardSchemeFactory implements SchemeFactory { - public compact2_argsStandardScheme getScheme() { - return new compact2_argsStandardScheme(); + private static class mark_compacted_argsStandardSchemeFactory implements SchemeFactory { + public mark_compacted_argsStandardScheme getScheme() { + return new mark_compacted_argsStandardScheme(); } } - private static class compact2_argsStandardScheme extends StandardScheme { + private static class mark_compacted_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, mark_compacted_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -201453,11 +208567,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_args struc break; } switch (schemeField.id) { - case 1: // RQST + case 1: // CR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new CompactionRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -201471,13 +208585,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_args struc struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, compact2_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, mark_compacted_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); + if (struct.cr != null) { + oprot.writeFieldBegin(CR_FIELD_DESC); + struct.cr.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -201486,57 +208600,57 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, compact2_args stru } - private static class compact2_argsTupleSchemeFactory implements SchemeFactory { - public compact2_argsTupleScheme getScheme() { - return new compact2_argsTupleScheme(); + private static class mark_compacted_argsTupleSchemeFactory implements SchemeFactory { + public mark_compacted_argsTupleScheme getScheme() { + return new mark_compacted_argsTupleScheme(); } } - private static class compact2_argsTupleScheme extends TupleScheme { + private static class mark_compacted_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, mark_compacted_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { + if (struct.isSetCr()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); + if (struct.isSetCr()) { + struct.cr.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, mark_compacted_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.rqst = new CompactionRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class compact2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_compacted_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mark_compacted_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new compact2_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact2_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new mark_compacted_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mark_compacted_resultTupleSchemeFactory()); } - private CompactionResponse success; // required + private MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -201551,8 +208665,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, compact2_args struct */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -201596,70 +208710,70 @@ public String getFieldName() { 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mark_compacted_result.class, metaDataMap); } - public compact2_result() { + public mark_compacted_result() { } - public compact2_result( - CompactionResponse success) + public mark_compacted_result( + MetaException o1) { this(); - this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public compact2_result(compact2_result other) { - if (other.isSetSuccess()) { - this.success = new CompactionResponse(other.success); + public mark_compacted_result(mark_compacted_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public compact2_result deepCopy() { - return new compact2_result(this); + public mark_compacted_result deepCopy() { + return new mark_compacted_result(this); } @Override public void clear() { - this.success = null; + this.o1 = null; } - public CompactionResponse getSuccess() { - return this.success; + public MetaException getO1() { + return this.o1; } - public void setSuccess(CompactionResponse success) { - this.success = success; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetSuccess() { - this.success = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setSuccessIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.success = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case O1: if (value == null) { - unsetSuccess(); + unsetO1(); } else { - setSuccess((CompactionResponse)value); + setO1((MetaException)value); } break; @@ -201668,8 +208782,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -201682,8 +208796,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -201692,21 +208806,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof compact2_result) - return this.equals((compact2_result)that); + if (that instanceof mark_compacted_result) + return this.equals((mark_compacted_result)that); return false; } - public boolean equals(compact2_result that) { + public boolean equals(mark_compacted_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (!this.success.equals(that.success)) + if (!this.o1.equals(that.o1)) return false; } @@ -201717,28 +208831,28 @@ public boolean equals(compact2_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); return list.hashCode(); } @Override - public int compareTo(compact2_result other) { + public int compareTo(mark_compacted_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } @@ -201760,14 +208874,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("compact2_result("); + StringBuilder sb = new StringBuilder("mark_compacted_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.o1); } first = false; sb.append(")"); @@ -201777,9 +208891,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -201798,15 +208909,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class compact2_resultStandardSchemeFactory implements SchemeFactory { - public compact2_resultStandardScheme getScheme() { - return new compact2_resultStandardScheme(); + private static class mark_compacted_resultStandardSchemeFactory implements SchemeFactory { + public mark_compacted_resultStandardScheme getScheme() { + return new mark_compacted_resultStandardScheme(); } } - private static class compact2_resultStandardScheme extends StandardScheme { + private static class mark_compacted_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, mark_compacted_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -201816,11 +208927,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_result str break; } switch (schemeField.id) { - case 0: // SUCCESS + case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new CompactionResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -201834,13 +208945,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_result str struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, compact2_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, mark_compacted_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -201849,57 +208960,57 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, compact2_result st } - private static class compact2_resultTupleSchemeFactory implements SchemeFactory { - public compact2_resultTupleScheme getScheme() { - return new compact2_resultTupleScheme(); + private static class mark_compacted_resultTupleSchemeFactory implements SchemeFactory { + public mark_compacted_resultTupleScheme getScheme() { + return new mark_compacted_resultTupleScheme(); } } - private static class compact2_resultTupleScheme extends TupleScheme { + private static class mark_compacted_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, mark_compacted_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetO1()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); + if (struct.isSetO1()) { + struct.o1.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, mark_compacted_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new CompactionResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class show_compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_failed_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mark_failed_args"); - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField CR_FIELD_DESC = new org.apache.thrift.protocol.TField("cr", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new show_compact_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new show_compact_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new mark_failed_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mark_failed_argsTupleSchemeFactory()); } - private ShowCompactRequest rqst; // required + private CompactionInfoStruct cr; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); + CR((short)1, "cr"); private static final Map byName = new HashMap(); @@ -201914,8 +209025,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, compact2_result stru */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // RQST - return RQST; + case 1: // CR + return CR; default: return null; } @@ -201959,70 +209070,70 @@ public String getFieldName() { 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactRequest.class))); + tmpMap.put(_Fields.CR, new org.apache.thrift.meta_data.FieldMetaData("cr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionInfoStruct.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mark_failed_args.class, metaDataMap); } - public show_compact_args() { + public mark_failed_args() { } - public show_compact_args( - ShowCompactRequest rqst) + public mark_failed_args( + CompactionInfoStruct cr) { this(); - this.rqst = rqst; + this.cr = cr; } /** * Performs a deep copy on other. */ - public show_compact_args(show_compact_args other) { - if (other.isSetRqst()) { - this.rqst = new ShowCompactRequest(other.rqst); + public mark_failed_args(mark_failed_args other) { + if (other.isSetCr()) { + this.cr = new CompactionInfoStruct(other.cr); } } - public show_compact_args deepCopy() { - return new show_compact_args(this); + public mark_failed_args deepCopy() { + return new mark_failed_args(this); } @Override public void clear() { - this.rqst = null; + this.cr = null; } - public ShowCompactRequest getRqst() { - return this.rqst; + public CompactionInfoStruct getCr() { + return this.cr; } - public void setRqst(ShowCompactRequest rqst) { - this.rqst = rqst; + public void setCr(CompactionInfoStruct cr) { + this.cr = cr; } - public void unsetRqst() { - this.rqst = null; + public void unsetCr() { + this.cr = null; } - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; + /** Returns true if field cr is set (has been assigned a value) and false otherwise */ + public boolean isSetCr() { + return this.cr != null; } - public void setRqstIsSet(boolean value) { + public void setCrIsSet(boolean value) { if (!value) { - this.rqst = null; + this.cr = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case RQST: + case CR: if (value == null) { - unsetRqst(); + unsetCr(); } else { - setRqst((ShowCompactRequest)value); + setCr((CompactionInfoStruct)value); } break; @@ -202031,8 +209142,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case RQST: - return getRqst(); + case CR: + return getCr(); } throw new IllegalStateException(); @@ -202045,8 +209156,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case RQST: - return isSetRqst(); + case CR: + return isSetCr(); } throw new IllegalStateException(); } @@ -202055,21 +209166,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof show_compact_args) - return this.equals((show_compact_args)that); + if (that instanceof mark_failed_args) + return this.equals((mark_failed_args)that); return false; } - public boolean equals(show_compact_args that) { + public boolean equals(mark_failed_args that) { if (that == null) return false; - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) + boolean this_present_cr = true && this.isSetCr(); + boolean that_present_cr = true && that.isSetCr(); + if (this_present_cr || that_present_cr) { + if (!(this_present_cr && that_present_cr)) return false; - if (!this.rqst.equals(that.rqst)) + if (!this.cr.equals(that.cr)) return false; } @@ -202080,28 +209191,28 @@ public boolean equals(show_compact_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); + boolean present_cr = true && (isSetCr()); + list.add(present_cr); + if (present_cr) + list.add(cr); return list.hashCode(); } @Override - public int compareTo(show_compact_args other) { + public int compareTo(mark_failed_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + lastComparison = Boolean.valueOf(isSetCr()).compareTo(other.isSetCr()); if (lastComparison != 0) { return lastComparison; } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (isSetCr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cr, other.cr); if (lastComparison != 0) { return lastComparison; } @@ -202123,14 +209234,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("show_compact_args("); + StringBuilder sb = new StringBuilder("mark_failed_args("); boolean first = true; - sb.append("rqst:"); - if (this.rqst == null) { + sb.append("cr:"); + if (this.cr == null) { sb.append("null"); } else { - sb.append(this.rqst); + sb.append(this.cr); } first = false; sb.append(")"); @@ -202140,8 +209251,8 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (rqst != null) { - rqst.validate(); + if (cr != null) { + cr.validate(); } } @@ -202161,15 +209272,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class show_compact_argsStandardSchemeFactory implements SchemeFactory { - public show_compact_argsStandardScheme getScheme() { - return new show_compact_argsStandardScheme(); + private static class mark_failed_argsStandardSchemeFactory implements SchemeFactory { + public mark_failed_argsStandardScheme getScheme() { + return new mark_failed_argsStandardScheme(); } } - private static class show_compact_argsStandardScheme extends StandardScheme { + private static class mark_failed_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, mark_failed_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -202179,11 +209290,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_args s break; } switch (schemeField.id) { - case 1: // RQST + case 1: // CR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new ShowCompactRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -202197,13 +209308,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_args s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, show_compact_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, mark_failed_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); + if (struct.cr != null) { + oprot.writeFieldBegin(CR_FIELD_DESC); + struct.cr.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -202212,57 +209323,57 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, show_compact_args } - private static class show_compact_argsTupleSchemeFactory implements SchemeFactory { - public show_compact_argsTupleScheme getScheme() { - return new show_compact_argsTupleScheme(); + private static class mark_failed_argsTupleSchemeFactory implements SchemeFactory { + public mark_failed_argsTupleScheme getScheme() { + return new mark_failed_argsTupleScheme(); } } - private static class show_compact_argsTupleScheme extends TupleScheme { + private static class mark_failed_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, mark_failed_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { + if (struct.isSetCr()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); + if (struct.isSetCr()) { + struct.cr.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, mark_failed_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.rqst = new ShowCompactRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.cr = new CompactionInfoStruct(); + struct.cr.read(iprot); + struct.setCrIsSet(true); } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class show_compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class mark_failed_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mark_failed_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new show_compact_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new show_compact_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new mark_failed_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mark_failed_resultTupleSchemeFactory()); } - private ShowCompactResponse success; // required + private MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -202277,8 +209388,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_args st */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -202322,70 +209433,70 @@ public String getFieldName() { 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mark_failed_result.class, metaDataMap); } - public show_compact_result() { + public mark_failed_result() { } - public show_compact_result( - ShowCompactResponse success) + public mark_failed_result( + MetaException o1) { this(); - this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public show_compact_result(show_compact_result other) { - if (other.isSetSuccess()) { - this.success = new ShowCompactResponse(other.success); + public mark_failed_result(mark_failed_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public show_compact_result deepCopy() { - return new show_compact_result(this); + public mark_failed_result deepCopy() { + return new mark_failed_result(this); } @Override public void clear() { - this.success = null; + this.o1 = null; } - public ShowCompactResponse getSuccess() { - return this.success; + public MetaException getO1() { + return this.o1; } - public void setSuccess(ShowCompactResponse success) { - this.success = success; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetSuccess() { - this.success = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setSuccessIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.success = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case O1: if (value == null) { - unsetSuccess(); + unsetO1(); } else { - setSuccess((ShowCompactResponse)value); + setO1((MetaException)value); } break; @@ -202394,8 +209505,8 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -202408,8 +209519,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -202418,21 +209529,21 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof show_compact_result) - return this.equals((show_compact_result)that); + if (that instanceof mark_failed_result) + return this.equals((mark_failed_result)that); return false; } - public boolean equals(show_compact_result that) { + public boolean equals(mark_failed_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (!this.success.equals(that.success)) + if (!this.o1.equals(that.o1)) return false; } @@ -202443,28 +209554,28 @@ public boolean equals(show_compact_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); return list.hashCode(); } @Override - public int compareTo(show_compact_result other) { + public int compareTo(mark_failed_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } @@ -202486,14 +209597,14 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("show_compact_result("); + StringBuilder sb = new StringBuilder("mark_failed_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.o1); } first = false; sb.append(")"); @@ -202503,9 +209614,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -202524,15 +209632,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class show_compact_resultStandardSchemeFactory implements SchemeFactory { - public show_compact_resultStandardScheme getScheme() { - return new show_compact_resultStandardScheme(); + private static class mark_failed_resultStandardSchemeFactory implements SchemeFactory { + public mark_failed_resultStandardScheme getScheme() { + return new mark_failed_resultStandardScheme(); } } - private static class show_compact_resultStandardScheme extends StandardScheme { + private static class mark_failed_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, mark_failed_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -202542,11 +209650,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_result break; } switch (schemeField.id) { - case 0: // SUCCESS + case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new ShowCompactResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -202560,13 +209668,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, show_compact_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, mark_failed_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -202575,57 +209683,60 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, show_compact_resul } - private static class show_compact_resultTupleSchemeFactory implements SchemeFactory { - public show_compact_resultTupleScheme getScheme() { - return new show_compact_resultTupleScheme(); + private static class mark_failed_resultTupleSchemeFactory implements SchemeFactory { + public mark_failed_resultTupleScheme getScheme() { + return new mark_failed_resultTupleScheme(); } } - private static class show_compact_resultTupleScheme extends TupleScheme { + private static class mark_failed_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, mark_failed_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { + if (struct.isSetO1()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); + if (struct.isSetO1()) { + struct.o1.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, mark_failed_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new ShowCompactResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_dynamic_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_args"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_hadoop_jobid_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_hadoop_jobid_args"); - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField CQ_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cq_id", org.apache.thrift.protocol.TType.I64, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new add_dynamic_partitions_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_dynamic_partitions_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new set_hadoop_jobid_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_hadoop_jobid_argsTupleSchemeFactory()); } - private AddDynamicPartitions rqst; // required + private String jobId; // required + private long cq_id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); + JOB_ID((short)1, "jobId"), + CQ_ID((short)2, "cq_id"); private static final Map byName = new HashMap(); @@ -202640,8 +209751,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_result */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // RQST - return RQST; + case 1: // JOB_ID + return JOB_ID; + case 2: // CQ_ID + return CQ_ID; default: return null; } @@ -202682,73 +209795,114 @@ public String getFieldName() { } // isset id assignments + private static final int __CQ_ID_ISSET_ID = 0; + private byte __isset_bitfield = 0; 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddDynamicPartitions.class))); + tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CQ_ID, new org.apache.thrift.meta_data.FieldMetaData("cq_id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_hadoop_jobid_args.class, metaDataMap); } - public add_dynamic_partitions_args() { + public set_hadoop_jobid_args() { } - public add_dynamic_partitions_args( - AddDynamicPartitions rqst) + public set_hadoop_jobid_args( + String jobId, + long cq_id) { this(); - this.rqst = rqst; + this.jobId = jobId; + this.cq_id = cq_id; + setCq_idIsSet(true); } /** * Performs a deep copy on other. */ - public add_dynamic_partitions_args(add_dynamic_partitions_args other) { - if (other.isSetRqst()) { - this.rqst = new AddDynamicPartitions(other.rqst); + public set_hadoop_jobid_args(set_hadoop_jobid_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetJobId()) { + this.jobId = other.jobId; } + this.cq_id = other.cq_id; } - public add_dynamic_partitions_args deepCopy() { - return new add_dynamic_partitions_args(this); + public set_hadoop_jobid_args deepCopy() { + return new set_hadoop_jobid_args(this); } @Override public void clear() { - this.rqst = null; + this.jobId = null; + setCq_idIsSet(false); + this.cq_id = 0; } - public AddDynamicPartitions getRqst() { - return this.rqst; + public String getJobId() { + return this.jobId; } - public void setRqst(AddDynamicPartitions rqst) { - this.rqst = rqst; + public void setJobId(String jobId) { + this.jobId = jobId; } - public void unsetRqst() { - this.rqst = null; + public void unsetJobId() { + this.jobId = null; } - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; + /** Returns true if field jobId is set (has been assigned a value) and false otherwise */ + public boolean isSetJobId() { + return this.jobId != null; } - public void setRqstIsSet(boolean value) { + public void setJobIdIsSet(boolean value) { if (!value) { - this.rqst = null; + this.jobId = null; } } + public long getCq_id() { + return this.cq_id; + } + + public void setCq_id(long cq_id) { + this.cq_id = cq_id; + setCq_idIsSet(true); + } + + public void unsetCq_id() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CQ_ID_ISSET_ID); + } + + /** Returns true if field cq_id is set (has been assigned a value) and false otherwise */ + public boolean isSetCq_id() { + return EncodingUtils.testBit(__isset_bitfield, __CQ_ID_ISSET_ID); + } + + public void setCq_idIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CQ_ID_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case RQST: + case JOB_ID: if (value == null) { - unsetRqst(); + unsetJobId(); } else { - setRqst((AddDynamicPartitions)value); + setJobId((String)value); + } + break; + + case CQ_ID: + if (value == null) { + unsetCq_id(); + } else { + setCq_id((Long)value); } break; @@ -202757,8 +209911,11 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { - case RQST: - return getRqst(); + case JOB_ID: + return getJobId(); + + case CQ_ID: + return getCq_id(); } throw new IllegalStateException(); @@ -202771,8 +209928,10 @@ public boolean isSet(_Fields field) { } switch (field) { - case RQST: - return isSetRqst(); + case JOB_ID: + return isSetJobId(); + case CQ_ID: + return isSetCq_id(); } throw new IllegalStateException(); } @@ -202781,21 +209940,30 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_dynamic_partitions_args) - return this.equals((add_dynamic_partitions_args)that); + if (that instanceof set_hadoop_jobid_args) + return this.equals((set_hadoop_jobid_args)that); return false; } - public boolean equals(add_dynamic_partitions_args that) { + public boolean equals(set_hadoop_jobid_args that) { if (that == null) return false; - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) + boolean this_present_jobId = true && this.isSetJobId(); + boolean that_present_jobId = true && that.isSetJobId(); + if (this_present_jobId || that_present_jobId) { + if (!(this_present_jobId && that_present_jobId)) return false; - if (!this.rqst.equals(that.rqst)) + if (!this.jobId.equals(that.jobId)) + return false; + } + + boolean this_present_cq_id = true; + boolean that_present_cq_id = true; + if (this_present_cq_id || that_present_cq_id) { + if (!(this_present_cq_id && that_present_cq_id)) + return false; + if (this.cq_id != that.cq_id) return false; } @@ -202806,28 +209974,43 @@ public boolean equals(add_dynamic_partitions_args that) { public int hashCode() { List list = new ArrayList(); - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); + boolean present_jobId = true && (isSetJobId()); + list.add(present_jobId); + if (present_jobId) + list.add(jobId); + + boolean present_cq_id = true; + list.add(present_cq_id); + if (present_cq_id) + list.add(cq_id); return list.hashCode(); } @Override - public int compareTo(add_dynamic_partitions_args other) { + public int compareTo(set_hadoop_jobid_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + lastComparison = Boolean.valueOf(isSetJobId()).compareTo(other.isSetJobId()); if (lastComparison != 0) { return lastComparison; } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (isSetJobId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobId, other.jobId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCq_id()).compareTo(other.isSetCq_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCq_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cq_id, other.cq_id); if (lastComparison != 0) { return lastComparison; } @@ -202849,16 +210032,20 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("add_dynamic_partitions_args("); + StringBuilder sb = new StringBuilder("set_hadoop_jobid_args("); boolean first = true; - sb.append("rqst:"); - if (this.rqst == null) { + sb.append("jobId:"); + if (this.jobId == null) { sb.append("null"); } else { - sb.append(this.rqst); + sb.append(this.jobId); } first = false; + if (!first) sb.append(", "); + sb.append("cq_id:"); + sb.append(this.cq_id); + first = false; sb.append(")"); return sb.toString(); } @@ -202866,9 +210053,6 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -202881,21 +210065,23 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; 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); } } - private static class add_dynamic_partitions_argsStandardSchemeFactory implements SchemeFactory { - public add_dynamic_partitions_argsStandardScheme getScheme() { - return new add_dynamic_partitions_argsStandardScheme(); + private static class set_hadoop_jobid_argsStandardSchemeFactory implements SchemeFactory { + public set_hadoop_jobid_argsStandardScheme getScheme() { + return new set_hadoop_jobid_argsStandardScheme(); } } - private static class add_dynamic_partitions_argsStandardScheme extends StandardScheme { + private static class set_hadoop_jobid_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, set_hadoop_jobid_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -202905,11 +210091,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partiti break; } switch (schemeField.id) { - case 1: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new AddDynamicPartitions(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + case 1: // JOB_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.jobId = iprot.readString(); + struct.setJobIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CQ_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.cq_id = iprot.readI64(); + struct.setCq_idIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -202923,75 +210116,82 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partiti struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, set_hadoop_jobid_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); + if (struct.jobId != null) { + oprot.writeFieldBegin(JOB_ID_FIELD_DESC); + oprot.writeString(struct.jobId); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(CQ_ID_FIELD_DESC); + oprot.writeI64(struct.cq_id); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class add_dynamic_partitions_argsTupleSchemeFactory implements SchemeFactory { - public add_dynamic_partitions_argsTupleScheme getScheme() { - return new add_dynamic_partitions_argsTupleScheme(); + private static class set_hadoop_jobid_argsTupleSchemeFactory implements SchemeFactory { + public set_hadoop_jobid_argsTupleScheme getScheme() { + return new set_hadoop_jobid_argsTupleScheme(); } } - private static class add_dynamic_partitions_argsTupleScheme extends TupleScheme { + private static class set_hadoop_jobid_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, set_hadoop_jobid_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { + if (struct.isSetJobId()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); + if (struct.isSetCq_id()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetJobId()) { + oprot.writeString(struct.jobId); + } + if (struct.isSetCq_id()) { + oprot.writeI64(struct.cq_id); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, set_hadoop_jobid_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.rqst = new AddDynamicPartitions(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); + struct.jobId = iprot.readString(); + struct.setJobIdIsSet(true); + } + if (incoming.get(1)) { + struct.cq_id = iprot.readI64(); + struct.setCq_idIsSet(true); } } } } - @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_dynamic_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_result"); + @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class set_hadoop_jobid_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_hadoop_jobid_result"); - private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new add_dynamic_partitions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_dynamic_partitions_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new set_hadoop_jobid_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_hadoop_jobid_resultTupleSchemeFactory()); } - private NoSuchTxnException o1; // required - private TxnAbortedException o2; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); +; private static final Map byName = new HashMap(); @@ -203006,10 +210206,6 @@ public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitio */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; default: return null; } @@ -203048,128 +210244,37 @@ 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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_hadoop_jobid_result.class, metaDataMap); } - public add_dynamic_partitions_result() { - } - - public add_dynamic_partitions_result( - NoSuchTxnException o1, - TxnAbortedException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; + public set_hadoop_jobid_result() { } /** * Performs a deep copy on other. */ - public add_dynamic_partitions_result(add_dynamic_partitions_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchTxnException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new TxnAbortedException(other.o2); - } + public set_hadoop_jobid_result(set_hadoop_jobid_result other) { } - public add_dynamic_partitions_result deepCopy() { - return new add_dynamic_partitions_result(this); + public set_hadoop_jobid_result deepCopy() { + return new set_hadoop_jobid_result(this); } @Override public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchTxnException getO1() { - return this.o1; - } - - public void setO1(NoSuchTxnException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public TxnAbortedException getO2() { - return this.o2; - } - - public void setO2(TxnAbortedException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchTxnException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((TxnAbortedException)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - } throw new IllegalStateException(); } @@ -203181,10 +210286,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -203193,33 +210294,15 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_dynamic_partitions_result) - return this.equals((add_dynamic_partitions_result)that); + if (that instanceof set_hadoop_jobid_result) + return this.equals((set_hadoop_jobid_result)that); return false; } - public boolean equals(add_dynamic_partitions_result that) { + public boolean equals(set_hadoop_jobid_result that) { if (that == null) return false; - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - return true; } @@ -203227,47 +210310,17 @@ public boolean equals(add_dynamic_partitions_result that) { public int hashCode() { List list = new ArrayList(); - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - return list.hashCode(); } @Override - public int compareTo(add_dynamic_partitions_result other) { + public int compareTo(set_hadoop_jobid_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -203285,24 +210338,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("add_dynamic_partitions_result("); + StringBuilder sb = new StringBuilder("set_hadoop_jobid_result("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; sb.append(")"); return sb.toString(); } @@ -203328,15 +210366,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class add_dynamic_partitions_resultStandardSchemeFactory implements SchemeFactory { - public add_dynamic_partitions_resultStandardScheme getScheme() { - return new add_dynamic_partitions_resultStandardScheme(); + private static class set_hadoop_jobid_resultStandardSchemeFactory implements SchemeFactory { + public set_hadoop_jobid_resultStandardScheme getScheme() { + return new set_hadoop_jobid_resultStandardScheme(); } } - private static class add_dynamic_partitions_resultStandardScheme extends StandardScheme { + private static class set_hadoop_jobid_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, set_hadoop_jobid_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -203346,24 +210384,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partiti break; } switch (schemeField.id) { - case 1: // O1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o1 = new NoSuchTxnException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // O2 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o2 = new TxnAbortedException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -203373,67 +210393,32 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partiti struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, set_hadoop_jobid_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.o1 != null) { - oprot.writeFieldBegin(O1_FIELD_DESC); - struct.o1.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.o2 != null) { - oprot.writeFieldBegin(O2_FIELD_DESC); - struct.o2.write(oprot); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class add_dynamic_partitions_resultTupleSchemeFactory implements SchemeFactory { - public add_dynamic_partitions_resultTupleScheme getScheme() { - return new add_dynamic_partitions_resultTupleScheme(); + private static class set_hadoop_jobid_resultTupleSchemeFactory implements SchemeFactory { + public set_hadoop_jobid_resultTupleScheme getScheme() { + return new set_hadoop_jobid_resultTupleScheme(); } } - private static class add_dynamic_partitions_resultTupleScheme extends TupleScheme { + private static class set_hadoop_jobid_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, set_hadoop_jobid_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetO1()) { - optionals.set(0); - } - if (struct.isSetO2()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - if (struct.isSetO2()) { - struct.o2.write(oprot); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, set_hadoop_jobid_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.o1 = new NoSuchTxnException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - if (incoming.get(1)) { - struct.o2 = new TxnAbortedException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } } } @@ -237440,14 +244425,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_all_vers case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list1564 = iprot.readListBegin(); - struct.success = new ArrayList(_list1564.size); - SchemaVersion _elem1565; - for (int _i1566 = 0; _i1566 < _list1564.size; ++_i1566) + org.apache.thrift.protocol.TList _list1572 = iprot.readListBegin(); + struct.success = new ArrayList(_list1572.size); + SchemaVersion _elem1573; + for (int _i1574 = 0; _i1574 < _list1572.size; ++_i1574) { - _elem1565 = new SchemaVersion(); - _elem1565.read(iprot); - struct.success.add(_elem1565); + _elem1573 = new SchemaVersion(); + _elem1573.read(iprot); + struct.success.add(_elem1573); } iprot.readListEnd(); } @@ -237491,9 +244476,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_all_ver oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (SchemaVersion _iter1567 : struct.success) + for (SchemaVersion _iter1575 : struct.success) { - _iter1567.write(oprot); + _iter1575.write(oprot); } oprot.writeListEnd(); } @@ -237540,9 +244525,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_all_vers if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (SchemaVersion _iter1568 : struct.success) + for (SchemaVersion _iter1576 : struct.success) { - _iter1568.write(oprot); + _iter1576.write(oprot); } } } @@ -237560,14 +244545,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_all_versi BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list1569 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1569.size); - SchemaVersion _elem1570; - for (int _i1571 = 0; _i1571 < _list1569.size; ++_i1571) + org.apache.thrift.protocol.TList _list1577 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1577.size); + SchemaVersion _elem1578; + for (int _i1579 = 0; _i1579 < _list1577.size; ++_i1579) { - _elem1570 = new SchemaVersion(); - _elem1570.read(iprot); - struct.success.add(_elem1570); + _elem1578 = new SchemaVersion(); + _elem1578.read(iprot); + struct.success.add(_elem1578); } } struct.setSuccessIsSet(true); @@ -246110,14 +253095,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, get_runtime_stats_r case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list1572 = iprot.readListBegin(); - struct.success = new ArrayList(_list1572.size); - RuntimeStat _elem1573; - for (int _i1574 = 0; _i1574 < _list1572.size; ++_i1574) + org.apache.thrift.protocol.TList _list1580 = iprot.readListBegin(); + struct.success = new ArrayList(_list1580.size); + RuntimeStat _elem1581; + for (int _i1582 = 0; _i1582 < _list1580.size; ++_i1582) { - _elem1573 = new RuntimeStat(); - _elem1573.read(iprot); - struct.success.add(_elem1573); + _elem1581 = new RuntimeStat(); + _elem1581.read(iprot); + struct.success.add(_elem1581); } iprot.readListEnd(); } @@ -246152,9 +253137,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, get_runtime_stats_ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (RuntimeStat _iter1575 : struct.success) + for (RuntimeStat _iter1583 : struct.success) { - _iter1575.write(oprot); + _iter1583.write(oprot); } oprot.writeListEnd(); } @@ -246193,9 +253178,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, get_runtime_stats_r if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (RuntimeStat _iter1576 : struct.success) + for (RuntimeStat _iter1584 : struct.success) { - _iter1576.write(oprot); + _iter1584.write(oprot); } } } @@ -246210,14 +253195,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, get_runtime_stats_re BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list1577 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1577.size); - RuntimeStat _elem1578; - for (int _i1579 = 0; _i1579 < _list1577.size; ++_i1579) + org.apache.thrift.protocol.TList _list1585 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1585.size); + RuntimeStat _elem1586; + for (int _i1587 = 0; _i1587 < _list1585.size; ++_i1587) { - _elem1578 = new RuntimeStat(); - _elem1578.read(iprot); - struct.success.add(_elem1578); + _elem1586 = new RuntimeStat(); + _elem1586.read(iprot); + struct.success.add(_elem1586); } } struct.setSuccessIsSet(true); diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php index 3170798663..9b7f5876e5 100644 --- standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php +++ standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php @@ -1293,6 +1293,47 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf { * @throws \metastore\TxnAbortedException */ public function add_dynamic_partitions(\metastore\AddDynamicPartitions $rqst); + /** + * @param string $workerId + * @return \metastore\OptionalCompactionInfoStruct + * @throws \metastore\MetaException + */ + public function find_next_compact($workerId); + /** + * @param \metastore\CompactionInfoStruct $cr + * @param int $high_watermark + */ + public function set_compaction_highest_writeid(\metastore\CompactionInfoStruct $cr, $high_watermark); + /** + * @param int $cq_id + * @param string $user + */ + public function set_run_as($cq_id, $user); + /** + * @param \metastore\CompactionInfoStruct $cr + * @return string[] + */ + public function find_columns_with_stats(\metastore\CompactionInfoStruct $cr); + /** + * @param \metastore\CompactionInfoStruct $cr + * @throws \metastore\MetaException + */ + public function mark_cleaned(\metastore\CompactionInfoStruct $cr); + /** + * @param \metastore\CompactionInfoStruct $cr + * @throws \metastore\MetaException + */ + public function mark_compacted(\metastore\CompactionInfoStruct $cr); + /** + * @param \metastore\CompactionInfoStruct $cr + * @throws \metastore\MetaException + */ + public function mark_failed(\metastore\CompactionInfoStruct $cr); + /** + * @param string $jobId + * @param int $cq_id + */ + public function set_hadoop_jobid($jobId, $cq_id); /** * @param \metastore\NotificationEventRequest $rqst * @return \metastore\NotificationEventResponse @@ -11090,6 +11131,411 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas return; } + public function find_next_compact($workerId) + { + $this->send_find_next_compact($workerId); + return $this->recv_find_next_compact(); + } + + public function send_find_next_compact($workerId) + { + $args = new \metastore\ThriftHiveMetastore_find_next_compact_args(); + $args->workerId = $workerId; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'find_next_compact', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('find_next_compact', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_find_next_compact() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_find_next_compact_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_find_next_compact_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("find_next_compact failed: unknown result"); + } + + public function set_compaction_highest_writeid(\metastore\CompactionInfoStruct $cr, $high_watermark) + { + $this->send_set_compaction_highest_writeid($cr, $high_watermark); + $this->recv_set_compaction_highest_writeid(); + } + + public function send_set_compaction_highest_writeid(\metastore\CompactionInfoStruct $cr, $high_watermark) + { + $args = new \metastore\ThriftHiveMetastore_set_compaction_highest_writeid_args(); + $args->cr = $cr; + $args->high_watermark = $high_watermark; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'set_compaction_highest_writeid', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('set_compaction_highest_writeid', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_set_compaction_highest_writeid() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_set_compaction_highest_writeid_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_set_compaction_highest_writeid_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + return; + } + + public function set_run_as($cq_id, $user) + { + $this->send_set_run_as($cq_id, $user); + $this->recv_set_run_as(); + } + + public function send_set_run_as($cq_id, $user) + { + $args = new \metastore\ThriftHiveMetastore_set_run_as_args(); + $args->cq_id = $cq_id; + $args->user = $user; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'set_run_as', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('set_run_as', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_set_run_as() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_set_run_as_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_set_run_as_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + return; + } + + public function find_columns_with_stats(\metastore\CompactionInfoStruct $cr) + { + $this->send_find_columns_with_stats($cr); + return $this->recv_find_columns_with_stats(); + } + + public function send_find_columns_with_stats(\metastore\CompactionInfoStruct $cr) + { + $args = new \metastore\ThriftHiveMetastore_find_columns_with_stats_args(); + $args->cr = $cr; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'find_columns_with_stats', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('find_columns_with_stats', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_find_columns_with_stats() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_find_columns_with_stats_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_find_columns_with_stats_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("find_columns_with_stats failed: unknown result"); + } + + public function mark_cleaned(\metastore\CompactionInfoStruct $cr) + { + $this->send_mark_cleaned($cr); + $this->recv_mark_cleaned(); + } + + public function send_mark_cleaned(\metastore\CompactionInfoStruct $cr) + { + $args = new \metastore\ThriftHiveMetastore_mark_cleaned_args(); + $args->cr = $cr; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'mark_cleaned', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('mark_cleaned', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_mark_cleaned() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_mark_cleaned_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_mark_cleaned_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + + public function mark_compacted(\metastore\CompactionInfoStruct $cr) + { + $this->send_mark_compacted($cr); + $this->recv_mark_compacted(); + } + + public function send_mark_compacted(\metastore\CompactionInfoStruct $cr) + { + $args = new \metastore\ThriftHiveMetastore_mark_compacted_args(); + $args->cr = $cr; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'mark_compacted', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('mark_compacted', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_mark_compacted() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_mark_compacted_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_mark_compacted_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + + public function mark_failed(\metastore\CompactionInfoStruct $cr) + { + $this->send_mark_failed($cr); + $this->recv_mark_failed(); + } + + public function send_mark_failed(\metastore\CompactionInfoStruct $cr) + { + $args = new \metastore\ThriftHiveMetastore_mark_failed_args(); + $args->cr = $cr; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'mark_failed', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('mark_failed', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_mark_failed() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_mark_failed_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_mark_failed_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + + public function set_hadoop_jobid($jobId, $cq_id) + { + $this->send_set_hadoop_jobid($jobId, $cq_id); + $this->recv_set_hadoop_jobid(); + } + + public function send_set_hadoop_jobid($jobId, $cq_id) + { + $args = new \metastore\ThriftHiveMetastore_set_hadoop_jobid_args(); + $args->jobId = $jobId; + $args->cq_id = $cq_id; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'set_hadoop_jobid', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('set_hadoop_jobid', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_set_hadoop_jobid() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_set_hadoop_jobid_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_set_hadoop_jobid_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + return; + } + public function get_next_notification(\metastore\NotificationEventRequest $rqst) { $this->send_get_next_notification($rqst); @@ -52161,6 +52607,1287 @@ class ThriftHiveMetastore_add_dynamic_partitions_result { } +class ThriftHiveMetastore_find_next_compact_args { + static $_TSPEC; + + /** + * @var string + */ + public $workerId = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'workerId', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['workerId'])) { + $this->workerId = $vals['workerId']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_find_next_compact_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->workerId); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_find_next_compact_args'); + if ($this->workerId !== null) { + $xfer += $output->writeFieldBegin('workerId', TType::STRING, 1); + $xfer += $output->writeString($this->workerId); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_find_next_compact_result { + static $_TSPEC; + + /** + * @var \metastore\OptionalCompactionInfoStruct + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\OptionalCompactionInfoStruct', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_find_next_compact_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\OptionalCompactionInfoStruct(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_find_next_compact_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_compaction_highest_writeid_args { + static $_TSPEC; + + /** + * @var \metastore\CompactionInfoStruct + */ + public $cr = null; + /** + * @var int + */ + public $high_watermark = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cr', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionInfoStruct', + ), + 2 => array( + 'var' => 'high_watermark', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cr'])) { + $this->cr = $vals['cr']; + } + if (isset($vals['high_watermark'])) { + $this->high_watermark = $vals['high_watermark']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_compaction_highest_writeid_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->cr = new \metastore\CompactionInfoStruct(); + $xfer += $this->cr->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->high_watermark); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_compaction_highest_writeid_args'); + if ($this->cr !== null) { + if (!is_object($this->cr)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('cr', TType::STRUCT, 1); + $xfer += $this->cr->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->high_watermark !== null) { + $xfer += $output->writeFieldBegin('high_watermark', TType::I64, 2); + $xfer += $output->writeI64($this->high_watermark); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_compaction_highest_writeid_result { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_compaction_highest_writeid_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_compaction_highest_writeid_result'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_run_as_args { + static $_TSPEC; + + /** + * @var int + */ + public $cq_id = null; + /** + * @var string + */ + public $user = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cq_id', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'user', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cq_id'])) { + $this->cq_id = $vals['cq_id']; + } + if (isset($vals['user'])) { + $this->user = $vals['user']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_run_as_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->cq_id); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_run_as_args'); + if ($this->cq_id !== null) { + $xfer += $output->writeFieldBegin('cq_id', TType::I64, 1); + $xfer += $output->writeI64($this->cq_id); + $xfer += $output->writeFieldEnd(); + } + if ($this->user !== null) { + $xfer += $output->writeFieldBegin('user', TType::STRING, 2); + $xfer += $output->writeString($this->user); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_run_as_result { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_run_as_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_run_as_result'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_find_columns_with_stats_args { + static $_TSPEC; + + /** + * @var \metastore\CompactionInfoStruct + */ + public $cr = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cr', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionInfoStruct', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cr'])) { + $this->cr = $vals['cr']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_find_columns_with_stats_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->cr = new \metastore\CompactionInfoStruct(); + $xfer += $this->cr->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_find_columns_with_stats_args'); + if ($this->cr !== null) { + if (!is_object($this->cr)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('cr', TType::STRUCT, 1); + $xfer += $this->cr->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_find_columns_with_stats_result { + static $_TSPEC; + + /** + * @var string[] + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_find_columns_with_stats_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size1377 = 0; + $_etype1380 = 0; + $xfer += $input->readListBegin($_etype1380, $_size1377); + for ($_i1381 = 0; $_i1381 < $_size1377; ++$_i1381) + { + $elem1382 = null; + $xfer += $input->readString($elem1382); + $this->success []= $elem1382; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_find_columns_with_stats_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter1383) + { + $xfer += $output->writeString($iter1383); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_mark_cleaned_args { + static $_TSPEC; + + /** + * @var \metastore\CompactionInfoStruct + */ + public $cr = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cr', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionInfoStruct', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cr'])) { + $this->cr = $vals['cr']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_mark_cleaned_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->cr = new \metastore\CompactionInfoStruct(); + $xfer += $this->cr->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_mark_cleaned_args'); + if ($this->cr !== null) { + if (!is_object($this->cr)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('cr', TType::STRUCT, 1); + $xfer += $this->cr->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_mark_cleaned_result { + static $_TSPEC; + + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_mark_cleaned_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_mark_cleaned_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_mark_compacted_args { + static $_TSPEC; + + /** + * @var \metastore\CompactionInfoStruct + */ + public $cr = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cr', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionInfoStruct', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cr'])) { + $this->cr = $vals['cr']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_mark_compacted_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->cr = new \metastore\CompactionInfoStruct(); + $xfer += $this->cr->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_mark_compacted_args'); + if ($this->cr !== null) { + if (!is_object($this->cr)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('cr', TType::STRUCT, 1); + $xfer += $this->cr->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_mark_compacted_result { + static $_TSPEC; + + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_mark_compacted_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_mark_compacted_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_mark_failed_args { + static $_TSPEC; + + /** + * @var \metastore\CompactionInfoStruct + */ + public $cr = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cr', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionInfoStruct', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cr'])) { + $this->cr = $vals['cr']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_mark_failed_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->cr = new \metastore\CompactionInfoStruct(); + $xfer += $this->cr->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_mark_failed_args'); + if ($this->cr !== null) { + if (!is_object($this->cr)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('cr', TType::STRUCT, 1); + $xfer += $this->cr->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_mark_failed_result { + static $_TSPEC; + + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_mark_failed_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_mark_failed_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_hadoop_jobid_args { + static $_TSPEC; + + /** + * @var string + */ + public $jobId = null; + /** + * @var int + */ + public $cq_id = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'jobId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'cq_id', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['jobId'])) { + $this->jobId = $vals['jobId']; + } + if (isset($vals['cq_id'])) { + $this->cq_id = $vals['cq_id']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_hadoop_jobid_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->jobId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->cq_id); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_hadoop_jobid_args'); + if ($this->jobId !== null) { + $xfer += $output->writeFieldBegin('jobId', TType::STRING, 1); + $xfer += $output->writeString($this->jobId); + $xfer += $output->writeFieldEnd(); + } + if ($this->cq_id !== null) { + $xfer += $output->writeFieldBegin('cq_id', TType::I64, 2); + $xfer += $output->writeI64($this->cq_id); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_hadoop_jobid_result { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_hadoop_jobid_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_hadoop_jobid_result'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class ThriftHiveMetastore_get_next_notification_args { static $_TSPEC; @@ -59699,15 +61426,15 @@ class ThriftHiveMetastore_get_schema_all_versions_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size1377 = 0; - $_etype1380 = 0; - $xfer += $input->readListBegin($_etype1380, $_size1377); - for ($_i1381 = 0; $_i1381 < $_size1377; ++$_i1381) + $_size1384 = 0; + $_etype1387 = 0; + $xfer += $input->readListBegin($_etype1387, $_size1384); + for ($_i1388 = 0; $_i1388 < $_size1384; ++$_i1388) { - $elem1382 = null; - $elem1382 = new \metastore\SchemaVersion(); - $xfer += $elem1382->read($input); - $this->success []= $elem1382; + $elem1389 = null; + $elem1389 = new \metastore\SchemaVersion(); + $xfer += $elem1389->read($input); + $this->success []= $elem1389; } $xfer += $input->readListEnd(); } else { @@ -59751,9 +61478,9 @@ class ThriftHiveMetastore_get_schema_all_versions_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter1383) + foreach ($this->success as $iter1390) { - $xfer += $iter1383->write($output); + $xfer += $iter1390->write($output); } } $output->writeListEnd(); @@ -61622,15 +63349,15 @@ class ThriftHiveMetastore_get_runtime_stats_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size1384 = 0; - $_etype1387 = 0; - $xfer += $input->readListBegin($_etype1387, $_size1384); - for ($_i1388 = 0; $_i1388 < $_size1384; ++$_i1388) + $_size1391 = 0; + $_etype1394 = 0; + $xfer += $input->readListBegin($_etype1394, $_size1391); + for ($_i1395 = 0; $_i1395 < $_size1391; ++$_i1395) { - $elem1389 = null; - $elem1389 = new \metastore\RuntimeStat(); - $xfer += $elem1389->read($input); - $this->success []= $elem1389; + $elem1396 = null; + $elem1396 = new \metastore\RuntimeStat(); + $xfer += $elem1396->read($input); + $this->success []= $elem1396; } $xfer += $input->readListEnd(); } else { @@ -61666,9 +63393,9 @@ class ThriftHiveMetastore_get_runtime_stats_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter1390) + foreach ($this->success as $iter1397) { - $xfer += $iter1390->write($output); + $xfer += $iter1397->write($output); } } $output->writeListEnd(); diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php index 39f8b1f05a..4cc6e3ac43 100644 --- standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php +++ standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php @@ -21081,6 +21081,391 @@ class CompactionRequest { } +class OptionalCompactionInfoStruct { + static $_TSPEC; + + /** + * @var \metastore\CompactionInfoStruct + */ + public $ci = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'ci', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionInfoStruct', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['ci'])) { + $this->ci = $vals['ci']; + } + } + } + + public function getName() { + return 'OptionalCompactionInfoStruct'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->ci = new \metastore\CompactionInfoStruct(); + $xfer += $this->ci->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('OptionalCompactionInfoStruct'); + if ($this->ci !== null) { + if (!is_object($this->ci)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('ci', TType::STRUCT, 1); + $xfer += $this->ci->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CompactionInfoStruct { + static $_TSPEC; + + /** + * @var int + */ + public $id = null; + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tablename = null; + /** + * @var string + */ + public $partitionname = null; + /** + * @var int + */ + public $type = null; + /** + * @var string + */ + public $runas = null; + /** + * @var string + */ + public $properties = null; + /** + * @var bool + */ + public $toomanyaborts = null; + /** + * @var string + */ + public $state = null; + /** + * @var string + */ + public $workerId = null; + /** + * @var int + */ + public $start = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'id', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tablename', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partitionname', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'type', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'runas', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'properties', + 'type' => TType::STRING, + ), + 8 => array( + 'var' => 'toomanyaborts', + 'type' => TType::BOOL, + ), + 9 => array( + 'var' => 'state', + 'type' => TType::STRING, + ), + 10 => array( + 'var' => 'workerId', + 'type' => TType::STRING, + ), + 11 => array( + 'var' => 'start', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tablename'])) { + $this->tablename = $vals['tablename']; + } + if (isset($vals['partitionname'])) { + $this->partitionname = $vals['partitionname']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['runas'])) { + $this->runas = $vals['runas']; + } + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + if (isset($vals['toomanyaborts'])) { + $this->toomanyaborts = $vals['toomanyaborts']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + if (isset($vals['workerId'])) { + $this->workerId = $vals['workerId']; + } + if (isset($vals['start'])) { + $this->start = $vals['start']; + } + } + } + + public function getName() { + return 'CompactionInfoStruct'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tablename); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partitionname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->runas); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->properties); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->toomanyaborts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->workerId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->start); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('CompactionInfoStruct'); + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I64, 1); + $xfer += $output->writeI64($this->id); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 2); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tablename !== null) { + $xfer += $output->writeFieldBegin('tablename', TType::STRING, 3); + $xfer += $output->writeString($this->tablename); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionname !== null) { + $xfer += $output->writeFieldBegin('partitionname', TType::STRING, 4); + $xfer += $output->writeString($this->partitionname); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::I32, 5); + $xfer += $output->writeI32($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->runas !== null) { + $xfer += $output->writeFieldBegin('runas', TType::STRING, 6); + $xfer += $output->writeString($this->runas); + $xfer += $output->writeFieldEnd(); + } + if ($this->properties !== null) { + $xfer += $output->writeFieldBegin('properties', TType::STRING, 7); + $xfer += $output->writeString($this->properties); + $xfer += $output->writeFieldEnd(); + } + if ($this->toomanyaborts !== null) { + $xfer += $output->writeFieldBegin('toomanyaborts', TType::BOOL, 8); + $xfer += $output->writeBool($this->toomanyaborts); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::STRING, 9); + $xfer += $output->writeString($this->state); + $xfer += $output->writeFieldEnd(); + } + if ($this->workerId !== null) { + $xfer += $output->writeFieldBegin('workerId', TType::STRING, 10); + $xfer += $output->writeString($this->workerId); + $xfer += $output->writeFieldEnd(); + } + if ($this->start !== null) { + $xfer += $output->writeFieldBegin('start', TType::I64, 11); + $xfer += $output->writeI64($this->start); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class CompactionResponse { static $_TSPEC; diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote index d57de353c6..4caaccd24a 100755 --- standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -190,6 +190,14 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' CompactionResponse compact2(CompactionRequest rqst)') print(' ShowCompactResponse show_compact(ShowCompactRequest rqst)') print(' void add_dynamic_partitions(AddDynamicPartitions rqst)') + print(' OptionalCompactionInfoStruct find_next_compact(string workerId)') + print(' void set_compaction_highest_writeid(CompactionInfoStruct cr, i64 high_watermark)') + print(' void set_run_as(i64 cq_id, string user)') + print(' find_columns_with_stats(CompactionInfoStruct cr)') + print(' void mark_cleaned(CompactionInfoStruct cr)') + print(' void mark_compacted(CompactionInfoStruct cr)') + print(' void mark_failed(CompactionInfoStruct cr)') + print(' void set_hadoop_jobid(string jobId, i64 cq_id)') print(' NotificationEventResponse get_next_notification(NotificationEventRequest rqst)') print(' CurrentNotificationEventId get_current_notificationEventId()') print(' NotificationEventsCountResponse get_notification_events_count(NotificationEventsCountRequest rqst)') @@ -1304,6 +1312,54 @@ elif cmd == 'add_dynamic_partitions': sys.exit(1) pp.pprint(client.add_dynamic_partitions(eval(args[0]),)) +elif cmd == 'find_next_compact': + if len(args) != 1: + print('find_next_compact requires 1 args') + sys.exit(1) + pp.pprint(client.find_next_compact(args[0],)) + +elif cmd == 'set_compaction_highest_writeid': + if len(args) != 2: + print('set_compaction_highest_writeid requires 2 args') + sys.exit(1) + pp.pprint(client.set_compaction_highest_writeid(eval(args[0]),eval(args[1]),)) + +elif cmd == 'set_run_as': + if len(args) != 2: + print('set_run_as requires 2 args') + sys.exit(1) + pp.pprint(client.set_run_as(eval(args[0]),args[1],)) + +elif cmd == 'find_columns_with_stats': + if len(args) != 1: + print('find_columns_with_stats requires 1 args') + sys.exit(1) + pp.pprint(client.find_columns_with_stats(eval(args[0]),)) + +elif cmd == 'mark_cleaned': + if len(args) != 1: + print('mark_cleaned requires 1 args') + sys.exit(1) + pp.pprint(client.mark_cleaned(eval(args[0]),)) + +elif cmd == 'mark_compacted': + if len(args) != 1: + print('mark_compacted requires 1 args') + sys.exit(1) + pp.pprint(client.mark_compacted(eval(args[0]),)) + +elif cmd == 'mark_failed': + if len(args) != 1: + print('mark_failed requires 1 args') + sys.exit(1) + pp.pprint(client.mark_failed(eval(args[0]),)) + +elif cmd == 'set_hadoop_jobid': + if len(args) != 2: + print('set_hadoop_jobid requires 2 args') + sys.exit(1) + pp.pprint(client.set_hadoop_jobid(args[0],eval(args[1]),)) + elif cmd == 'get_next_notification': if len(args) != 1: print('get_next_notification requires 1 args') diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py index a896849989..482ef2ef2e 100644 --- standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -1324,6 +1324,65 @@ def add_dynamic_partitions(self, rqst): """ pass + def find_next_compact(self, workerId): + """ + Parameters: + - workerId + """ + pass + + def set_compaction_highest_writeid(self, cr, high_watermark): + """ + Parameters: + - cr + - high_watermark + """ + pass + + def set_run_as(self, cq_id, user): + """ + Parameters: + - cq_id + - user + """ + pass + + def find_columns_with_stats(self, cr): + """ + Parameters: + - cr + """ + pass + + def mark_cleaned(self, cr): + """ + Parameters: + - cr + """ + pass + + def mark_compacted(self, cr): + """ + Parameters: + - cr + """ + pass + + def mark_failed(self, cr): + """ + Parameters: + - cr + """ + pass + + def set_hadoop_jobid(self, jobId, cq_id): + """ + Parameters: + - jobId + - cq_id + """ + pass + def get_next_notification(self, rqst): """ Parameters: @@ -7675,6 +7734,256 @@ def recv_add_dynamic_partitions(self): raise result.o2 return + def find_next_compact(self, workerId): + """ + Parameters: + - workerId + """ + self.send_find_next_compact(workerId) + return self.recv_find_next_compact() + + def send_find_next_compact(self, workerId): + self._oprot.writeMessageBegin('find_next_compact', TMessageType.CALL, self._seqid) + args = find_next_compact_args() + args.workerId = workerId + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_find_next_compact(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = find_next_compact_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "find_next_compact failed: unknown result") + + def set_compaction_highest_writeid(self, cr, high_watermark): + """ + Parameters: + - cr + - high_watermark + """ + self.send_set_compaction_highest_writeid(cr, high_watermark) + self.recv_set_compaction_highest_writeid() + + def send_set_compaction_highest_writeid(self, cr, high_watermark): + self._oprot.writeMessageBegin('set_compaction_highest_writeid', TMessageType.CALL, self._seqid) + args = set_compaction_highest_writeid_args() + args.cr = cr + args.high_watermark = high_watermark + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_compaction_highest_writeid(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_compaction_highest_writeid_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def set_run_as(self, cq_id, user): + """ + Parameters: + - cq_id + - user + """ + self.send_set_run_as(cq_id, user) + self.recv_set_run_as() + + def send_set_run_as(self, cq_id, user): + self._oprot.writeMessageBegin('set_run_as', TMessageType.CALL, self._seqid) + args = set_run_as_args() + args.cq_id = cq_id + args.user = user + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_run_as(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_run_as_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def find_columns_with_stats(self, cr): + """ + Parameters: + - cr + """ + self.send_find_columns_with_stats(cr) + return self.recv_find_columns_with_stats() + + def send_find_columns_with_stats(self, cr): + self._oprot.writeMessageBegin('find_columns_with_stats', TMessageType.CALL, self._seqid) + args = find_columns_with_stats_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_find_columns_with_stats(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = find_columns_with_stats_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "find_columns_with_stats failed: unknown result") + + def mark_cleaned(self, cr): + """ + Parameters: + - cr + """ + self.send_mark_cleaned(cr) + self.recv_mark_cleaned() + + def send_mark_cleaned(self, cr): + self._oprot.writeMessageBegin('mark_cleaned', TMessageType.CALL, self._seqid) + args = mark_cleaned_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mark_cleaned(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mark_cleaned_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def mark_compacted(self, cr): + """ + Parameters: + - cr + """ + self.send_mark_compacted(cr) + self.recv_mark_compacted() + + def send_mark_compacted(self, cr): + self._oprot.writeMessageBegin('mark_compacted', TMessageType.CALL, self._seqid) + args = mark_compacted_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mark_compacted(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mark_compacted_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def mark_failed(self, cr): + """ + Parameters: + - cr + """ + self.send_mark_failed(cr) + self.recv_mark_failed() + + def send_mark_failed(self, cr): + self._oprot.writeMessageBegin('mark_failed', TMessageType.CALL, self._seqid) + args = mark_failed_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mark_failed(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mark_failed_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def set_hadoop_jobid(self, jobId, cq_id): + """ + Parameters: + - jobId + - cq_id + """ + self.send_set_hadoop_jobid(jobId, cq_id) + self.recv_set_hadoop_jobid() + + def send_set_hadoop_jobid(self, jobId, cq_id): + self._oprot.writeMessageBegin('set_hadoop_jobid', TMessageType.CALL, self._seqid) + args = set_hadoop_jobid_args() + args.jobId = jobId + args.cq_id = cq_id + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_hadoop_jobid(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_hadoop_jobid_result() + result.read(iprot) + iprot.readMessageEnd() + return + def get_next_notification(self, rqst): """ Parameters: @@ -9507,6 +9816,14 @@ def __init__(self, handler): self._processMap["compact2"] = Processor.process_compact2 self._processMap["show_compact"] = Processor.process_show_compact self._processMap["add_dynamic_partitions"] = Processor.process_add_dynamic_partitions + self._processMap["find_next_compact"] = Processor.process_find_next_compact + self._processMap["set_compaction_highest_writeid"] = Processor.process_set_compaction_highest_writeid + self._processMap["set_run_as"] = Processor.process_set_run_as + self._processMap["find_columns_with_stats"] = Processor.process_find_columns_with_stats + self._processMap["mark_cleaned"] = Processor.process_mark_cleaned + self._processMap["mark_compacted"] = Processor.process_mark_compacted + self._processMap["mark_failed"] = Processor.process_mark_failed + self._processMap["set_hadoop_jobid"] = Processor.process_set_hadoop_jobid self._processMap["get_next_notification"] = Processor.process_get_next_notification self._processMap["get_current_notificationEventId"] = Processor.process_get_current_notificationEventId self._processMap["get_notification_events_count"] = Processor.process_get_notification_events_count @@ -13695,6 +14012,170 @@ def process_add_dynamic_partitions(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() + def process_find_next_compact(self, seqid, iprot, oprot): + args = find_next_compact_args() + args.read(iprot) + iprot.readMessageEnd() + result = find_next_compact_result() + try: + result.success = self._handler.find_next_compact(args.workerId) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("find_next_compact", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_compaction_highest_writeid(self, seqid, iprot, oprot): + args = set_compaction_highest_writeid_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_compaction_highest_writeid_result() + try: + self._handler.set_compaction_highest_writeid(args.cr, args.high_watermark) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_compaction_highest_writeid", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_run_as(self, seqid, iprot, oprot): + args = set_run_as_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_run_as_result() + try: + self._handler.set_run_as(args.cq_id, args.user) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_run_as", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_find_columns_with_stats(self, seqid, iprot, oprot): + args = find_columns_with_stats_args() + args.read(iprot) + iprot.readMessageEnd() + result = find_columns_with_stats_result() + try: + result.success = self._handler.find_columns_with_stats(args.cr) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("find_columns_with_stats", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mark_cleaned(self, seqid, iprot, oprot): + args = mark_cleaned_args() + args.read(iprot) + iprot.readMessageEnd() + result = mark_cleaned_result() + try: + self._handler.mark_cleaned(args.cr) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("mark_cleaned", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mark_compacted(self, seqid, iprot, oprot): + args = mark_compacted_args() + args.read(iprot) + iprot.readMessageEnd() + result = mark_compacted_result() + try: + self._handler.mark_compacted(args.cr) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("mark_compacted", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mark_failed(self, seqid, iprot, oprot): + args = mark_failed_args() + args.read(iprot) + iprot.readMessageEnd() + result = mark_failed_result() + try: + self._handler.mark_failed(args.cr) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("mark_failed", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_hadoop_jobid(self, seqid, iprot, oprot): + args = set_hadoop_jobid_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_hadoop_jobid_result() + try: + self._handler.set_hadoop_jobid(args.jobId, args.cq_id) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_hadoop_jobid", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_get_next_notification(self, seqid, iprot, oprot): args = get_next_notification_args() args.read(iprot) @@ -40890,19 +41371,1350 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class abort_txn_result: +class abort_txn_result: + """ + Attributes: + - o1 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + ) + + def __init__(self, o1=None,): + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('abort_txn_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class abort_txns_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (AbortTxnsRequest, AbortTxnsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AbortTxnsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('abort_txns_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class abort_txns_result: + """ + Attributes: + - o1 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + ) + + def __init__(self, o1=None,): + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('abort_txns_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class commit_txn_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (CommitTxnRequest, CommitTxnRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CommitTxnRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('commit_txn_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class commit_txn_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('commit_txn_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class repl_tbl_writeid_state_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (ReplTblWriteIdStateRequest, ReplTblWriteIdStateRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = ReplTblWriteIdStateRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('repl_tbl_writeid_state_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class repl_tbl_writeid_state_result: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('repl_tbl_writeid_state_result') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_valid_write_ids_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (GetValidWriteIdsRequest, GetValidWriteIdsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = GetValidWriteIdsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_valid_write_ids_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_valid_write_ids_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetValidWriteIdsResponse, GetValidWriteIdsResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetValidWriteIdsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_valid_write_ids_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class allocate_table_write_ids_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (AllocateTableWriteIdsRequest, AllocateTableWriteIdsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AllocateTableWriteIdsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('allocate_table_write_ids_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class allocate_table_write_ids_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (AllocateTableWriteIdsResponse, AllocateTableWriteIdsResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AllocateTableWriteIdsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('allocate_table_write_ids_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class lock_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (LockRequest, LockRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = LockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('lock_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class lock_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (LockResponse, LockResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = LockResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('lock_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class check_lock_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (CheckLockRequest, CheckLockRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CheckLockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('check_lock_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class check_lock_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (LockResponse, LockResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = LockResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = NoSuchLockException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('check_lock_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class unlock_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (UnlockRequest, UnlockRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = UnlockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('unlock_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class unlock_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnOpenException, TxnOpenException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchLockException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnOpenException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('unlock_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class show_locks_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (ShowLocksRequest, ShowLocksRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = ShowLocksRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('show_locks_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class show_locks_result: """ Attributes: - - o1 + - success """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (0, TType.STRUCT, 'success', (ShowLocksResponse, ShowLocksResponse.thrift_spec), None, ), # 0 ) - def __init__(self, o1=None,): - self.o1 = o1 + def __init__(self, success=None,): + self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -40913,10 +42725,10 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) + self.success = ShowLocksResponse() + self.success.read(iprot) else: iprot.skip(ftype) else: @@ -40928,10 +42740,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('abort_txn_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) + oprot.writeStructBegin('show_locks_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -40942,7 +42754,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.success) return value def __repr__(self): @@ -40956,19 +42768,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class abort_txns_args: +class heartbeat_args: """ Attributes: - - rqst + - ids """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (AbortTxnsRequest, AbortTxnsRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'ids', (HeartbeatRequest, HeartbeatRequest.thrift_spec), None, ), # 1 ) - def __init__(self, rqst=None,): - self.rqst = rqst + def __init__(self, ids=None,): + self.ids = ids def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -40981,8 +42793,8 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = AbortTxnsRequest() - self.rqst.read(iprot) + self.ids = HeartbeatRequest() + self.ids.read(iprot) else: iprot.skip(ftype) else: @@ -40994,10 +42806,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('abort_txns_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) + oprot.writeStructBegin('heartbeat_args') + if self.ids is not None: + oprot.writeFieldBegin('ids', TType.STRUCT, 1) + self.ids.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -41008,7 +42820,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.rqst) + value = (value * 31) ^ hash(self.ids) return value def __repr__(self): @@ -41022,19 +42834,25 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class abort_txns_result: +class heartbeat_result: """ Attributes: - o1 + - o2 + - o3 """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'o1', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 3 ) - def __init__(self, o1=None,): + def __init__(self, o1=None, o2=None, o3=None,): self.o1 = o1 + self.o2 = o2 + self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -41047,10 +42865,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() + self.o1 = NoSuchLockException() self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchTxnException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = TxnAbortedException() + self.o3.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -41060,11 +42890,19 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('abort_txns_result') + oprot.writeStructBegin('heartbeat_result') if self.o1 is not None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -41075,6 +42913,8 @@ def validate(self): def __hash__(self): value = 17 value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) return value def __repr__(self): @@ -41088,19 +42928,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class commit_txn_args: +class heartbeat_txn_range_args: """ Attributes: - - rqst + - txns """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (CommitTxnRequest, CommitTxnRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'txns', (HeartbeatTxnRangeRequest, HeartbeatTxnRangeRequest.thrift_spec), None, ), # 1 ) - def __init__(self, rqst=None,): - self.rqst = rqst + def __init__(self, txns=None,): + self.txns = txns def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -41113,8 +42953,8 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = CommitTxnRequest() - self.rqst.read(iprot) + self.txns = HeartbeatTxnRangeRequest() + self.txns.read(iprot) else: iprot.skip(ftype) else: @@ -41126,10 +42966,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('commit_txn_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) + oprot.writeStructBegin('heartbeat_txn_range_args') + if self.txns is not None: + oprot.writeFieldBegin('txns', TType.STRUCT, 1) + self.txns.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -41140,7 +42980,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.rqst) + value = (value * 31) ^ hash(self.txns) return value def __repr__(self): @@ -41154,22 +42994,18 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class commit_txn_result: +class heartbeat_txn_range_result: """ Attributes: - - o1 - - o2 + - success """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (HeartbeatTxnRangeResponse, HeartbeatTxnRangeResponse.thrift_spec), None, ), # 0 ) - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 + def __init__(self, success=None,): + self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -41180,16 +43016,10 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: + if fid == 0: if ftype == TType.STRUCT: - self.o2 = TxnAbortedException() - self.o2.read(iprot) + self.success = HeartbeatTxnRangeResponse() + self.success.read(iprot) else: iprot.skip(ftype) else: @@ -41201,14 +43031,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('commit_txn_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) + oprot.writeStructBegin('heartbeat_txn_range_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -41219,8 +43045,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.success) return value def __repr__(self): @@ -41234,7 +43059,7 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class repl_tbl_writeid_state_args: +class compact_args: """ Attributes: - rqst @@ -41242,7 +43067,7 @@ class repl_tbl_writeid_state_args: thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (ReplTblWriteIdStateRequest, ReplTblWriteIdStateRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 ) def __init__(self, rqst=None,): @@ -41259,7 +43084,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = ReplTblWriteIdStateRequest() + self.rqst = CompactionRequest() self.rqst.read(iprot) else: iprot.skip(ftype) @@ -41272,7 +43097,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('repl_tbl_writeid_state_args') + oprot.writeStructBegin('compact_args') if self.rqst is not None: oprot.writeFieldBegin('rqst', TType.STRUCT, 1) self.rqst.write(oprot) @@ -41300,7 +43125,7 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class repl_tbl_writeid_state_result: +class compact_result: thrift_spec = ( ) @@ -41323,7 +43148,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('repl_tbl_writeid_state_result') + oprot.writeStructBegin('compact_result') oprot.writeFieldStop() oprot.writeStructEnd() @@ -41346,7 +43171,7 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class get_valid_write_ids_args: +class compact2_args: """ Attributes: - rqst @@ -41354,7 +43179,7 @@ class get_valid_write_ids_args: thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (GetValidWriteIdsRequest, GetValidWriteIdsRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 ) def __init__(self, rqst=None,): @@ -41371,7 +43196,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = GetValidWriteIdsRequest() + self.rqst = CompactionRequest() self.rqst.read(iprot) else: iprot.skip(ftype) @@ -41384,7 +43209,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_valid_write_ids_args') + oprot.writeStructBegin('compact2_args') if self.rqst is not None: oprot.writeFieldBegin('rqst', TType.STRUCT, 1) self.rqst.write(oprot) @@ -41412,24 +43237,18 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class get_valid_write_ids_result: +class compact2_result: """ Attributes: - success - - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (GetValidWriteIdsResponse, GetValidWriteIdsResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (CompactionResponse, CompactionResponse.thrift_spec), None, ), # 0 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None,): self.success = success - self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -41442,22 +43261,10 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRUCT: - self.success = GetValidWriteIdsResponse() + self.success = CompactionResponse() self.success.read(iprot) else: iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -41467,19 +43274,11 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_valid_write_ids_result') + oprot.writeStructBegin('compact2_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -41490,8 +43289,6 @@ def validate(self): def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) return value def __repr__(self): @@ -41505,7 +43302,7 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class allocate_table_write_ids_args: +class show_compact_args: """ Attributes: - rqst @@ -41513,7 +43310,7 @@ class allocate_table_write_ids_args: thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (AllocateTableWriteIdsRequest, AllocateTableWriteIdsRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'rqst', (ShowCompactRequest, ShowCompactRequest.thrift_spec), None, ), # 1 ) def __init__(self, rqst=None,): @@ -41530,7 +43327,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = AllocateTableWriteIdsRequest() + self.rqst = ShowCompactRequest() self.rqst.read(iprot) else: iprot.skip(ftype) @@ -41543,7 +43340,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('allocate_table_write_ids_args') + oprot.writeStructBegin('show_compact_args') if self.rqst is not None: oprot.writeFieldBegin('rqst', TType.STRUCT, 1) self.rqst.write(oprot) @@ -41571,27 +43368,18 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class allocate_table_write_ids_result: +class show_compact_result: """ Attributes: - success - - o1 - - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (AllocateTableWriteIdsResponse, AllocateTableWriteIdsResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.STRUCT, 'success', (ShowCompactResponse, ShowCompactResponse.thrift_spec), None, ), # 0 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None,): self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -41604,28 +43392,10 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRUCT: - self.success = AllocateTableWriteIdsResponse() + self.success = ShowCompactResponse() self.success.read(iprot) else: iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnAbortedException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -41635,23 +43405,11 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('allocate_table_write_ids_result') + oprot.writeStructBegin('show_compact_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -41662,9 +43420,6 @@ def validate(self): def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) return value def __repr__(self): @@ -41678,7 +43433,7 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class lock_args: +class add_dynamic_partitions_args: """ Attributes: - rqst @@ -41686,7 +43441,7 @@ class lock_args: thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (LockRequest, LockRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'rqst', (AddDynamicPartitions, AddDynamicPartitions.thrift_spec), None, ), # 1 ) def __init__(self, rqst=None,): @@ -41703,7 +43458,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = LockRequest() + self.rqst = AddDynamicPartitions() self.rqst.read(iprot) else: iprot.skip(ftype) @@ -41716,7 +43471,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('lock_args') + oprot.writeStructBegin('add_dynamic_partitions_args') if self.rqst is not None: oprot.writeFieldBegin('rqst', TType.STRUCT, 1) self.rqst.write(oprot) @@ -41744,22 +43499,20 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class lock_result: +class add_dynamic_partitions_result: """ Attributes: - - success - o1 - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (LockResponse, LockResponse.thrift_spec), None, ), # 0 + None, # 0 (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): - self.success = success + def __init__(self, o1=None, o2=None,): self.o1 = o1 self.o2 = o2 @@ -41772,13 +43525,7 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 0: - if ftype == TType.STRUCT: - self.success = LockResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: + if fid == 1: if ftype == TType.STRUCT: self.o1 = NoSuchTxnException() self.o1.read(iprot) @@ -41799,11 +43546,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('lock_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() + oprot.writeStructBegin('add_dynamic_partitions_result') if self.o1 is not None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -41821,7 +43564,6 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.success) value = (value * 31) ^ hash(self.o1) value = (value * 31) ^ hash(self.o2) return value @@ -41837,19 +43579,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class check_lock_args: +class find_next_compact_args: """ Attributes: - - rqst + - workerId """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (CheckLockRequest, CheckLockRequest.thrift_spec), None, ), # 1 + (1, TType.STRING, 'workerId', None, None, ), # 1 ) - def __init__(self, rqst=None,): - self.rqst = rqst + def __init__(self, workerId=None,): + self.workerId = workerId def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -41861,9 +43603,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.rqst = CheckLockRequest() - self.rqst.read(iprot) + if ftype == TType.STRING: + self.workerId = iprot.readString() else: iprot.skip(ftype) else: @@ -41875,10 +43616,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('check_lock_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) + oprot.writeStructBegin('find_next_compact_args') + if self.workerId is not None: + oprot.writeFieldBegin('workerId', TType.STRING, 1) + oprot.writeString(self.workerId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -41889,7 +43630,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.rqst) + value = (value * 31) ^ hash(self.workerId) return value def __repr__(self): @@ -41903,27 +43644,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class check_lock_result: +class find_next_compact_result: """ Attributes: - success - o1 - - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (LockResponse, LockResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 3 + (0, TType.STRUCT, 'success', (OptionalCompactionInfoStruct, OptionalCompactionInfoStruct.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -41936,28 +43671,16 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRUCT: - self.success = LockResponse() + self.success = OptionalCompactionInfoStruct() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnAbortedException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = NoSuchLockException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -41967,7 +43690,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('check_lock_result') + oprot.writeStructBegin('find_next_compact_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -41976,14 +43699,6 @@ def write(self, oprot): oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -41995,8 +43710,6 @@ def __hash__(self): value = 17 value = (value * 31) ^ hash(self.success) value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) return value def __repr__(self): @@ -42010,19 +43723,22 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class unlock_args: +class set_compaction_highest_writeid_args: """ Attributes: - - rqst + - cr + - high_watermark """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (UnlockRequest, UnlockRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'cr', (CompactionInfoStruct, CompactionInfoStruct.thrift_spec), None, ), # 1 + (2, TType.I64, 'high_watermark', None, None, ), # 2 ) - def __init__(self, rqst=None,): - self.rqst = rqst + def __init__(self, cr=None, high_watermark=None,): + self.cr = cr + self.high_watermark = high_watermark def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42035,8 +43751,13 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = UnlockRequest() - self.rqst.read(iprot) + self.cr = CompactionInfoStruct() + self.cr.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.high_watermark = iprot.readI64() else: iprot.skip(ftype) else: @@ -42048,10 +43769,14 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('unlock_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) + oprot.writeStructBegin('set_compaction_highest_writeid_args') + if self.cr is not None: + oprot.writeFieldBegin('cr', TType.STRUCT, 1) + self.cr.write(oprot) + oprot.writeFieldEnd() + if self.high_watermark is not None: + oprot.writeFieldBegin('high_watermark', TType.I64, 2) + oprot.writeI64(self.high_watermark) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42062,7 +43787,8 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.rqst) + value = (value * 31) ^ hash(self.cr) + value = (value * 31) ^ hash(self.high_watermark) return value def __repr__(self): @@ -42076,22 +43802,68 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class unlock_result: +class set_compaction_highest_writeid_result: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('set_compaction_highest_writeid_result') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class set_run_as_args: """ Attributes: - - o1 - - o2 + - cq_id + - user """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnOpenException, TxnOpenException.thrift_spec), None, ), # 2 + (1, TType.I64, 'cq_id', None, None, ), # 1 + (2, TType.STRING, 'user', None, None, ), # 2 ) - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 + def __init__(self, cq_id=None, user=None,): + self.cq_id = cq_id + self.user = user def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42103,15 +43875,13 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchLockException() - self.o1.read(iprot) + if ftype == TType.I64: + self.cq_id = iprot.readI64() else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnOpenException() - self.o2.read(iprot) + if ftype == TType.STRING: + self.user = iprot.readString() else: iprot.skip(ftype) else: @@ -42123,14 +43893,14 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('unlock_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) + oprot.writeStructBegin('set_run_as_args') + if self.cq_id is not None: + oprot.writeFieldBegin('cq_id', TType.I64, 1) + oprot.writeI64(self.cq_id) oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) + if self.user is not None: + oprot.writeFieldBegin('user', TType.STRING, 2) + oprot.writeString(self.user) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42141,8 +43911,8 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.cq_id) + value = (value * 31) ^ hash(self.user) return value def __repr__(self): @@ -42156,20 +43926,11 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class show_locks_args: - """ - Attributes: - - rqst - """ +class set_run_as_result: thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (ShowLocksRequest, ShowLocksRequest.thrift_spec), None, ), # 1 ) - def __init__(self, rqst=None,): - self.rqst = rqst - def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) @@ -42179,12 +43940,6 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = ShowLocksRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -42194,11 +43949,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('show_locks_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() + oprot.writeStructBegin('set_run_as_result') oprot.writeFieldStop() oprot.writeStructEnd() @@ -42208,7 +43959,6 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.rqst) return value def __repr__(self): @@ -42222,18 +43972,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class show_locks_result: +class find_columns_with_stats_args: """ Attributes: - - success + - cr """ thrift_spec = ( - (0, TType.STRUCT, 'success', (ShowLocksResponse, ShowLocksResponse.thrift_spec), None, ), # 0 + None, # 0 + (1, TType.STRUCT, 'cr', (CompactionInfoStruct, CompactionInfoStruct.thrift_spec), None, ), # 1 ) - def __init__(self, success=None,): - self.success = success + def __init__(self, cr=None,): + self.cr = cr def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42244,10 +43995,10 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 0: + if fid == 1: if ftype == TType.STRUCT: - self.success = ShowLocksResponse() - self.success.read(iprot) + self.cr = CompactionInfoStruct() + self.cr.read(iprot) else: iprot.skip(ftype) else: @@ -42259,10 +44010,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('show_locks_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeStructBegin('find_columns_with_stats_args') + if self.cr is not None: + oprot.writeFieldBegin('cr', TType.STRUCT, 1) + self.cr.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42273,7 +44024,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.cr) return value def __repr__(self): @@ -42287,19 +44038,18 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class heartbeat_args: +class find_columns_with_stats_result: """ Attributes: - - ids + - success """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'ids', (HeartbeatRequest, HeartbeatRequest.thrift_spec), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 ) - def __init__(self, ids=None,): - self.ids = ids + def __init__(self, success=None,): + self.success = success def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42310,10 +44060,14 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.ids = HeartbeatRequest() - self.ids.read(iprot) + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1377, _size1374) = iprot.readListBegin() + for _i1378 in xrange(_size1374): + _elem1379 = iprot.readString() + self.success.append(_elem1379) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -42325,10 +44079,13 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('heartbeat_args') - if self.ids is not None: - oprot.writeFieldBegin('ids', TType.STRUCT, 1) - self.ids.write(oprot) + oprot.writeStructBegin('find_columns_with_stats_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1380 in self.success: + oprot.writeString(iter1380) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42339,7 +44096,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.ids) + value = (value * 31) ^ hash(self.success) return value def __repr__(self): @@ -42353,25 +44110,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class heartbeat_result: +class mark_cleaned_args: """ Attributes: - - o1 - - o2 - - o3 + - cr """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 3 + (1, TType.STRUCT, 'cr', (CompactionInfoStruct, CompactionInfoStruct.thrift_spec), None, ), # 1 ) - def __init__(self, o1=None, o2=None, o3=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 + def __init__(self, cr=None,): + self.cr = cr def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42384,20 +44135,8 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchLockException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchTxnException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = TxnAbortedException() - self.o3.read(iprot) + self.cr = CompactionInfoStruct() + self.cr.read(iprot) else: iprot.skip(ftype) else: @@ -42409,18 +44148,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('heartbeat_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) + oprot.writeStructBegin('mark_cleaned_args') + if self.cr is not None: + oprot.writeFieldBegin('cr', TType.STRUCT, 1) + self.cr.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42431,9 +44162,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.cr) return value def __repr__(self): @@ -42447,19 +44176,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class heartbeat_txn_range_args: +class mark_cleaned_result: """ Attributes: - - txns + - o1 """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'txns', (HeartbeatTxnRangeRequest, HeartbeatTxnRangeRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, txns=None,): - self.txns = txns + def __init__(self, o1=None,): + self.o1 = o1 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42472,8 +44201,8 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.txns = HeartbeatTxnRangeRequest() - self.txns.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -42485,10 +44214,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('heartbeat_txn_range_args') - if self.txns is not None: - oprot.writeFieldBegin('txns', TType.STRUCT, 1) - self.txns.write(oprot) + oprot.writeStructBegin('mark_cleaned_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42499,7 +44228,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.txns) + value = (value * 31) ^ hash(self.o1) return value def __repr__(self): @@ -42513,18 +44242,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class heartbeat_txn_range_result: +class mark_compacted_args: """ Attributes: - - success + - cr """ thrift_spec = ( - (0, TType.STRUCT, 'success', (HeartbeatTxnRangeResponse, HeartbeatTxnRangeResponse.thrift_spec), None, ), # 0 + None, # 0 + (1, TType.STRUCT, 'cr', (CompactionInfoStruct, CompactionInfoStruct.thrift_spec), None, ), # 1 ) - def __init__(self, success=None,): - self.success = success + def __init__(self, cr=None,): + self.cr = cr def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42535,10 +44265,10 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 0: + if fid == 1: if ftype == TType.STRUCT: - self.success = HeartbeatTxnRangeResponse() - self.success.read(iprot) + self.cr = CompactionInfoStruct() + self.cr.read(iprot) else: iprot.skip(ftype) else: @@ -42550,10 +44280,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('heartbeat_txn_range_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeStructBegin('mark_compacted_args') + if self.cr is not None: + oprot.writeFieldBegin('cr', TType.STRUCT, 1) + self.cr.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42564,7 +44294,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.cr) return value def __repr__(self): @@ -42578,19 +44308,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class compact_args: +class mark_compacted_result: """ Attributes: - - rqst + - o1 """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, rqst=None,): - self.rqst = rqst + def __init__(self, o1=None,): + self.o1 = o1 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42603,8 +44333,8 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = CompactionRequest() - self.rqst.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -42616,10 +44346,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('compact_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) + oprot.writeStructBegin('mark_compacted_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42630,7 +44360,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.rqst) + value = (value * 31) ^ hash(self.o1) return value def __repr__(self): @@ -42644,11 +44374,20 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class compact_result: +class mark_failed_args: + """ + Attributes: + - cr + """ thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'cr', (CompactionInfoStruct, CompactionInfoStruct.thrift_spec), None, ), # 1 ) + def __init__(self, cr=None,): + self.cr = cr + def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) @@ -42658,6 +44397,12 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break + if fid == 1: + if ftype == TType.STRUCT: + self.cr = CompactionInfoStruct() + self.cr.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -42667,7 +44412,11 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('compact_result') + oprot.writeStructBegin('mark_failed_args') + if self.cr is not None: + oprot.writeFieldBegin('cr', TType.STRUCT, 1) + self.cr.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42677,6 +44426,7 @@ def validate(self): def __hash__(self): value = 17 + value = (value * 31) ^ hash(self.cr) return value def __repr__(self): @@ -42690,19 +44440,19 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class compact2_args: +class mark_failed_result: """ Attributes: - - rqst + - o1 """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, rqst=None,): - self.rqst = rqst + def __init__(self, o1=None,): + self.o1 = o1 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42715,73 +44465,8 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.rqst = CompactionRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('compact2_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class compact2_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (CompactionResponse, CompactionResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = CompactionResponse() - self.success.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -42793,10 +44478,10 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('compact2_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeStructBegin('mark_failed_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -42807,7 +44492,7 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) return value def __repr__(self): @@ -42821,19 +44506,22 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class show_compact_args: +class set_hadoop_jobid_args: """ Attributes: - - rqst + - jobId + - cq_id """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'rqst', (ShowCompactRequest, ShowCompactRequest.thrift_spec), None, ), # 1 + (1, TType.STRING, 'jobId', None, None, ), # 1 + (2, TType.I64, 'cq_id', None, None, ), # 2 ) - def __init__(self, rqst=None,): - self.rqst = rqst + def __init__(self, jobId=None, cq_id=None,): + self.jobId = jobId + self.cq_id = cq_id def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -42845,74 +44533,13 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.rqst = ShowCompactRequest() - self.rqst.read(iprot) + if ftype == TType.STRING: + self.jobId = iprot.readString() else: iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('show_compact_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class show_compact_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (ShowCompactResponse, ShowCompactResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ShowCompactResponse() - self.success.read(iprot) + elif fid == 2: + if ftype == TType.I64: + self.cq_id = iprot.readI64() else: iprot.skip(ftype) else: @@ -42924,76 +44551,14 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('show_compact_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeStructBegin('set_hadoop_jobid_args') + if self.jobId is not None: + oprot.writeFieldBegin('jobId', TType.STRING, 1) + oprot.writeString(self.jobId) oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_dynamic_partitions_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (AddDynamicPartitions, AddDynamicPartitions.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = AddDynamicPartitions() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_dynamic_partitions_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) + if self.cq_id is not None: + oprot.writeFieldBegin('cq_id', TType.I64, 2) + oprot.writeI64(self.cq_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -43004,7 +44569,8 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.rqst) + value = (value * 31) ^ hash(self.jobId) + value = (value * 31) ^ hash(self.cq_id) return value def __repr__(self): @@ -43018,23 +44584,11 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -class add_dynamic_partitions_result: - """ - Attributes: - - o1 - - o2 - """ +class set_hadoop_jobid_result: thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 ) - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) @@ -43044,18 +44598,6 @@ def read(self, iprot): (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnAbortedException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -43065,15 +44607,7 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('add_dynamic_partitions_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() + oprot.writeStructBegin('set_hadoop_jobid_result') oprot.writeFieldStop() oprot.writeStructEnd() @@ -43083,8 +44617,6 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) return value def __repr__(self): @@ -48862,11 +50394,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype1377, _size1374) = iprot.readListBegin() - for _i1378 in xrange(_size1374): - _elem1379 = SchemaVersion() - _elem1379.read(iprot) - self.success.append(_elem1379) + (_etype1384, _size1381) = iprot.readListBegin() + for _i1385 in xrange(_size1381): + _elem1386 = SchemaVersion() + _elem1386.read(iprot) + self.success.append(_elem1386) iprot.readListEnd() else: iprot.skip(ftype) @@ -48895,8 +50427,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter1380 in self.success: - iter1380.write(oprot) + for iter1387 in self.success: + iter1387.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -50371,11 +51903,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype1384, _size1381) = iprot.readListBegin() - for _i1385 in xrange(_size1381): - _elem1386 = RuntimeStat() - _elem1386.read(iprot) - self.success.append(_elem1386) + (_etype1391, _size1388) = iprot.readListBegin() + for _i1392 in xrange(_size1388): + _elem1393 = RuntimeStat() + _elem1393.read(iprot) + self.success.append(_elem1393) iprot.readListEnd() else: iprot.skip(ftype) @@ -50398,8 +51930,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter1387 in self.success: - iter1387.write(oprot) + for iter1394 in self.success: + iter1394.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 4ef4aadfee..3eee52faed 100644 --- standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -14703,6 +14703,275 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +class OptionalCompactionInfoStruct: + """ + Attributes: + - ci + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'ci', (CompactionInfoStruct, CompactionInfoStruct.thrift_spec), None, ), # 1 + ) + + def __init__(self, ci=None,): + self.ci = ci + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.ci = CompactionInfoStruct() + self.ci.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('OptionalCompactionInfoStruct') + if self.ci is not None: + oprot.writeFieldBegin('ci', TType.STRUCT, 1) + self.ci.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.ci) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CompactionInfoStruct: + """ + Attributes: + - id + - dbname + - tablename + - partitionname + - type + - runas + - properties + - toomanyaborts + - state + - workerId + - start + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'id', None, None, ), # 1 + (2, TType.STRING, 'dbname', None, None, ), # 2 + (3, TType.STRING, 'tablename', None, None, ), # 3 + (4, TType.STRING, 'partitionname', None, None, ), # 4 + (5, TType.I32, 'type', None, None, ), # 5 + (6, TType.STRING, 'runas', None, None, ), # 6 + (7, TType.STRING, 'properties', None, None, ), # 7 + (8, TType.BOOL, 'toomanyaborts', None, None, ), # 8 + (9, TType.STRING, 'state', None, None, ), # 9 + (10, TType.STRING, 'workerId', None, None, ), # 10 + (11, TType.I64, 'start', None, None, ), # 11 + ) + + def __init__(self, id=None, dbname=None, tablename=None, partitionname=None, type=None, runas=None, properties=None, toomanyaborts=None, state=None, workerId=None, start=None,): + self.id = id + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + self.type = type + self.runas = runas + self.properties = properties + self.toomanyaborts = toomanyaborts + self.state = state + self.workerId = workerId + self.start = start + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tablename = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.partitionname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.runas = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.properties = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.toomanyaborts = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.state = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.workerId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I64: + self.start = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CompactionInfoStruct') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 2) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin('tablename', TType.STRING, 3) + oprot.writeString(self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin('partitionname', TType.STRING, 4) + oprot.writeString(self.partitionname) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.I32, 5) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.runas is not None: + oprot.writeFieldBegin('runas', TType.STRING, 6) + oprot.writeString(self.runas) + oprot.writeFieldEnd() + if self.properties is not None: + oprot.writeFieldBegin('properties', TType.STRING, 7) + oprot.writeString(self.properties) + oprot.writeFieldEnd() + if self.toomanyaborts is not None: + oprot.writeFieldBegin('toomanyaborts', TType.BOOL, 8) + oprot.writeBool(self.toomanyaborts) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin('state', TType.STRING, 9) + oprot.writeString(self.state) + oprot.writeFieldEnd() + if self.workerId is not None: + oprot.writeFieldBegin('workerId', TType.STRING, 10) + oprot.writeString(self.workerId) + oprot.writeFieldEnd() + if self.start is not None: + oprot.writeFieldBegin('start', TType.I64, 11) + oprot.writeI64(self.start) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.id is None: + raise TProtocol.TProtocolException(message='Required field id is unset!') + if self.dbname is None: + raise TProtocol.TProtocolException(message='Required field dbname is unset!') + if self.tablename is None: + raise TProtocol.TProtocolException(message='Required field tablename is unset!') + if self.type is None: + raise TProtocol.TProtocolException(message='Required field type is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.id) + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tablename) + value = (value * 31) ^ hash(self.partitionname) + value = (value * 31) ^ hash(self.type) + value = (value * 31) ^ hash(self.runas) + value = (value * 31) ^ hash(self.properties) + value = (value * 31) ^ hash(self.toomanyaborts) + value = (value * 31) ^ hash(self.state) + value = (value * 31) ^ hash(self.workerId) + value = (value * 31) ^ hash(self.start) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class CompactionResponse: """ Attributes: diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb index 97dc0696b7..a170c99740 100644 --- standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -3263,6 +3263,65 @@ class CompactionRequest ::Thrift::Struct.generate_accessors self end +class OptionalCompactionInfoStruct + include ::Thrift::Struct, ::Thrift::Struct_Union + CI = 1 + + FIELDS = { + CI => {:type => ::Thrift::Types::STRUCT, :name => 'ci', :class => ::CompactionInfoStruct, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class CompactionInfoStruct + include ::Thrift::Struct, ::Thrift::Struct_Union + ID = 1 + DBNAME = 2 + TABLENAME = 3 + PARTITIONNAME = 4 + TYPE = 5 + RUNAS = 6 + PROPERTIES = 7 + TOOMANYABORTS = 8 + STATE = 9 + WORKERID = 10 + START = 11 + + FIELDS = { + ID => {:type => ::Thrift::Types::I64, :name => 'id'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, + PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}, + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType}, + RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runas', :optional => true}, + PROPERTIES => {:type => ::Thrift::Types::STRING, :name => 'properties', :optional => true}, + TOOMANYABORTS => {:type => ::Thrift::Types::BOOL, :name => 'toomanyaborts', :optional => true}, + STATE => {:type => ::Thrift::Types::STRING, :name => 'state', :optional => true}, + WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerId', :optional => true}, + START => {:type => ::Thrift::Types::I64, :name => 'start', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type + unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') + end + end + + ::Thrift::Struct.generate_accessors self +end + class CompactionResponse include ::Thrift::Struct, ::Thrift::Struct_Union ID = 1 diff --git standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb index a5f976bc5c..af9dac2f28 100644 --- standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb +++ standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -2782,6 +2782,124 @@ module ThriftHiveMetastore return end + def find_next_compact(workerId) + send_find_next_compact(workerId) + return recv_find_next_compact() + end + + def send_find_next_compact(workerId) + send_message('find_next_compact', Find_next_compact_args, :workerId => workerId) + end + + def recv_find_next_compact() + result = receive_message(Find_next_compact_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'find_next_compact failed: unknown result') + end + + def set_compaction_highest_writeid(cr, high_watermark) + send_set_compaction_highest_writeid(cr, high_watermark) + recv_set_compaction_highest_writeid() + end + + def send_set_compaction_highest_writeid(cr, high_watermark) + send_message('set_compaction_highest_writeid', Set_compaction_highest_writeid_args, :cr => cr, :high_watermark => high_watermark) + end + + def recv_set_compaction_highest_writeid() + result = receive_message(Set_compaction_highest_writeid_result) + return + end + + def set_run_as(cq_id, user) + send_set_run_as(cq_id, user) + recv_set_run_as() + end + + def send_set_run_as(cq_id, user) + send_message('set_run_as', Set_run_as_args, :cq_id => cq_id, :user => user) + end + + def recv_set_run_as() + result = receive_message(Set_run_as_result) + return + end + + def find_columns_with_stats(cr) + send_find_columns_with_stats(cr) + return recv_find_columns_with_stats() + end + + def send_find_columns_with_stats(cr) + send_message('find_columns_with_stats', Find_columns_with_stats_args, :cr => cr) + end + + def recv_find_columns_with_stats() + result = receive_message(Find_columns_with_stats_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'find_columns_with_stats failed: unknown result') + end + + def mark_cleaned(cr) + send_mark_cleaned(cr) + recv_mark_cleaned() + end + + def send_mark_cleaned(cr) + send_message('mark_cleaned', Mark_cleaned_args, :cr => cr) + end + + def recv_mark_cleaned() + result = receive_message(Mark_cleaned_result) + raise result.o1 unless result.o1.nil? + return + end + + def mark_compacted(cr) + send_mark_compacted(cr) + recv_mark_compacted() + end + + def send_mark_compacted(cr) + send_message('mark_compacted', Mark_compacted_args, :cr => cr) + end + + def recv_mark_compacted() + result = receive_message(Mark_compacted_result) + raise result.o1 unless result.o1.nil? + return + end + + def mark_failed(cr) + send_mark_failed(cr) + recv_mark_failed() + end + + def send_mark_failed(cr) + send_message('mark_failed', Mark_failed_args, :cr => cr) + end + + def recv_mark_failed() + result = receive_message(Mark_failed_result) + raise result.o1 unless result.o1.nil? + return + end + + def set_hadoop_jobid(jobId, cq_id) + send_set_hadoop_jobid(jobId, cq_id) + recv_set_hadoop_jobid() + end + + def send_set_hadoop_jobid(jobId, cq_id) + send_message('set_hadoop_jobid', Set_hadoop_jobid_args, :jobId => jobId, :cq_id => cq_id) + end + + def recv_set_hadoop_jobid() + result = receive_message(Set_hadoop_jobid_result) + return + end + def get_next_notification(rqst) send_get_next_notification(rqst) return recv_get_next_notification() @@ -5705,6 +5823,78 @@ module ThriftHiveMetastore write_result(result, oprot, 'add_dynamic_partitions', seqid) end + def process_find_next_compact(seqid, iprot, oprot) + args = read_args(iprot, Find_next_compact_args) + result = Find_next_compact_result.new() + begin + result.success = @handler.find_next_compact(args.workerId) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'find_next_compact', seqid) + end + + def process_set_compaction_highest_writeid(seqid, iprot, oprot) + args = read_args(iprot, Set_compaction_highest_writeid_args) + result = Set_compaction_highest_writeid_result.new() + @handler.set_compaction_highest_writeid(args.cr, args.high_watermark) + write_result(result, oprot, 'set_compaction_highest_writeid', seqid) + end + + def process_set_run_as(seqid, iprot, oprot) + args = read_args(iprot, Set_run_as_args) + result = Set_run_as_result.new() + @handler.set_run_as(args.cq_id, args.user) + write_result(result, oprot, 'set_run_as', seqid) + end + + def process_find_columns_with_stats(seqid, iprot, oprot) + args = read_args(iprot, Find_columns_with_stats_args) + result = Find_columns_with_stats_result.new() + result.success = @handler.find_columns_with_stats(args.cr) + write_result(result, oprot, 'find_columns_with_stats', seqid) + end + + def process_mark_cleaned(seqid, iprot, oprot) + args = read_args(iprot, Mark_cleaned_args) + result = Mark_cleaned_result.new() + begin + @handler.mark_cleaned(args.cr) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'mark_cleaned', seqid) + end + + def process_mark_compacted(seqid, iprot, oprot) + args = read_args(iprot, Mark_compacted_args) + result = Mark_compacted_result.new() + begin + @handler.mark_compacted(args.cr) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'mark_compacted', seqid) + end + + def process_mark_failed(seqid, iprot, oprot) + args = read_args(iprot, Mark_failed_args) + result = Mark_failed_result.new() + begin + @handler.mark_failed(args.cr) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'mark_failed', seqid) + end + + def process_set_hadoop_jobid(seqid, iprot, oprot) + args = read_args(iprot, Set_hadoop_jobid_args) + result = Set_hadoop_jobid_result.new() + @handler.set_hadoop_jobid(args.jobId, args.cq_id) + write_result(result, oprot, 'set_hadoop_jobid', seqid) + end + def process_get_next_notification(seqid, iprot, oprot) args = read_args(iprot, Get_next_notification_args) result = Get_next_notification_result.new() @@ -12523,6 +12713,267 @@ module ThriftHiveMetastore ::Thrift::Struct.generate_accessors self end + class Find_next_compact_args + include ::Thrift::Struct, ::Thrift::Struct_Union + WORKERID = 1 + + FIELDS = { + WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerId'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Find_next_compact_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::OptionalCompactionInfoStruct}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_compaction_highest_writeid_args + include ::Thrift::Struct, ::Thrift::Struct_Union + CR = 1 + HIGH_WATERMARK = 2 + + FIELDS = { + CR => {:type => ::Thrift::Types::STRUCT, :name => 'cr', :class => ::CompactionInfoStruct}, + HIGH_WATERMARK => {:type => ::Thrift::Types::I64, :name => 'high_watermark'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_compaction_highest_writeid_result + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_run_as_args + include ::Thrift::Struct, ::Thrift::Struct_Union + CQ_ID = 1 + USER = 2 + + FIELDS = { + CQ_ID => {:type => ::Thrift::Types::I64, :name => 'cq_id'}, + USER => {:type => ::Thrift::Types::STRING, :name => 'user'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_run_as_result + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Find_columns_with_stats_args + include ::Thrift::Struct, ::Thrift::Struct_Union + CR = 1 + + FIELDS = { + CR => {:type => ::Thrift::Types::STRUCT, :name => 'cr', :class => ::CompactionInfoStruct} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Find_columns_with_stats_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Mark_cleaned_args + include ::Thrift::Struct, ::Thrift::Struct_Union + CR = 1 + + FIELDS = { + CR => {:type => ::Thrift::Types::STRUCT, :name => 'cr', :class => ::CompactionInfoStruct} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Mark_cleaned_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Mark_compacted_args + include ::Thrift::Struct, ::Thrift::Struct_Union + CR = 1 + + FIELDS = { + CR => {:type => ::Thrift::Types::STRUCT, :name => 'cr', :class => ::CompactionInfoStruct} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Mark_compacted_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Mark_failed_args + include ::Thrift::Struct, ::Thrift::Struct_Union + CR = 1 + + FIELDS = { + CR => {:type => ::Thrift::Types::STRUCT, :name => 'cr', :class => ::CompactionInfoStruct} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Mark_failed_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_hadoop_jobid_args + include ::Thrift::Struct, ::Thrift::Struct_Union + JOBID = 1 + CQ_ID = 2 + + FIELDS = { + JOBID => {:type => ::Thrift::Types::STRING, :name => 'jobId'}, + CQ_ID => {:type => ::Thrift::Types::I64, :name => 'cq_id'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_hadoop_jobid_result + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Get_next_notification_args include ::Thrift::Struct, ::Thrift::Struct_Union RQST = 1 diff --git standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index 9eb1193a27..ca785c23b8 100644 --- standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -3701,4 +3701,44 @@ public GetPartitionsResponse getPartitionsWithSpecs(GetPartitionsRequest request throws TException { return client.get_partitions_with_specs(request); } + + @Override + public OptionalCompactionInfoStruct findNextCompact(String workerId) throws MetaException, TException { + return client.find_next_compact(workerId); + } + + @Override + public void setCompactionHighestWriteid(CompactionInfoStruct cr, long highWatermark) throws TException { + client.set_compaction_highest_writeid(cr, highWatermark); + } + + @Override + public void setRunAs(long cqId, String workerId) throws TException { + client.set_run_as(cqId, workerId); + } + + @Override + public List findColumnsWithStats(CompactionInfoStruct cr) throws TException { + return client.find_columns_with_stats(cr); + } + + @Override + public void markCleaned(CompactionInfoStruct cr) throws MetaException, TException { + client.mark_cleaned(cr); + } + + @Override + public void markCompacted(CompactionInfoStruct cr) throws MetaException, TException { + client.mark_compacted(cr); + } + + @Override + public void markFailed(CompactionInfoStruct cr) throws MetaException, TException { + client.mark_failed(cr); + } + + @Override + public void setHadoopJobid(String jobId, long cqId) throws MetaException, TException { + client.set_hadoop_jobid(jobId, cqId); + } } diff --git standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java index fa19440ba2..3a734cf598 100644 --- standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java +++ standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java @@ -129,6 +129,8 @@ import org.apache.hadoop.hive.metastore.api.WMTrigger; import org.apache.hadoop.hive.metastore.api.WMValidateResourcePlanResponse; import org.apache.hadoop.hive.metastore.api.WriteNotificationLogRequest; +import org.apache.hadoop.hive.metastore.api.CompactionInfoStruct; +import org.apache.hadoop.hive.metastore.api.OptionalCompactionInfoStruct; import org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy; import org.apache.hadoop.hive.metastore.utils.ObjectPair; import org.apache.thrift.TException; @@ -3805,4 +3807,69 @@ void createOrDropTriggerToPoolMapping(String resourcePlanName, String triggerNam */ GetPartitionsResponse getPartitionsWithSpecs(GetPartitionsRequest request) throws TException; + /** + * Get the next compaction job to do. + * @param workerId id of the worker requesting. + * @return next compaction job encapsulated in a {@link CompactionInfoStruct}. + * @throws MetaException + * @throws TException + */ + OptionalCompactionInfoStruct findNextCompact(String workerId) throws MetaException, TException; + + /** + * Set the compaction highest write id. + * @param cr compaction job being done. + * @param highWatermark high watermark. + * @throws TException + */ + void setCompactionHighestWriteid(CompactionInfoStruct cr, long highWatermark) throws TException; + + /** + * Set the compaction id to the worker that's running it. + * @param cqId compaction id. + * @param workerId worker id. + * @throws TException + */ + void setRunAs(long cqId, String workerId) throws TException; + + /** + * Get columns. + * @param cr compaction job. + * @return + * @throws TException + */ + List findColumnsWithStats(CompactionInfoStruct cr) throws TException; + + /** + * Mark a finished compaction as cleaned. + * @param cr compaction job. + * @throws MetaException + * @throws TException + */ + void markCleaned(CompactionInfoStruct cr) throws MetaException, TException; + + /** + * Mark a finished compaction as compacted. + * @param cr compaction job. + * @throws MetaException + * @throws TException + */ + void markCompacted(CompactionInfoStruct cr) throws MetaException, TException; + + /** + * Mark a finished compaction as failed. + * @param cr compaction job. + * @throws MetaException + * @throws TException + */ + void markFailed(CompactionInfoStruct cr) throws MetaException, TException; + + /** + * Set the hadoop id for a compaction. + * @param jobId mapreduce job id that will do the compaction. + * @param cqId compaction id. + * @throws MetaException + * @throws TException + */ + void setHadoopJobid(String jobId, long cqId) throws MetaException, TException; } diff --git standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java index e25a8cf9a1..3be86bba8a 100644 --- standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java +++ standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java @@ -1016,6 +1016,10 @@ public static ConfVars getMetaConf(String name) { "Batch size for partition and other object retrieval from the underlying DB in JDO.\n" + "The JDO implementation such as DataNucleus may run into issues when the generated queries are\n" + "too large. Use this parameter to break the query into multiple batches. -1 means no batching."), + HIVE_METASTORE_RUNWORKER_IN("hive.metastore.runworker.in", + "hive.metastore.runworker.in", "metastore", new StringSetValidator("metastore", "hs2"), + "Chooses where the compactor worker threads should run, Only possible values" + + " are \"metastore\" and \"hs2\""), // Hive values we have copied and use as is // These two are used to indicate that we are running tests diff --git standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift index cb899d791f..3ff823faf0 100644 --- standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift +++ standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift @@ -1076,6 +1076,24 @@ struct CompactionRequest { 6: optional map properties } +struct OptionalCompactionInfoStruct { + 1: optional CompactionInfoStruct ci, +} + +struct CompactionInfoStruct { + 1: required i64 id, + 2: required string dbname, + 3: required string tablename, + 4: optional string partitionname, + 5: required CompactionType type, + 6: optional string runas, + 7: optional string properties + 8: optional bool toomanyaborts + 9: optional string state + 10: optional string workerId + 11: optional i64 start +} + struct CompactionResponse { 1: required i64 id, 2: required string state, @@ -2318,6 +2336,14 @@ service ThriftHiveMetastore extends fb303.FacebookService CompactionResponse compact2(1:CompactionRequest rqst) ShowCompactResponse show_compact(1:ShowCompactRequest rqst) void add_dynamic_partitions(1:AddDynamicPartitions rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2) + OptionalCompactionInfoStruct find_next_compact(1: string workerId) throws(1:MetaException o1) + void set_compaction_highest_writeid(1: CompactionInfoStruct cr, 2: i64 high_watermark) + void set_run_as(1: i64 cq_id, 2: string user) + list find_columns_with_stats(1: CompactionInfoStruct cr) + void mark_cleaned(1:CompactionInfoStruct cr) throws(1:MetaException o1) + void mark_compacted(1: CompactionInfoStruct cr) throws(1:MetaException o1) + void mark_failed(1: CompactionInfoStruct cr) throws(1:MetaException o1) + void set_hadoop_jobid(1: string jobId, 2: i64 cq_id) // Notification logging calls NotificationEventResponse get_next_notification(1:NotificationEventRequest rqst) diff --git standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index 598847df03..ccc8afd0b4 100644 --- standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -149,6 +149,7 @@ import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge; import org.apache.hadoop.hive.metastore.security.MetastoreDelegationTokenManager; import org.apache.hadoop.hive.metastore.security.TUGIContainingTransport; +import org.apache.hadoop.hive.metastore.txn.CompactionInfo; import org.apache.hadoop.hive.metastore.txn.TxnStore; import org.apache.hadoop.hive.metastore.txn.TxnUtils; import org.apache.hadoop.hive.metastore.utils.MetaStoreServerUtils; @@ -7347,6 +7348,48 @@ public GetValidWriteIdsResponse get_valid_write_ids(GetValidWriteIdsRequest rqst return getTxnHandler().getValidWriteIds(rqst); } + @Override + public void set_hadoop_jobid(String jobId, long cqId) { + getTxnHandler().setHadoopJobId(jobId, cqId); + } + + @Override + public OptionalCompactionInfoStruct find_next_compact(String workerId) throws MetaException{ + return CompactionInfo.compactionInfoToOptionalStruct( + getTxnHandler().findNextToCompact(workerId)); + } + + @Override + public void mark_cleaned(CompactionInfoStruct cr) throws MetaException { + getTxnHandler().markCleaned(CompactionInfo.compactionStructToInfo(cr)); + } + + @Override + public void mark_compacted(CompactionInfoStruct cr) throws MetaException { + getTxnHandler().markCompacted(CompactionInfo.compactionStructToInfo(cr)); + } + + @Override + public void mark_failed(CompactionInfoStruct cr) throws MetaException { + getTxnHandler().markFailed(CompactionInfo.compactionStructToInfo(cr)); + } + + @Override + public List find_columns_with_stats(CompactionInfoStruct cr) throws MetaException { + return getTxnHandler().findColumnsWithStats(CompactionInfo.compactionStructToInfo(cr)); + } + + @Override + public void set_run_as(long cqId, String user) throws MetaException { + getTxnHandler().setRunAs(cqId, user); + } + + @Override + public void set_compaction_highest_writeid(CompactionInfoStruct cr, long highWaterMark) throws MetaException { + getTxnHandler().setCompactionHighestWriteId( + CompactionInfo.compactionStructToInfo(cr), highWaterMark); + } + @Override public AllocateTableWriteIdsResponse allocate_table_write_ids( AllocateTableWriteIdsRequest rqst) throws TException { @@ -9461,7 +9504,9 @@ public void run() { startCondition.await(); } startCompactorInitiator(conf); - startCompactorWorkers(conf); + if (MetastoreConf.getVar(conf, MetastoreConf.ConfVars.HIVE_METASTORE_RUNWORKER_IN).equals("metastore")) { + startCompactorWorkers(conf); + } startCompactorCleaner(conf); startRemoteOnlyTasks(conf); startStatsUpdater(conf); @@ -9528,7 +9573,7 @@ private static MetaStoreThread instantiateThread(String classname) throws Except private static int nextThreadId = 1000000; private static void initializeAndStartThread(MetaStoreThread thread, Configuration conf) throws - MetaException { + Exception { LOG.info("Starting metastore thread of type " + thread.getClass().getName()); thread.setConf(conf); thread.setThreadId(nextThreadId++); diff --git standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreThread.java standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreThread.java index 6ef2e3560d..ea6155200c 100644 --- standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreThread.java +++ standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreThread.java @@ -19,7 +19,6 @@ import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hive.metastore.api.MetaException; import java.util.concurrent.atomic.AtomicBoolean; @@ -47,7 +46,7 @@ * least once. */ // TODO: move these test parameters to more specific places... there's no need to have them here - void init(AtomicBoolean stop, AtomicBoolean looped) throws MetaException; + void init(AtomicBoolean stop, AtomicBoolean looped) throws Exception; /** * Run the thread in the background. This must not be called until diff --git standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java index b34b7d70de..99e8951d6f 100644 --- standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java +++ standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java @@ -18,7 +18,9 @@ package org.apache.hadoop.hive.metastore.txn; import org.apache.hadoop.hive.common.ValidCompactorWriteIdList; +import org.apache.hadoop.hive.metastore.api.CompactionInfoStruct; import org.apache.hadoop.hive.metastore.api.CompactionType; +import org.apache.hadoop.hive.metastore.api.OptionalCompactionInfoStruct; import org.apache.hadoop.hive.metastore.api.TableValidWriteIds; import java.sql.PreparedStatement; @@ -29,14 +31,22 @@ * Information on a possible or running compaction. */ public class CompactionInfo implements Comparable { + + /** + * Modifying this variables or adding new ones should be done in sync + * with the static methods {@code compactionStructToInfo()} and + * {@code compactionInfoToStruct()}. This class is going to be deserialized + * and serialized so missing this may result in the value of the field + * being resetted. This will be fixed at HIVE-21056. + */ public long id; public String dbname; public String tableName; public String partName; - char state; + public char state; public CompactionType type; - String workerId; - long start; + public String workerId; + public long start; public String runAs; public String properties; public boolean tooManyAborts = false; @@ -167,4 +177,57 @@ static void insertIntoCompletedCompactions(PreparedStatement pStmt, CompactionIn pStmt.setBytes(13, ci.metaInfo); pStmt.setString(14, ci.hadoopJobId); } + + public static CompactionInfo compactionStructToInfo(CompactionInfoStruct cr) { + if (cr == null) { + return null; + } + CompactionInfo ci = new CompactionInfo(cr.getDbname(), cr.getTablename(), cr.getPartitionname(), cr.getType()); + ci.id = cr.getId(); + ci.runAs = cr.getRunas(); + ci.properties = cr.getProperties(); + if (cr.isSetToomanyaborts()) { + ci.tooManyAborts = cr.isToomanyaborts(); + } + if (cr.isSetState() && cr.getState().length() != 1) { + throw new IllegalStateException("State should only be one character but it was set to " + cr.getState()); + } else if (cr.isSetState()) { + ci.state = cr.getState().charAt(0); + } + ci.workerId = cr.getWorkerId(); + if (cr.isSetStart()) { + ci.start = cr.getStart(); + } + return ci; + } + + public static CompactionInfoStruct compactionInfoToStruct(CompactionInfo ci) { + if (ci == null) { + return null; + } + CompactionInfoStruct cr = new CompactionInfoStruct(ci.id, ci.dbname, ci.tableName, ci.type); + cr.setPartitionname(ci.partName); + cr.setRunas(ci.runAs); + cr.setProperties(ci.properties); + cr.setToomanyaborts(ci.tooManyAborts); + cr.setStart(ci.start); + cr.setState(Character.toString(ci.state)); + cr.setWorkerId(ci.workerId); + return cr; + } + + public static OptionalCompactionInfoStruct compactionInfoToOptionalStruct(CompactionInfo ci) { + CompactionInfoStruct cis = compactionInfoToStruct(ci); + OptionalCompactionInfoStruct ocis = new OptionalCompactionInfoStruct(); + if (cis != null) { + ocis.setCi(cis); + } + return ocis; + } + public static CompactionInfo optionalCompactionInfoStructToInfo(OptionalCompactionInfoStruct ocis) { + if (ocis.isSetCi()) { + return compactionStructToInfo(ocis.getCi()); + } + return null; + } } diff --git standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java index 3f611d6270..ea4e39458d 100644 --- standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java +++ standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java @@ -65,8 +65,6 @@ import org.apache.hadoop.hive.metastore.ColumnType; import org.apache.hadoop.hive.metastore.HiveMetaStore; import org.apache.hadoop.hive.metastore.IMetaStoreClient; -import org.apache.hadoop.hive.metastore.RawStore; -import org.apache.hadoop.hive.metastore.TableType; import org.apache.hadoop.hive.metastore.Warehouse; import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; diff --git standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java index 9fe9a65677..82b0519e48 100644 --- standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java +++ standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java @@ -3571,4 +3571,44 @@ public GetPartitionsResponse getPartitionsWithSpecs(GetPartitionsRequest request throws TException { throw new UnsupportedOperationException(); } + + @Override + public OptionalCompactionInfoStruct findNextCompact(String workerId) throws MetaException, TException { + return client.find_next_compact(workerId); + } + + @Override + public void setCompactionHighestWriteid(CompactionInfoStruct cr, long highWatermark) throws TException { + client.set_compaction_highest_writeid(cr, highWatermark); + } + + @Override + public void setRunAs(long cqId, String workerId) throws TException { + client.set_run_as(cqId, workerId); + } + + @Override + public List findColumnsWithStats(CompactionInfoStruct cr) throws TException { + return client.find_columns_with_stats(cr); + } + + @Override + public void markCleaned(CompactionInfoStruct cr) throws MetaException, TException { + client.mark_cleaned(cr); + } + + @Override + public void markCompacted(CompactionInfoStruct cr) throws MetaException, TException { + client.mark_compacted(cr); + } + + @Override + public void markFailed(CompactionInfoStruct cr) throws MetaException, TException { + client.mark_failed(cr); + } + + @Override + public void setHadoopJobid(String jobId, long cqId) throws MetaException, TException { + client.set_hadoop_jobid(jobId, cqId); + } } diff --git streaming/src/test/org/apache/hive/streaming/TestStreaming.java streaming/src/test/org/apache/hive/streaming/TestStreaming.java index 2170178a81..c6d7e7f27c 100644 --- streaming/src/test/org/apache/hive/streaming/TestStreaming.java +++ streaming/src/test/org/apache/hive/streaming/TestStreaming.java @@ -63,7 +63,6 @@ import org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse; import org.apache.hadoop.hive.metastore.api.LockState; import org.apache.hadoop.hive.metastore.api.LockType; -import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; import org.apache.hadoop.hive.metastore.api.ShowLocksRequest; @@ -783,7 +782,7 @@ public void testAutoRollTransactionBatch() throws Exception { /** * this is a clone from TestHiveStreamingConnection.TxnStatement2.... */ - public static void runWorker(HiveConf hiveConf) throws MetaException { + public static void runWorker(HiveConf hiveConf) throws Exception { AtomicBoolean stop = new AtomicBoolean(true); Worker t = new Worker(); t.setThreadId((int) t.getId());