You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by sa...@apache.org on 2018/02/23 16:30:59 UTC
[01/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Repository: hive
Updated Branches:
refs/heads/master f9768af0e -> cbb9233a3
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/java/org/apache/hadoop/hive/common/ValidReaderWriteIdList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/java/org/apache/hadoop/hive/common/ValidReaderWriteIdList.java b/storage-api/src/java/org/apache/hadoop/hive/common/ValidReaderWriteIdList.java
new file mode 100644
index 0000000..107ea90
--- /dev/null
+++ b/storage-api/src/java/org/apache/hadoop/hive/common/ValidReaderWriteIdList.java
@@ -0,0 +1,254 @@
+/*
+ * 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.common;
+
+import java.util.Arrays;
+import java.util.BitSet;
+
+/**
+ * An implementation of {@link ValidWriteIdList} for use by readers.
+ * This class will view a write id as valid only if it maps to committed transaction.
+ * Write ids of both open and aborted transactions will be seen as invalid.
+ */
+public class ValidReaderWriteIdList implements ValidWriteIdList {
+
+ private String tableName; // Full table name of format <db_name>.<table_name>
+ protected long[] exceptions;
+ protected BitSet abortedBits; // BitSet for flagging aborted write ids. Bit is true if aborted, false if open
+ //default value means there are no open write ids in the snapshot
+ private long minOpenWriteId = Long.MAX_VALUE;
+ protected long highWatermark;
+
+ public ValidReaderWriteIdList() {
+ this(null, new long[0], new BitSet(), Long.MAX_VALUE, Long.MAX_VALUE);
+ }
+
+ /**
+ * Used if there are no open write ids in the snapshot.
+ */
+ public ValidReaderWriteIdList(String tableName, long[] exceptions, BitSet abortedBits, long highWatermark) {
+ this(tableName, exceptions, abortedBits, highWatermark, Long.MAX_VALUE);
+ }
+ public ValidReaderWriteIdList(String tableName,
+ long[] exceptions, BitSet abortedBits, long highWatermark, long minOpenWriteId) {
+ this.tableName = tableName;
+ if (exceptions.length > 0) {
+ this.minOpenWriteId = minOpenWriteId;
+ }
+ this.exceptions = exceptions;
+ this.abortedBits = abortedBits;
+ this.highWatermark = highWatermark;
+ }
+
+ public ValidReaderWriteIdList(String value) {
+ readFromString(value);
+ }
+
+ @Override
+ public boolean isWriteIdValid(long writeId) {
+ if (writeId > highWatermark) {
+ return false;
+ }
+ return Arrays.binarySearch(exceptions, writeId) < 0;
+ }
+
+ /**
+ * We cannot use a base file if its range contains an open write id.
+ * @param writeId from base_xxxx
+ */
+ @Override
+ public boolean isValidBase(long writeId) {
+ return (writeId < minOpenWriteId) && (writeId <= highWatermark);
+ }
+ @Override
+ public RangeResponse isWriteIdRangeValid(long minWriteId, long maxWriteId) {
+ // check the easy cases first
+ if (minWriteId > highWatermark) {
+ return RangeResponse.NONE;
+ } else if (exceptions.length > 0 && exceptions[0] > maxWriteId) {
+ return RangeResponse.ALL;
+ }
+
+ // since the exceptions and the range in question overlap, count the
+ // exceptions in the range
+ long count = Math.max(0, maxWriteId - highWatermark);
+ for(long txn: exceptions) {
+ if (minWriteId <= txn && txn <= maxWriteId) {
+ count += 1;
+ }
+ }
+
+ if (count == 0) {
+ return RangeResponse.ALL;
+ } else if (count == (maxWriteId - minWriteId + 1)) {
+ return RangeResponse.NONE;
+ } else {
+ return RangeResponse.SOME;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return writeToString();
+ }
+
+ // Format is <table_name>:<hwm>:<minOpenWriteId>:<open_writeids>:<abort_writeids>
+ @Override
+ public String writeToString() {
+ StringBuilder buf = new StringBuilder();
+ if (tableName == null) {
+ buf.append("null");
+ } else {
+ buf.append(tableName);
+ }
+ buf.append(':');
+ buf.append(highWatermark);
+ buf.append(':');
+ buf.append(minOpenWriteId);
+ if (exceptions.length == 0) {
+ buf.append(':'); // separator for open write ids
+ buf.append(':'); // separator for aborted write ids
+ } else {
+ StringBuilder open = new StringBuilder();
+ StringBuilder abort = new StringBuilder();
+ for (int i = 0; i < exceptions.length; i++) {
+ if (abortedBits.get(i)) {
+ if (abort.length() > 0) {
+ abort.append(',');
+ }
+ abort.append(exceptions[i]);
+ } else {
+ if (open.length() > 0) {
+ open.append(',');
+ }
+ open.append(exceptions[i]);
+ }
+ }
+ buf.append(':');
+ buf.append(open);
+ buf.append(':');
+ buf.append(abort);
+ }
+ return buf.toString();
+ }
+
+ @Override
+ public void readFromString(String src) {
+ if (src == null || src.length() == 0) {
+ highWatermark = Long.MAX_VALUE;
+ exceptions = new long[0];
+ abortedBits = new BitSet();
+ } else {
+ String[] values = src.split(":");
+ tableName = values[0];
+ if (tableName.equalsIgnoreCase("null")) {
+ tableName = null;
+ }
+ highWatermark = Long.parseLong(values[1]);
+ minOpenWriteId = Long.parseLong(values[2]);
+ String[] openWriteIds = new String[0];
+ String[] abortedWriteIds = new String[0];
+ if (values.length < 4) {
+ openWriteIds = new String[0];
+ abortedWriteIds = new String[0];
+ } else if (values.length == 4) {
+ if (!values[3].isEmpty()) {
+ openWriteIds = values[3].split(",");
+ }
+ } else {
+ if (!values[3].isEmpty()) {
+ openWriteIds = values[3].split(",");
+ }
+ if (!values[4].isEmpty()) {
+ abortedWriteIds = values[4].split(",");
+ }
+ }
+ exceptions = new long[openWriteIds.length + abortedWriteIds.length];
+ int i = 0;
+ for (String open : openWriteIds) {
+ exceptions[i++] = Long.parseLong(open);
+ }
+ for (String abort : abortedWriteIds) {
+ exceptions[i++] = Long.parseLong(abort);
+ }
+ Arrays.sort(exceptions);
+ abortedBits = new BitSet(exceptions.length);
+ for (String abort : abortedWriteIds) {
+ int index = Arrays.binarySearch(exceptions, Long.parseLong(abort));
+ abortedBits.set(index);
+ }
+ }
+ }
+
+ @Override
+ public String getTableName() {
+ return tableName;
+ }
+
+ @Override
+ public long getHighWatermark() {
+ return highWatermark;
+ }
+
+ @Override
+ public long[] getInvalidWriteIds() {
+ return exceptions;
+ }
+
+ @Override
+ public Long getMinOpenWriteId() {
+ return minOpenWriteId == Long.MAX_VALUE ? null : minOpenWriteId;
+ }
+
+ @Override
+ public boolean isWriteIdAborted(long writeId) {
+ int index = Arrays.binarySearch(exceptions, writeId);
+ return index >= 0 && abortedBits.get(index);
+ }
+
+ @Override
+ public RangeResponse isWriteIdRangeAborted(long minWriteId, long maxWriteId) {
+ // check the easy cases first
+ if (highWatermark < minWriteId) {
+ return RangeResponse.NONE;
+ }
+
+ int count = 0; // number of aborted txns found in exceptions
+
+ // traverse the aborted txns list, starting at first aborted txn index
+ for (int i = abortedBits.nextSetBit(0); i >= 0; i = abortedBits.nextSetBit(i + 1)) {
+ long abortedTxnId = exceptions[i];
+ if (abortedTxnId > maxWriteId) { // we've already gone beyond the specified range
+ break;
+ }
+ if (abortedTxnId >= minWriteId && abortedTxnId <= maxWriteId) {
+ count++;
+ }
+ }
+
+ if (count == 0) {
+ return RangeResponse.NONE;
+ } else if (count == (maxWriteId - minWriteId + 1)) {
+ return RangeResponse.ALL;
+ } else {
+ return RangeResponse.SOME;
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnList.java b/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnList.java
index 3ffb2d8..d4c3b09 100644
--- a/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnList.java
+++ b/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnList.java
@@ -47,13 +47,6 @@ public interface ValidTxnList {
public boolean isTxnValid(long txnid);
/**
- * Returns {@code true} if such base file can be used to materialize the snapshot represented by
- * this {@code ValidTxnList}.
- * @param txnid highest txn in a given base_xxxx file
- */
- public boolean isValidBase(long txnid);
-
- /**
* Find out if a range of transaction ids are valid. Note that valid may have different meanings
* for different implementations, as some will only want to see committed transactions and some
* both committed and aborted.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnWriteIdList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnWriteIdList.java b/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnWriteIdList.java
new file mode 100644
index 0000000..9867a81
--- /dev/null
+++ b/storage-api/src/java/org/apache/hadoop/hive/common/ValidTxnWriteIdList.java
@@ -0,0 +1,101 @@
+/*
+ * 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.common;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * An implementation to store and manage list of ValidWriteIds for each tables read by current
+ * transaction.
+ */
+public class ValidTxnWriteIdList {
+ /**
+ * Key used to store valid write id list for all the operated tables in a
+ * {@link org.apache.hadoop.conf.Configuration} object.
+ */
+ public static final String VALID_TABLES_WRITEIDS_KEY = "hive.txn.tables.valid.writeids";
+
+ // Transaction for which the list of tables valid write Ids are populated
+ private Long txnId;
+
+ // Map of valid write ids list for all the tables read by the current txn
+ // Key is full table name string of format <db_name>.<table_name>
+ private Map<String, ValidWriteIdList> tablesValidWriteIdList = new HashMap<>();
+ public ValidTxnWriteIdList(Long txnId) {
+ this.txnId = txnId;
+ }
+
+ public ValidTxnWriteIdList(String value) {
+ readFromString(value);
+ }
+
+ @Override
+ public String toString() {
+ return writeToString();
+ }
+
+ public void addTableValidWriteIdList(ValidWriteIdList validWriteIds) {
+ tablesValidWriteIdList.put(validWriteIds.getTableName(), validWriteIds);
+ }
+
+ // Input fullTableName is of format <db_name>.<table_name>
+ public ValidWriteIdList getTableValidWriteIdList(String fullTableName) {
+ if (tablesValidWriteIdList.containsKey(fullTableName)) {
+ return tablesValidWriteIdList.get(fullTableName);
+ }
+ return null;
+ }
+
+ // Each ValidWriteIdList is separated with "$" and each one maps to one table
+ // Format <txnId>$<table_name>:<hwm>:<minOpenWriteId>:<open_writeids>:<abort_writeids>$<table_name>...
+ private void readFromString(String src) {
+ if ((src == null) || (src.length() == 0)) {
+ return;
+ }
+ String[] tblWriteIdStrList = src.split("\\$");
+ assert(tblWriteIdStrList.length >= 1);
+
+ // First $ separated substring would be txnId and the rest are ValidReaderWriteIdList
+ this.txnId = Long.parseLong(tblWriteIdStrList[0]);
+ for (int index = 1; index < tblWriteIdStrList.length; index++) {
+ String tableStr = tblWriteIdStrList[index];
+ ValidWriteIdList validWriteIdList = new ValidReaderWriteIdList(tableStr);
+ addTableValidWriteIdList(validWriteIdList);
+ }
+ }
+
+ // Each ValidWriteIdList is separated with "$" and each one maps to one table
+ // Format <txnId>$<table_name>:<hwm>:<minOpenWriteId>:<open_writeids>:<abort_writeids>$<table_name>...
+ private String writeToString() {
+ // First $ separated substring will be txnId and the rest are ValidReaderWriteIdList
+ StringBuilder buf = new StringBuilder(txnId.toString());
+ int index = 0;
+ for (HashMap.Entry<String, ValidWriteIdList> entry : tablesValidWriteIdList.entrySet()) {
+ if (index < tablesValidWriteIdList.size()) {
+ buf.append('$');
+ }
+ buf.append(entry.getValue().writeToString());
+
+ // Separator for multiple tables' ValidWriteIdList. Also, skip it for last entry.
+ index++;
+ }
+ return buf.toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/java/org/apache/hadoop/hive/common/ValidWriteIdList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/java/org/apache/hadoop/hive/common/ValidWriteIdList.java b/storage-api/src/java/org/apache/hadoop/hive/common/ValidWriteIdList.java
new file mode 100644
index 0000000..be83134
--- /dev/null
+++ b/storage-api/src/java/org/apache/hadoop/hive/common/ValidWriteIdList.java
@@ -0,0 +1,118 @@
+/*
+ * 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.common;
+
+/**
+ * Models the list of transactions that should be included in a snapshot.
+ * It is modelled as a high water mark, which is the largest transaction id that
+ * has been committed and a list of transactions that are not included.
+ */
+public interface ValidWriteIdList {
+
+ /**
+ * Key used to store valid write id list in a
+ * {@link org.apache.hadoop.conf.Configuration} object.
+ */
+ String VALID_WRITEIDS_KEY = "hive.txn.valid.writeids";
+
+ /**
+ * The response to a range query. NONE means no values in this range match,
+ * SOME mean that some do, and ALL means that every value does.
+ */
+ enum RangeResponse {NONE, SOME, ALL};
+
+ /**
+ * Indicates whether a given write ID is valid. Note that valid may have different meanings
+ * for different implementations, as some will only want to see committed transactions and some
+ * both committed and aborted.
+ * @param writeId write ID of the table
+ * @return true if valid, false otherwise
+ */
+ boolean isWriteIdValid(long writeId);
+
+ /**
+ * Returns {@code true} if such base file can be used to materialize the snapshot represented by
+ * this {@code ValidWriteIdList}.
+ * @param writeId highest write ID in a given base_xxxx file
+ */
+ boolean isValidBase(long writeId);
+
+ /**
+ * Find out if a range of write ids are valid. Note that valid may have different meanings
+ * for different implementations, as some will only want to see committed transactions and some
+ * both committed and aborted.
+ * @param minWriteId minimum write ID to look for, inclusive
+ * @param maxWriteId maximum write ID to look for, inclusive
+ * @return Indicate whether none, some, or all of these transactions are valid.
+ */
+ RangeResponse isWriteIdRangeValid(long minWriteId, long maxWriteId);
+
+ /**
+ * Write this ValidWriteIdList into a string. This should produce a string that
+ * can be used by {@link #readFromString(String)} to populate a ValidWriteIdList.
+ */
+ String writeToString();
+
+ /**
+ * Populate this ValidWriteIdList from the string. It is assumed that the string
+ * was created via {@link #writeToString()} and the exceptions list is sorted.
+ * @param src source string.
+ */
+ void readFromString(String src);
+
+ /**
+ * Get the table for which the ValidWriteIdList is formed
+ * @return table name (<db_name>.<table_name>) associated with ValidWriteIdList.
+ */
+ String getTableName();
+
+ /**
+ * Get the largest write id used.
+ * @return largest write id used
+ */
+ long getHighWatermark();
+
+ /**
+ * Get the list of write ids under the high water mark that are not valid. Note that invalid
+ * may have different meanings for different implementations, as some will only want to see open
+ * transactions and some both open and aborted.
+ * @return a list of invalid write ids
+ */
+ long[] getInvalidWriteIds();
+
+ /**
+ * Indicates whether a given write maps to aborted transaction.
+ * @param writeId write id to be validated
+ * @return true if aborted, false otherwise
+ */
+ boolean isWriteIdAborted(long writeId);
+
+ /**
+ * Find out if a range of write ids are aborted.
+ * @param minWriteId minimum write Id to look for, inclusive
+ * @param maxWriteId maximum write Id to look for, inclusive
+ * @return Indicate whether none, some, or all of these write ids are aborted.
+ */
+ RangeResponse isWriteIdRangeAborted(long minWriteId, long maxWriteId);
+
+ /**
+ * Returns smallest Open write Id in this set, {@code null} if there is none.
+ */
+ Long getMinOpenWriteId();
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/test/org/apache/hadoop/hive/common/TestValidCompactorTxnList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/test/org/apache/hadoop/hive/common/TestValidCompactorTxnList.java b/storage-api/src/test/org/apache/hadoop/hive/common/TestValidCompactorTxnList.java
deleted file mode 100644
index 867b652..0000000
--- a/storage-api/src/test/org/apache/hadoop/hive/common/TestValidCompactorTxnList.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * 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.common;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.BitSet;
-
-public class TestValidCompactorTxnList {
-
- @Test
- public void minTxnHigh() {
- BitSet bitSet = new BitSet(2);
- bitSet.set(0, 2);
- ValidTxnList txns = new ValidCompactorTxnList(new long[]{3, 4}, bitSet, 2);
- ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9);
- Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp);
- }
-
- @Test
- public void maxTxnLow() {
- BitSet bitSet = new BitSet(2);
- bitSet.set(0, 2);
- ValidTxnList txns = new ValidCompactorTxnList(new long[]{13, 14}, bitSet, 12);
- ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9);
- Assert.assertEquals(ValidTxnList.RangeResponse.ALL, rsp);
- }
-
- @Test
- public void minTxnHighNoExceptions() {
- ValidTxnList txns = new ValidCompactorTxnList(new long[0], new BitSet(), 5);
- ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9);
- Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp);
- }
-
- @Test
- public void maxTxnLowNoExceptions() {
- ValidTxnList txns = new ValidCompactorTxnList(new long[0], new BitSet(), 15);
- ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9);
- Assert.assertEquals(ValidTxnList.RangeResponse.ALL, rsp);
- }
-
- @Test
- public void exceptionsAllBelow() {
- BitSet bitSet = new BitSet(2);
- bitSet.set(0, 2);
- ValidTxnList txns = new ValidCompactorTxnList(new long[]{3, 6}, bitSet, 3);
- ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9);
- Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp);
- }
-
- @Test
- public void exceptionsInMidst() {
- BitSet bitSet = new BitSet(1);
- bitSet.set(0, 1);
- ValidTxnList txns = new ValidCompactorTxnList(new long[]{8}, bitSet, 7);
- ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9);
- Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp);
- }
- @Test
- public void exceptionsAbveHighWaterMark() {
- BitSet bitSet = new BitSet(4);
- bitSet.set(0, 4);
- ValidTxnList txns = new ValidCompactorTxnList(new long[]{8, 11, 17, 29}, bitSet, 15);
- Assert.assertArrayEquals("", new long[]{8, 11}, txns.getInvalidTransactions());
- ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9);
- Assert.assertEquals(ValidTxnList.RangeResponse.ALL, rsp);
- rsp = txns.isTxnRangeValid(12, 16);
- Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp);
- }
-
- @Test
- public void writeToString() {
- BitSet bitSet = new BitSet(4);
- bitSet.set(0, 4);
- ValidTxnList txns = new ValidCompactorTxnList(new long[]{7, 9, 10, Long.MAX_VALUE}, bitSet, 8);
- Assert.assertEquals("8:" + Long.MAX_VALUE + "::7", txns.writeToString());
- txns = new ValidCompactorTxnList();
- Assert.assertEquals(Long.toString(Long.MAX_VALUE) + ":" + Long.MAX_VALUE + "::", txns.writeToString());
- txns = new ValidCompactorTxnList(new long[0], new BitSet(), 23);
- Assert.assertEquals("23:" + Long.MAX_VALUE + "::", txns.writeToString());
- }
-
- @Test
- public void readFromString() {
- ValidCompactorTxnList txns = new ValidCompactorTxnList("37:" + Long.MAX_VALUE + "::7,9,10");
- Assert.assertEquals(37L, txns.getHighWatermark());
- Assert.assertNull(txns.getMinOpenTxn());
- Assert.assertArrayEquals(new long[]{7L, 9L, 10L}, txns.getInvalidTransactions());
- txns = new ValidCompactorTxnList("21:" + Long.MAX_VALUE + ":");
- Assert.assertEquals(21L, txns.getHighWatermark());
- Assert.assertNull(txns.getMinOpenTxn());
- Assert.assertEquals(0, txns.getInvalidTransactions().length);
- }
-
- @Test
- public void testAbortedTxn() throws Exception {
- ValidCompactorTxnList txnList = new ValidCompactorTxnList("5:4::1,2,3");
- Assert.assertEquals(5L, txnList.getHighWatermark());
- Assert.assertEquals(4, txnList.getMinOpenTxn().longValue());
- Assert.assertArrayEquals(new long[]{1L, 2L, 3L}, txnList.getInvalidTransactions());
- }
-
- @Test
- public void testAbortedRange() throws Exception {
- ValidCompactorTxnList txnList = new ValidCompactorTxnList("11:4::5,6,7,8");
- ValidTxnList.RangeResponse rsp = txnList.isTxnRangeAborted(1L, 3L);
- Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp);
- rsp = txnList.isTxnRangeAborted(9L, 10L);
- Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp);
- rsp = txnList.isTxnRangeAborted(6L, 7L);
- Assert.assertEquals(ValidTxnList.RangeResponse.ALL, rsp);
- rsp = txnList.isTxnRangeAborted(4L, 6L);
- Assert.assertEquals(ValidTxnList.RangeResponse.SOME, rsp);
- rsp = txnList.isTxnRangeAborted(6L, 13L);
- Assert.assertEquals(ValidTxnList.RangeResponse.SOME, rsp);
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/test/org/apache/hadoop/hive/common/TestValidCompactorWriteIdList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/test/org/apache/hadoop/hive/common/TestValidCompactorWriteIdList.java b/storage-api/src/test/org/apache/hadoop/hive/common/TestValidCompactorWriteIdList.java
new file mode 100644
index 0000000..f378b7b
--- /dev/null
+++ b/storage-api/src/test/org/apache/hadoop/hive/common/TestValidCompactorWriteIdList.java
@@ -0,0 +1,142 @@
+/*
+ * 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.common;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.BitSet;
+
+/**
+ * Tests for {@link ValidCompactorWriteIdList}.
+ */
+public class TestValidCompactorWriteIdList {
+ private final String tableName = "t1";
+
+ @Test
+ public void minTxnHigh() {
+ BitSet bitSet = new BitSet(2);
+ bitSet.set(0, 2);
+ ValidWriteIdList writeIds = new ValidCompactorWriteIdList(tableName, new long[]{3, 4}, bitSet, 2);
+ ValidWriteIdList.RangeResponse rsp = writeIds.isWriteIdRangeValid(7, 9);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.NONE, rsp);
+ }
+
+ @Test
+ public void maxTxnLow() {
+ BitSet bitSet = new BitSet(2);
+ bitSet.set(0, 2);
+ ValidWriteIdList writeIds = new ValidCompactorWriteIdList(tableName, new long[]{13, 14}, bitSet, 12);
+ ValidWriteIdList.RangeResponse rsp = writeIds.isWriteIdRangeValid(7, 9);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.ALL, rsp);
+ }
+
+ @Test
+ public void minTxnHighNoExceptions() {
+ ValidWriteIdList writeIds = new ValidCompactorWriteIdList(tableName, new long[0], new BitSet(), 5);
+ ValidWriteIdList.RangeResponse rsp = writeIds.isWriteIdRangeValid(7, 9);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.NONE, rsp);
+ }
+
+ @Test
+ public void maxTxnLowNoExceptions() {
+ ValidWriteIdList writeIds = new ValidCompactorWriteIdList(tableName, new long[0], new BitSet(), 15);
+ ValidWriteIdList.RangeResponse rsp = writeIds.isWriteIdRangeValid(7, 9);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.ALL, rsp);
+ }
+
+ @Test
+ public void exceptionsAllBelow() {
+ BitSet bitSet = new BitSet(2);
+ bitSet.set(0, 2);
+ ValidWriteIdList writeIds = new ValidCompactorWriteIdList(tableName, new long[]{3, 6}, bitSet, 3);
+ ValidWriteIdList.RangeResponse rsp = writeIds.isWriteIdRangeValid(7, 9);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.NONE, rsp);
+ }
+
+ @Test
+ public void exceptionsInMidst() {
+ BitSet bitSet = new BitSet(1);
+ bitSet.set(0, 1);
+ ValidWriteIdList writeIds = new ValidCompactorWriteIdList(tableName, new long[]{8}, bitSet, 7);
+ ValidWriteIdList.RangeResponse rsp = writeIds.isWriteIdRangeValid(7, 9);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.NONE, rsp);
+ }
+ @Test
+ public void exceptionsAbveHighWaterMark() {
+ BitSet bitSet = new BitSet(4);
+ bitSet.set(0, 4);
+ ValidWriteIdList writeIds = new ValidCompactorWriteIdList(tableName, new long[]{8, 11, 17, 29}, bitSet, 15);
+ Assert.assertArrayEquals("", new long[]{8, 11}, writeIds.getInvalidWriteIds());
+ ValidWriteIdList.RangeResponse rsp = writeIds.isWriteIdRangeValid(7, 9);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.ALL, rsp);
+ rsp = writeIds.isWriteIdRangeValid(12, 16);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.NONE, rsp);
+ }
+
+ @Test
+ public void writeToString() {
+ BitSet bitSet = new BitSet(4);
+ bitSet.set(0, 4);
+ ValidWriteIdList writeIds
+ = new ValidCompactorWriteIdList(tableName, new long[]{7, 9, 10, Long.MAX_VALUE}, bitSet, 8);
+ Assert.assertEquals(tableName + ":8:" + Long.MAX_VALUE + "::7", writeIds.writeToString());
+ writeIds = new ValidCompactorWriteIdList();
+ Assert.assertEquals("null:" + Long.toString(Long.MAX_VALUE) + ":" + Long.MAX_VALUE + "::",
+ writeIds.writeToString());
+ writeIds = new ValidCompactorWriteIdList(tableName, new long[0], new BitSet(), 23);
+ Assert.assertEquals(tableName + ":23:" + Long.MAX_VALUE + "::", writeIds.writeToString());
+ }
+
+ @Test
+ public void readFromString() {
+ ValidCompactorWriteIdList writeIds
+ = new ValidCompactorWriteIdList(tableName + ":37:" + Long.MAX_VALUE + "::7,9,10");
+ Assert.assertEquals(tableName, writeIds.getTableName());
+ Assert.assertEquals(37L, writeIds.getHighWatermark());
+ Assert.assertNull(writeIds.getMinOpenWriteId());
+ Assert.assertArrayEquals(new long[]{7L, 9L, 10L}, writeIds.getInvalidWriteIds());
+ writeIds = new ValidCompactorWriteIdList(tableName + ":21:" + Long.MAX_VALUE + ":");
+ Assert.assertEquals(21L, writeIds.getHighWatermark());
+ Assert.assertNull(writeIds.getMinOpenWriteId());
+ Assert.assertEquals(0, writeIds.getInvalidWriteIds().length);
+ }
+
+ @Test
+ public void testAbortedTxn() throws Exception {
+ ValidCompactorWriteIdList writeIdList = new ValidCompactorWriteIdList(tableName + ":5:4::1,2,3");
+ Assert.assertEquals(5L, writeIdList.getHighWatermark());
+ Assert.assertEquals(4, writeIdList.getMinOpenWriteId().longValue());
+ Assert.assertArrayEquals(new long[]{1L, 2L, 3L}, writeIdList.getInvalidWriteIds());
+ }
+
+ @Test
+ public void testAbortedRange() throws Exception {
+ ValidCompactorWriteIdList writeIdList = new ValidCompactorWriteIdList(tableName + ":11:4::5,6,7,8");
+ ValidWriteIdList.RangeResponse rsp = writeIdList.isWriteIdRangeAborted(1L, 3L);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.NONE, rsp);
+ rsp = writeIdList.isWriteIdRangeAborted(9L, 10L);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.NONE, rsp);
+ rsp = writeIdList.isWriteIdRangeAborted(6L, 7L);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.ALL, rsp);
+ rsp = writeIdList.isWriteIdRangeAborted(4L, 6L);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.SOME, rsp);
+ rsp = writeIdList.isWriteIdRangeAborted(6L, 13L);
+ Assert.assertEquals(ValidWriteIdList.RangeResponse.SOME, rsp);
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/test/org/apache/hadoop/hive/common/TestValidReaderWriteIdList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/test/org/apache/hadoop/hive/common/TestValidReaderWriteIdList.java b/storage-api/src/test/org/apache/hadoop/hive/common/TestValidReaderWriteIdList.java
new file mode 100644
index 0000000..18f6813
--- /dev/null
+++ b/storage-api/src/test/org/apache/hadoop/hive/common/TestValidReaderWriteIdList.java
@@ -0,0 +1,120 @@
+/*
+ * 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.common;
+
+import junit.framework.TestCase;
+import org.apache.hadoop.conf.Configuration;
+import org.junit.Test;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.util.BitSet;
+
+/**
+ * Tests for {@link ValidReaderWriteIdList}.
+ */
+public class TestValidReaderWriteIdList {
+ private final String tableName = "t1";
+
+ @Test
+ public void noExceptions() throws Exception {
+ ValidWriteIdList writeIdList = new ValidReaderWriteIdList(tableName, new long[0], new BitSet(), 1, Long.MAX_VALUE);
+ String str = writeIdList.writeToString();
+ TestCase.assertEquals(tableName + ":1:" + Long.MAX_VALUE + "::", str);
+ ValidWriteIdList newList = new ValidReaderWriteIdList();
+ newList.readFromString(str);
+ TestCase.assertTrue(newList.isWriteIdValid(1));
+ TestCase.assertFalse(newList.isWriteIdValid(2));
+ }
+
+ @Test
+ public void exceptions() throws Exception {
+ ValidWriteIdList writeIdList = new ValidReaderWriteIdList(tableName, new long[]{2L, 4L}, new BitSet(), 5, 4L);
+ String str = writeIdList.writeToString();
+ TestCase.assertEquals(tableName + ":5:4:2,4:", str);
+ ValidWriteIdList newList = new ValidReaderWriteIdList();
+ newList.readFromString(str);
+ TestCase.assertTrue(newList.isWriteIdValid(1));
+ TestCase.assertFalse(newList.isWriteIdValid(2));
+ TestCase.assertTrue(newList.isWriteIdValid(3));
+ TestCase.assertFalse(newList.isWriteIdValid(4));
+ TestCase.assertTrue(newList.isWriteIdValid(5));
+ TestCase.assertFalse(newList.isWriteIdValid(6));
+ }
+
+ @Test
+ public void longEnoughToCompress() throws Exception {
+ long[] exceptions = new long[1000];
+ for (int i = 0; i < 1000; i++) {
+ exceptions[i] = i + 100;
+ }
+ ValidWriteIdList writeIdList = new ValidReaderWriteIdList(tableName, exceptions, new BitSet(), 2000, 900);
+ String str = writeIdList.writeToString();
+ ValidWriteIdList newList = new ValidReaderWriteIdList();
+ newList.readFromString(str);
+ for (int i = 0; i < 100; i++) {
+ TestCase.assertTrue(newList.isWriteIdValid(i));
+ }
+ for (int i = 100; i < 1100; i++) {
+ TestCase.assertFalse(newList.isWriteIdValid(i));
+ }
+ for (int i = 1100; i < 2001; i++) {
+ TestCase.assertTrue(newList.isWriteIdValid(i));
+ }
+ TestCase.assertFalse(newList.isWriteIdValid(2001));
+ }
+
+ @Test
+ public void readWriteConfig() throws Exception {
+ long[] exceptions = new long[1000];
+ for (int i = 0; i < 1000; i++) {
+ exceptions[i] = i + 100;
+ }
+ ValidWriteIdList writeIdList = new ValidReaderWriteIdList(tableName, exceptions, new BitSet(), 2000, 900);
+ String str = writeIdList.writeToString();
+ Configuration conf = new Configuration();
+ conf.set(ValidWriteIdList.VALID_WRITEIDS_KEY, str);
+ File tmpFile = File.createTempFile("TestValidTxnImpl", "readWriteConfig");
+ DataOutputStream out = new DataOutputStream(new FileOutputStream(tmpFile));
+ conf.write(out);
+ out.close();
+ DataInputStream in = new DataInputStream(new FileInputStream(tmpFile));
+ Configuration newConf = new Configuration();
+ newConf.readFields(in);
+ TestCase.assertEquals(str, newConf.get(ValidWriteIdList.VALID_WRITEIDS_KEY));
+ }
+
+ @Test
+ public void testAbortedTxn() throws Exception {
+ long[] exceptions = {2L, 4L, 6L, 8L, 10L};
+ BitSet bitSet = new BitSet(exceptions.length);
+ bitSet.set(0); // mark txn "2L" aborted
+ bitSet.set(3); // mark txn "8L" aborted
+ ValidWriteIdList writeIdList = new ValidReaderWriteIdList(tableName, exceptions, bitSet, 11, 4L);
+ String str = writeIdList.writeToString();
+ TestCase.assertEquals(tableName + ":11:4:4,6,10:2,8", str);
+ TestCase.assertTrue(writeIdList.isWriteIdAborted(2L));
+ TestCase.assertFalse(writeIdList.isWriteIdAborted(4L));
+ TestCase.assertFalse(writeIdList.isWriteIdAborted(6L));
+ TestCase.assertTrue(writeIdList.isWriteIdAborted(8L));
+ TestCase.assertFalse(writeIdList.isWriteIdAborted(10L));
+ }
+}
[14/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
index 6bd6aa2..921cba1 100644
--- a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
+++ b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
@@ -1240,14 +1240,14 @@ uint32_t ThriftHiveMetastore_get_databases_result::read(::apache::thrift::protoc
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1049;
- ::apache::thrift::protocol::TType _etype1052;
- xfer += iprot->readListBegin(_etype1052, _size1049);
- this->success.resize(_size1049);
- uint32_t _i1053;
- for (_i1053 = 0; _i1053 < _size1049; ++_i1053)
+ uint32_t _size1091;
+ ::apache::thrift::protocol::TType _etype1094;
+ xfer += iprot->readListBegin(_etype1094, _size1091);
+ this->success.resize(_size1091);
+ uint32_t _i1095;
+ for (_i1095 = 0; _i1095 < _size1091; ++_i1095)
{
- xfer += iprot->readString(this->success[_i1053]);
+ xfer += iprot->readString(this->success[_i1095]);
}
xfer += iprot->readListEnd();
}
@@ -1286,10 +1286,10 @@ uint32_t ThriftHiveMetastore_get_databases_result::write(::apache::thrift::proto
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
- std::vector<std::string> ::const_iterator _iter1054;
- for (_iter1054 = this->success.begin(); _iter1054 != this->success.end(); ++_iter1054)
+ std::vector<std::string> ::const_iterator _iter1096;
+ for (_iter1096 = this->success.begin(); _iter1096 != this->success.end(); ++_iter1096)
{
- xfer += oprot->writeString((*_iter1054));
+ xfer += oprot->writeString((*_iter1096));
}
xfer += oprot->writeListEnd();
}
@@ -1334,14 +1334,14 @@ uint32_t ThriftHiveMetastore_get_databases_presult::read(::apache::thrift::proto
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1055;
- ::apache::thrift::protocol::TType _etype1058;
- xfer += iprot->readListBegin(_etype1058, _size1055);
- (*(this->success)).resize(_size1055);
- uint32_t _i1059;
- for (_i1059 = 0; _i1059 < _size1055; ++_i1059)
+ uint32_t _size1097;
+ ::apache::thrift::protocol::TType _etype1100;
+ xfer += iprot->readListBegin(_etype1100, _size1097);
+ (*(this->success)).resize(_size1097);
+ uint32_t _i1101;
+ for (_i1101 = 0; _i1101 < _size1097; ++_i1101)
{
- xfer += iprot->readString((*(this->success))[_i1059]);
+ xfer += iprot->readString((*(this->success))[_i1101]);
}
xfer += iprot->readListEnd();
}
@@ -1458,14 +1458,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::read(::apache::thrift::pr
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1060;
- ::apache::thrift::protocol::TType _etype1063;
- xfer += iprot->readListBegin(_etype1063, _size1060);
- this->success.resize(_size1060);
- uint32_t _i1064;
- for (_i1064 = 0; _i1064 < _size1060; ++_i1064)
+ uint32_t _size1102;
+ ::apache::thrift::protocol::TType _etype1105;
+ xfer += iprot->readListBegin(_etype1105, _size1102);
+ this->success.resize(_size1102);
+ uint32_t _i1106;
+ for (_i1106 = 0; _i1106 < _size1102; ++_i1106)
{
- xfer += iprot->readString(this->success[_i1064]);
+ xfer += iprot->readString(this->success[_i1106]);
}
xfer += iprot->readListEnd();
}
@@ -1504,10 +1504,10 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::write(::apache::thrift::p
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
- std::vector<std::string> ::const_iterator _iter1065;
- for (_iter1065 = this->success.begin(); _iter1065 != this->success.end(); ++_iter1065)
+ std::vector<std::string> ::const_iterator _iter1107;
+ for (_iter1107 = this->success.begin(); _iter1107 != this->success.end(); ++_iter1107)
{
- xfer += oprot->writeString((*_iter1065));
+ xfer += oprot->writeString((*_iter1107));
}
xfer += oprot->writeListEnd();
}
@@ -1552,14 +1552,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_presult::read(::apache::thrift::p
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1066;
- ::apache::thrift::protocol::TType _etype1069;
- xfer += iprot->readListBegin(_etype1069, _size1066);
- (*(this->success)).resize(_size1066);
- uint32_t _i1070;
- for (_i1070 = 0; _i1070 < _size1066; ++_i1070)
+ uint32_t _size1108;
+ ::apache::thrift::protocol::TType _etype1111;
+ xfer += iprot->readListBegin(_etype1111, _size1108);
+ (*(this->success)).resize(_size1108);
+ uint32_t _i1112;
+ for (_i1112 = 0; _i1112 < _size1108; ++_i1112)
{
- xfer += iprot->readString((*(this->success))[_i1070]);
+ xfer += iprot->readString((*(this->success))[_i1112]);
}
xfer += iprot->readListEnd();
}
@@ -2621,17 +2621,17 @@ uint32_t ThriftHiveMetastore_get_type_all_result::read(::apache::thrift::protoco
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->success.clear();
- uint32_t _size1071;
- ::apache::thrift::protocol::TType _ktype1072;
- ::apache::thrift::protocol::TType _vtype1073;
- xfer += iprot->readMapBegin(_ktype1072, _vtype1073, _size1071);
- uint32_t _i1075;
- for (_i1075 = 0; _i1075 < _size1071; ++_i1075)
+ uint32_t _size1113;
+ ::apache::thrift::protocol::TType _ktype1114;
+ ::apache::thrift::protocol::TType _vtype1115;
+ xfer += iprot->readMapBegin(_ktype1114, _vtype1115, _size1113);
+ uint32_t _i1117;
+ for (_i1117 = 0; _i1117 < _size1113; ++_i1117)
{
- std::string _key1076;
- xfer += iprot->readString(_key1076);
- Type& _val1077 = this->success[_key1076];
- xfer += _val1077.read(iprot);
+ std::string _key1118;
+ xfer += iprot->readString(_key1118);
+ Type& _val1119 = this->success[_key1118];
+ xfer += _val1119.read(iprot);
}
xfer += iprot->readMapEnd();
}
@@ -2670,11 +2670,11 @@ uint32_t ThriftHiveMetastore_get_type_all_result::write(::apache::thrift::protoc
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
- std::map<std::string, Type> ::const_iterator _iter1078;
- for (_iter1078 = this->success.begin(); _iter1078 != this->success.end(); ++_iter1078)
+ std::map<std::string, Type> ::const_iterator _iter1120;
+ for (_iter1120 = this->success.begin(); _iter1120 != this->success.end(); ++_iter1120)
{
- xfer += oprot->writeString(_iter1078->first);
- xfer += _iter1078->second.write(oprot);
+ xfer += oprot->writeString(_iter1120->first);
+ xfer += _iter1120->second.write(oprot);
}
xfer += oprot->writeMapEnd();
}
@@ -2719,17 +2719,17 @@ uint32_t ThriftHiveMetastore_get_type_all_presult::read(::apache::thrift::protoc
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
(*(this->success)).clear();
- uint32_t _size1079;
- ::apache::thrift::protocol::TType _ktype1080;
- ::apache::thrift::protocol::TType _vtype1081;
- xfer += iprot->readMapBegin(_ktype1080, _vtype1081, _size1079);
- uint32_t _i1083;
- for (_i1083 = 0; _i1083 < _size1079; ++_i1083)
+ uint32_t _size1121;
+ ::apache::thrift::protocol::TType _ktype1122;
+ ::apache::thrift::protocol::TType _vtype1123;
+ xfer += iprot->readMapBegin(_ktype1122, _vtype1123, _size1121);
+ uint32_t _i1125;
+ for (_i1125 = 0; _i1125 < _size1121; ++_i1125)
{
- std::string _key1084;
- xfer += iprot->readString(_key1084);
- Type& _val1085 = (*(this->success))[_key1084];
- xfer += _val1085.read(iprot);
+ std::string _key1126;
+ xfer += iprot->readString(_key1126);
+ Type& _val1127 = (*(this->success))[_key1126];
+ xfer += _val1127.read(iprot);
}
xfer += iprot->readMapEnd();
}
@@ -2883,14 +2883,14 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(::apache::thrift::protocol:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1086;
- ::apache::thrift::protocol::TType _etype1089;
- xfer += iprot->readListBegin(_etype1089, _size1086);
- this->success.resize(_size1086);
- uint32_t _i1090;
- for (_i1090 = 0; _i1090 < _size1086; ++_i1090)
+ uint32_t _size1128;
+ ::apache::thrift::protocol::TType _etype1131;
+ xfer += iprot->readListBegin(_etype1131, _size1128);
+ this->success.resize(_size1128);
+ uint32_t _i1132;
+ for (_i1132 = 0; _i1132 < _size1128; ++_i1132)
{
- xfer += this->success[_i1090].read(iprot);
+ xfer += this->success[_i1132].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -2945,10 +2945,10 @@ uint32_t ThriftHiveMetastore_get_fields_result::write(::apache::thrift::protocol
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
- std::vector<FieldSchema> ::const_iterator _iter1091;
- for (_iter1091 = this->success.begin(); _iter1091 != this->success.end(); ++_iter1091)
+ std::vector<FieldSchema> ::const_iterator _iter1133;
+ for (_iter1133 = this->success.begin(); _iter1133 != this->success.end(); ++_iter1133)
{
- xfer += (*_iter1091).write(oprot);
+ xfer += (*_iter1133).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -3001,14 +3001,14 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(::apache::thrift::protocol
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1092;
- ::apache::thrift::protocol::TType _etype1095;
- xfer += iprot->readListBegin(_etype1095, _size1092);
- (*(this->success)).resize(_size1092);
- uint32_t _i1096;
- for (_i1096 = 0; _i1096 < _size1092; ++_i1096)
+ uint32_t _size1134;
+ ::apache::thrift::protocol::TType _etype1137;
+ xfer += iprot->readListBegin(_etype1137, _size1134);
+ (*(this->success)).resize(_size1134);
+ uint32_t _i1138;
+ for (_i1138 = 0; _i1138 < _size1134; ++_i1138)
{
- xfer += (*(this->success))[_i1096].read(iprot);
+ xfer += (*(this->success))[_i1138].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -3194,14 +3194,14 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::read(::
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1097;
- ::apache::thrift::protocol::TType _etype1100;
- xfer += iprot->readListBegin(_etype1100, _size1097);
- this->success.resize(_size1097);
- uint32_t _i1101;
- for (_i1101 = 0; _i1101 < _size1097; ++_i1101)
+ uint32_t _size1139;
+ ::apache::thrift::protocol::TType _etype1142;
+ xfer += iprot->readListBegin(_etype1142, _size1139);
+ this->success.resize(_size1139);
+ uint32_t _i1143;
+ for (_i1143 = 0; _i1143 < _size1139; ++_i1143)
{
- xfer += this->success[_i1101].read(iprot);
+ xfer += this->success[_i1143].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -3256,10 +3256,10 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::write(:
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
- std::vector<FieldSchema> ::const_iterator _iter1102;
- for (_iter1102 = this->success.begin(); _iter1102 != this->success.end(); ++_iter1102)
+ std::vector<FieldSchema> ::const_iterator _iter1144;
+ for (_iter1144 = this->success.begin(); _iter1144 != this->success.end(); ++_iter1144)
{
- xfer += (*_iter1102).write(oprot);
+ xfer += (*_iter1144).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -3312,14 +3312,14 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_presult::read(:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1103;
- ::apache::thrift::protocol::TType _etype1106;
- xfer += iprot->readListBegin(_etype1106, _size1103);
- (*(this->success)).resize(_size1103);
- uint32_t _i1107;
- for (_i1107 = 0; _i1107 < _size1103; ++_i1107)
+ uint32_t _size1145;
+ ::apache::thrift::protocol::TType _etype1148;
+ xfer += iprot->readListBegin(_etype1148, _size1145);
+ (*(this->success)).resize(_size1145);
+ uint32_t _i1149;
+ for (_i1149 = 0; _i1149 < _size1145; ++_i1149)
{
- xfer += (*(this->success))[_i1107].read(iprot);
+ xfer += (*(this->success))[_i1149].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -3489,14 +3489,14 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(::apache::thrift::protocol:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1108;
- ::apache::thrift::protocol::TType _etype1111;
- xfer += iprot->readListBegin(_etype1111, _size1108);
- this->success.resize(_size1108);
- uint32_t _i1112;
- for (_i1112 = 0; _i1112 < _size1108; ++_i1112)
+ uint32_t _size1150;
+ ::apache::thrift::protocol::TType _etype1153;
+ xfer += iprot->readListBegin(_etype1153, _size1150);
+ this->success.resize(_size1150);
+ uint32_t _i1154;
+ for (_i1154 = 0; _i1154 < _size1150; ++_i1154)
{
- xfer += this->success[_i1112].read(iprot);
+ xfer += this->success[_i1154].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -3551,10 +3551,10 @@ uint32_t ThriftHiveMetastore_get_schema_result::write(::apache::thrift::protocol
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
- std::vector<FieldSchema> ::const_iterator _iter1113;
- for (_iter1113 = this->success.begin(); _iter1113 != this->success.end(); ++_iter1113)
+ std::vector<FieldSchema> ::const_iterator _iter1155;
+ for (_iter1155 = this->success.begin(); _iter1155 != this->success.end(); ++_iter1155)
{
- xfer += (*_iter1113).write(oprot);
+ xfer += (*_iter1155).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -3607,14 +3607,14 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(::apache::thrift::protocol
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1114;
- ::apache::thrift::protocol::TType _etype1117;
- xfer += iprot->readListBegin(_etype1117, _size1114);
- (*(this->success)).resize(_size1114);
- uint32_t _i1118;
- for (_i1118 = 0; _i1118 < _size1114; ++_i1118)
+ uint32_t _size1156;
+ ::apache::thrift::protocol::TType _etype1159;
+ xfer += iprot->readListBegin(_etype1159, _size1156);
+ (*(this->success)).resize(_size1156);
+ uint32_t _i1160;
+ for (_i1160 = 0; _i1160 < _size1156; ++_i1160)
{
- xfer += (*(this->success))[_i1118].read(iprot);
+ xfer += (*(this->success))[_i1160].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -3800,14 +3800,14 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::read(::
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1119;
- ::apache::thrift::protocol::TType _etype1122;
- xfer += iprot->readListBegin(_etype1122, _size1119);
- this->success.resize(_size1119);
- uint32_t _i1123;
- for (_i1123 = 0; _i1123 < _size1119; ++_i1123)
+ uint32_t _size1161;
+ ::apache::thrift::protocol::TType _etype1164;
+ xfer += iprot->readListBegin(_etype1164, _size1161);
+ this->success.resize(_size1161);
+ uint32_t _i1165;
+ for (_i1165 = 0; _i1165 < _size1161; ++_i1165)
{
- xfer += this->success[_i1123].read(iprot);
+ xfer += this->success[_i1165].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -3862,10 +3862,10 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::write(:
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
- std::vector<FieldSchema> ::const_iterator _iter1124;
- for (_iter1124 = this->success.begin(); _iter1124 != this->success.end(); ++_iter1124)
+ std::vector<FieldSchema> ::const_iterator _iter1166;
+ for (_iter1166 = this->success.begin(); _iter1166 != this->success.end(); ++_iter1166)
{
- xfer += (*_iter1124).write(oprot);
+ xfer += (*_iter1166).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -3918,14 +3918,14 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_presult::read(:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1125;
- ::apache::thrift::protocol::TType _etype1128;
- xfer += iprot->readListBegin(_etype1128, _size1125);
- (*(this->success)).resize(_size1125);
- uint32_t _i1129;
- for (_i1129 = 0; _i1129 < _size1125; ++_i1129)
+ uint32_t _size1167;
+ ::apache::thrift::protocol::TType _etype1170;
+ xfer += iprot->readListBegin(_etype1170, _size1167);
+ (*(this->success)).resize(_size1167);
+ uint32_t _i1171;
+ for (_i1171 = 0; _i1171 < _size1167; ++_i1171)
{
- xfer += (*(this->success))[_i1129].read(iprot);
+ xfer += (*(this->success))[_i1171].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -4518,14 +4518,14 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::read(::apache::
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->primaryKeys.clear();
- uint32_t _size1130;
- ::apache::thrift::protocol::TType _etype1133;
- xfer += iprot->readListBegin(_etype1133, _size1130);
- this->primaryKeys.resize(_size1130);
- uint32_t _i1134;
- for (_i1134 = 0; _i1134 < _size1130; ++_i1134)
+ uint32_t _size1172;
+ ::apache::thrift::protocol::TType _etype1175;
+ xfer += iprot->readListBegin(_etype1175, _size1172);
+ this->primaryKeys.resize(_size1172);
+ uint32_t _i1176;
+ for (_i1176 = 0; _i1176 < _size1172; ++_i1176)
{
- xfer += this->primaryKeys[_i1134].read(iprot);
+ xfer += this->primaryKeys[_i1176].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -4538,14 +4538,14 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::read(::apache::
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->foreignKeys.clear();
- uint32_t _size1135;
- ::apache::thrift::protocol::TType _etype1138;
- xfer += iprot->readListBegin(_etype1138, _size1135);
- this->foreignKeys.resize(_size1135);
- uint32_t _i1139;
- for (_i1139 = 0; _i1139 < _size1135; ++_i1139)
+ uint32_t _size1177;
+ ::apache::thrift::protocol::TType _etype1180;
+ xfer += iprot->readListBegin(_etype1180, _size1177);
+ this->foreignKeys.resize(_size1177);
+ uint32_t _i1181;
+ for (_i1181 = 0; _i1181 < _size1177; ++_i1181)
{
- xfer += this->foreignKeys[_i1139].read(iprot);
+ xfer += this->foreignKeys[_i1181].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -4558,14 +4558,14 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::read(::apache::
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->uniqueConstraints.clear();
- uint32_t _size1140;
- ::apache::thrift::protocol::TType _etype1143;
- xfer += iprot->readListBegin(_etype1143, _size1140);
- this->uniqueConstraints.resize(_size1140);
- uint32_t _i1144;
- for (_i1144 = 0; _i1144 < _size1140; ++_i1144)
+ uint32_t _size1182;
+ ::apache::thrift::protocol::TType _etype1185;
+ xfer += iprot->readListBegin(_etype1185, _size1182);
+ this->uniqueConstraints.resize(_size1182);
+ uint32_t _i1186;
+ for (_i1186 = 0; _i1186 < _size1182; ++_i1186)
{
- xfer += this->uniqueConstraints[_i1144].read(iprot);
+ xfer += this->uniqueConstraints[_i1186].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -4578,14 +4578,14 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::read(::apache::
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->notNullConstraints.clear();
- uint32_t _size1145;
- ::apache::thrift::protocol::TType _etype1148;
- xfer += iprot->readListBegin(_etype1148, _size1145);
- this->notNullConstraints.resize(_size1145);
- uint32_t _i1149;
- for (_i1149 = 0; _i1149 < _size1145; ++_i1149)
+ uint32_t _size1187;
+ ::apache::thrift::protocol::TType _etype1190;
+ xfer += iprot->readListBegin(_etype1190, _size1187);
+ this->notNullConstraints.resize(_size1187);
+ uint32_t _i1191;
+ for (_i1191 = 0; _i1191 < _size1187; ++_i1191)
{
- xfer += this->notNullConstraints[_i1149].read(iprot);
+ xfer += this->notNullConstraints[_i1191].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -4618,10 +4618,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::write(::apache:
xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->primaryKeys.size()));
- std::vector<SQLPrimaryKey> ::const_iterator _iter1150;
- for (_iter1150 = this->primaryKeys.begin(); _iter1150 != this->primaryKeys.end(); ++_iter1150)
+ std::vector<SQLPrimaryKey> ::const_iterator _iter1192;
+ for (_iter1192 = this->primaryKeys.begin(); _iter1192 != this->primaryKeys.end(); ++_iter1192)
{
- xfer += (*_iter1150).write(oprot);
+ xfer += (*_iter1192).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -4630,10 +4630,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::write(::apache:
xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->foreignKeys.size()));
- std::vector<SQLForeignKey> ::const_iterator _iter1151;
- for (_iter1151 = this->foreignKeys.begin(); _iter1151 != this->foreignKeys.end(); ++_iter1151)
+ std::vector<SQLForeignKey> ::const_iterator _iter1193;
+ for (_iter1193 = this->foreignKeys.begin(); _iter1193 != this->foreignKeys.end(); ++_iter1193)
{
- xfer += (*_iter1151).write(oprot);
+ xfer += (*_iter1193).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -4642,10 +4642,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::write(::apache:
xfer += oprot->writeFieldBegin("uniqueConstraints", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->uniqueConstraints.size()));
- std::vector<SQLUniqueConstraint> ::const_iterator _iter1152;
- for (_iter1152 = this->uniqueConstraints.begin(); _iter1152 != this->uniqueConstraints.end(); ++_iter1152)
+ std::vector<SQLUniqueConstraint> ::const_iterator _iter1194;
+ for (_iter1194 = this->uniqueConstraints.begin(); _iter1194 != this->uniqueConstraints.end(); ++_iter1194)
{
- xfer += (*_iter1152).write(oprot);
+ xfer += (*_iter1194).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -4654,10 +4654,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::write(::apache:
xfer += oprot->writeFieldBegin("notNullConstraints", ::apache::thrift::protocol::T_LIST, 5);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->notNullConstraints.size()));
- std::vector<SQLNotNullConstraint> ::const_iterator _iter1153;
- for (_iter1153 = this->notNullConstraints.begin(); _iter1153 != this->notNullConstraints.end(); ++_iter1153)
+ std::vector<SQLNotNullConstraint> ::const_iterator _iter1195;
+ for (_iter1195 = this->notNullConstraints.begin(); _iter1195 != this->notNullConstraints.end(); ++_iter1195)
{
- xfer += (*_iter1153).write(oprot);
+ xfer += (*_iter1195).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -4685,10 +4685,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_pargs::write(::apache
xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->primaryKeys)).size()));
- std::vector<SQLPrimaryKey> ::const_iterator _iter1154;
- for (_iter1154 = (*(this->primaryKeys)).begin(); _iter1154 != (*(this->primaryKeys)).end(); ++_iter1154)
+ std::vector<SQLPrimaryKey> ::const_iterator _iter1196;
+ for (_iter1196 = (*(this->primaryKeys)).begin(); _iter1196 != (*(this->primaryKeys)).end(); ++_iter1196)
{
- xfer += (*_iter1154).write(oprot);
+ xfer += (*_iter1196).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -4697,10 +4697,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_pargs::write(::apache
xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->foreignKeys)).size()));
- std::vector<SQLForeignKey> ::const_iterator _iter1155;
- for (_iter1155 = (*(this->foreignKeys)).begin(); _iter1155 != (*(this->foreignKeys)).end(); ++_iter1155)
+ std::vector<SQLForeignKey> ::const_iterator _iter1197;
+ for (_iter1197 = (*(this->foreignKeys)).begin(); _iter1197 != (*(this->foreignKeys)).end(); ++_iter1197)
{
- xfer += (*_iter1155).write(oprot);
+ xfer += (*_iter1197).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -4709,10 +4709,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_pargs::write(::apache
xfer += oprot->writeFieldBegin("uniqueConstraints", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->uniqueConstraints)).size()));
- std::vector<SQLUniqueConstraint> ::const_iterator _iter1156;
- for (_iter1156 = (*(this->uniqueConstraints)).begin(); _iter1156 != (*(this->uniqueConstraints)).end(); ++_iter1156)
+ std::vector<SQLUniqueConstraint> ::const_iterator _iter1198;
+ for (_iter1198 = (*(this->uniqueConstraints)).begin(); _iter1198 != (*(this->uniqueConstraints)).end(); ++_iter1198)
{
- xfer += (*_iter1156).write(oprot);
+ xfer += (*_iter1198).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -4721,10 +4721,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_pargs::write(::apache
xfer += oprot->writeFieldBegin("notNullConstraints", ::apache::thrift::protocol::T_LIST, 5);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->notNullConstraints)).size()));
- std::vector<SQLNotNullConstraint> ::const_iterator _iter1157;
- for (_iter1157 = (*(this->notNullConstraints)).begin(); _iter1157 != (*(this->notNullConstraints)).end(); ++_iter1157)
+ std::vector<SQLNotNullConstraint> ::const_iterator _iter1199;
+ for (_iter1199 = (*(this->notNullConstraints)).begin(); _iter1199 != (*(this->notNullConstraints)).end(); ++_iter1199)
{
- xfer += (*_iter1157).write(oprot);
+ xfer += (*_iter1199).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -6478,14 +6478,14 @@ uint32_t ThriftHiveMetastore_truncate_table_args::read(::apache::thrift::protoco
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partNames.clear();
- uint32_t _size1158;
- ::apache::thrift::protocol::TType _etype1161;
- xfer += iprot->readListBegin(_etype1161, _size1158);
- this->partNames.resize(_size1158);
- uint32_t _i1162;
- for (_i1162 = 0; _i1162 < _size1158; ++_i1162)
+ uint32_t _size1200;
+ ::apache::thrift::protocol::TType _etype1203;
+ xfer += iprot->readListBegin(_etype1203, _size1200);
+ this->partNames.resize(_size1200);
+ uint32_t _i1204;
+ for (_i1204 = 0; _i1204 < _size1200; ++_i1204)
{
- xfer += iprot->readString(this->partNames[_i1162]);
+ xfer += iprot->readString(this->partNames[_i1204]);
}
xfer += iprot->readListEnd();
}
@@ -6522,10 +6522,10 @@ uint32_t ThriftHiveMetastore_truncate_table_args::write(::apache::thrift::protoc
xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partNames.size()));
- std::vector<std::string> ::const_iterator _iter1163;
- for (_iter1163 = this->partNames.begin(); _iter1163 != this->partNames.end(); ++_iter1163)
+ std::vector<std::string> ::const_iterator _iter1205;
+ for (_iter1205 = this->partNames.begin(); _iter1205 != this->partNames.end(); ++_iter1205)
{
- xfer += oprot->writeString((*_iter1163));
+ xfer += oprot->writeString((*_iter1205));
}
xfer += oprot->writeListEnd();
}
@@ -6557,10 +6557,10 @@ uint32_t ThriftHiveMetastore_truncate_table_pargs::write(::apache::thrift::proto
xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->partNames)).size()));
- std::vector<std::string> ::const_iterator _iter1164;
- for (_iter1164 = (*(this->partNames)).begin(); _iter1164 != (*(this->partNames)).end(); ++_iter1164)
+ std::vector<std::string> ::const_iterator _iter1206;
+ for (_iter1206 = (*(this->partNames)).begin(); _iter1206 != (*(this->partNames)).end(); ++_iter1206)
{
- xfer += oprot->writeString((*_iter1164));
+ xfer += oprot->writeString((*_iter1206));
}
xfer += oprot->writeListEnd();
}
@@ -6804,14 +6804,14 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(::apache::thrift::protocol:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1165;
- ::apache::thrift::protocol::TType _etype1168;
- xfer += iprot->readListBegin(_etype1168, _size1165);
- this->success.resize(_size1165);
- uint32_t _i1169;
- for (_i1169 = 0; _i1169 < _size1165; ++_i1169)
+ uint32_t _size1207;
+ ::apache::thrift::protocol::TType _etype1210;
+ xfer += iprot->readListBegin(_etype1210, _size1207);
+ this->success.resize(_size1207);
+ uint32_t _i1211;
+ for (_i1211 = 0; _i1211 < _size1207; ++_i1211)
{
- xfer += iprot->readString(this->success[_i1169]);
+ xfer += iprot->readString(this->success[_i1211]);
}
xfer += iprot->readListEnd();
}
@@ -6850,10 +6850,10 @@ uint32_t ThriftHiveMetastore_get_tables_result::write(::apache::thrift::protocol
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
- std::vector<std::string> ::const_iterator _iter1170;
- for (_iter1170 = this->success.begin(); _iter1170 != this->success.end(); ++_iter1170)
+ std::vector<std::string> ::const_iterator _iter1212;
+ for (_iter1212 = this->success.begin(); _iter1212 != this->success.end(); ++_iter1212)
{
- xfer += oprot->writeString((*_iter1170));
+ xfer += oprot->writeString((*_iter1212));
}
xfer += oprot->writeListEnd();
}
@@ -6898,14 +6898,14 @@ uint32_t ThriftHiveMetastore_get_tables_presult::read(::apache::thrift::protocol
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1171;
- ::apache::thrift::protocol::TType _etype1174;
- xfer += iprot->readListBegin(_etype1174, _size1171);
- (*(this->success)).resize(_size1171);
- uint32_t _i1175;
- for (_i1175 = 0; _i1175 < _size1171; ++_i1175)
+ uint32_t _size1213;
+ ::apache::thrift::protocol::TType _etype1216;
+ xfer += iprot->readListBegin(_etype1216, _size1213);
+ (*(this->success)).resize(_size1213);
+ uint32_t _i1217;
+ for (_i1217 = 0; _i1217 < _size1213; ++_i1217)
{
- xfer += iprot->readString((*(this->success))[_i1175]);
+ xfer += iprot->readString((*(this->success))[_i1217]);
}
xfer += iprot->readListEnd();
}
@@ -7075,14 +7075,14 @@ uint32_t ThriftHiveMetastore_get_tables_by_type_result::read(::apache::thrift::p
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1176;
- ::apache::thrift::protocol::TType _etype1179;
- xfer += iprot->readListBegin(_etype1179, _size1176);
- this->success.resize(_size1176);
- uint32_t _i1180;
- for (_i1180 = 0; _i1180 < _size1176; ++_i1180)
+ uint32_t _size1218;
+ ::apache::thrift::protocol::TType _etype1221;
+ xfer += iprot->readListBegin(_etype1221, _size1218);
+ this->success.resize(_size1218);
+ uint32_t _i1222;
+ for (_i1222 = 0; _i1222 < _size1218; ++_i1222)
{
- xfer += iprot->readString(this->success[_i1180]);
+ xfer += iprot->readString(this->success[_i1222]);
}
xfer += iprot->readListEnd();
}
@@ -7121,10 +7121,10 @@ uint32_t ThriftHiveMetastore_get_tables_by_type_result::write(::apache::thrift::
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
- std::vector<std::string> ::const_iterator _iter1181;
- for (_iter1181 = this->success.begin(); _iter1181 != this->success.end(); ++_iter1181)
+ std::vector<std::string> ::const_iterator _iter1223;
+ for (_iter1223 = this->success.begin(); _iter1223 != this->success.end(); ++_iter1223)
{
- xfer += oprot->writeString((*_iter1181));
+ xfer += oprot->writeString((*_iter1223));
}
xfer += oprot->writeListEnd();
}
@@ -7169,14 +7169,14 @@ uint32_t ThriftHiveMetastore_get_tables_by_type_presult::read(::apache::thrift::
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1182;
- ::apache::thrift::protocol::TType _etype1185;
- xfer += iprot->readListBegin(_etype1185, _size1182);
- (*(this->success)).resize(_size1182);
- uint32_t _i1186;
- for (_i1186 = 0; _i1186 < _size1182; ++_i1186)
+ uint32_t _size1224;
+ ::apache::thrift::protocol::TType _etype1227;
+ xfer += iprot->readListBegin(_etype1227, _size1224);
+ (*(this->success)).resize(_size1224);
+ uint32_t _i1228;
+ for (_i1228 = 0; _i1228 < _size1224; ++_i1228)
{
- xfer += iprot->readString((*(this->success))[_i1186]);
+ xfer += iprot->readString((*(this->success))[_i1228]);
}
xfer += iprot->readListEnd();
}
@@ -7314,14 +7314,14 @@ uint32_t ThriftHiveMetastore_get_materialized_views_for_rewriting_result::read(:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1187;
- ::apache::thrift::protocol::TType _etype1190;
- xfer += iprot->readListBegin(_etype1190, _size1187);
- this->success.resize(_size1187);
- uint32_t _i1191;
- for (_i1191 = 0; _i1191 < _size1187; ++_i1191)
+ uint32_t _size1229;
+ ::apache::thrift::protocol::TType _etype1232;
+ xfer += iprot->readListBegin(_etype1232, _size1229);
+ this->success.resize(_size1229);
+ uint32_t _i1233;
+ for (_i1233 = 0; _i1233 < _size1229; ++_i1233)
{
- xfer += iprot->readString(this->success[_i1191]);
+ xfer += iprot->readString(this->success[_i1233]);
}
xfer += iprot->readListEnd();
}
@@ -7360,10 +7360,10 @@ uint32_t ThriftHiveMetastore_get_materialized_views_for_rewriting_result::write(
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
- std::vector<std::string> ::const_iterator _iter1192;
- for (_iter1192 = this->success.begin(); _iter1192 != this->success.end(); ++_iter1192)
+ std::vector<std::string> ::const_iterator _iter1234;
+ for (_iter1234 = this->success.begin(); _iter1234 != this->success.end(); ++_iter1234)
{
- xfer += oprot->writeString((*_iter1192));
+ xfer += oprot->writeString((*_iter1234));
}
xfer += oprot->writeListEnd();
}
@@ -7408,14 +7408,14 @@ uint32_t ThriftHiveMetastore_get_materialized_views_for_rewriting_presult::read(
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1193;
- ::apache::thrift::protocol::TType _etype1196;
- xfer += iprot->readListBegin(_etype1196, _size1193);
- (*(this->success)).resize(_size1193);
- uint32_t _i1197;
- for (_i1197 = 0; _i1197 < _size1193; ++_i1197)
+ uint32_t _size1235;
+ ::apache::thrift::protocol::TType _etype1238;
+ xfer += iprot->readListBegin(_etype1238, _size1235);
+ (*(this->success)).resize(_size1235);
+ uint32_t _i1239;
+ for (_i1239 = 0; _i1239 < _size1235; ++_i1239)
{
- xfer += iprot->readString((*(this->success))[_i1197]);
+ xfer += iprot->readString((*(this->success))[_i1239]);
}
xfer += iprot->readListEnd();
}
@@ -7490,14 +7490,14 @@ uint32_t ThriftHiveMetastore_get_table_meta_args::read(::apache::thrift::protoco
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->tbl_types.clear();
- uint32_t _size1198;
- ::apache::thrift::protocol::TType _etype1201;
- xfer += iprot->readListBegin(_etype1201, _size1198);
- this->tbl_types.resize(_size1198);
- uint32_t _i1202;
- for (_i1202 = 0; _i1202 < _size1198; ++_i1202)
+ uint32_t _size1240;
+ ::apache::thrift::protocol::TType _etype1243;
+ xfer += iprot->readListBegin(_etype1243, _size1240);
+ this->tbl_types.resize(_size1240);
+ uint32_t _i1244;
+ for (_i1244 = 0; _i1244 < _size1240; ++_i1244)
{
- xfer += iprot->readString(this->tbl_types[_i1202]);
+ xfer += iprot->readString(this->tbl_types[_i1244]);
}
xfer += iprot->readListEnd();
}
@@ -7534,10 +7534,10 @@ uint32_t ThriftHiveMetastore_get_table_meta_args::write(::apache::thrift::protoc
xfer += oprot->writeFieldBegin("tbl_types", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->tbl_types.size()));
- std::vector<std::string> ::const_iterator _iter1203;
- for (_iter1203 = this->tbl_types.begin(); _iter1203 != this->tbl_types.end(); ++_iter1203)
+ std::vector<std::string> ::const_iterator _iter1245;
+ for (_iter1245 = this->tbl_types.begin(); _iter1245 != this->tbl_types.end(); ++_iter1245)
{
- xfer += oprot->writeString((*_iter1203));
+ xfer += oprot->writeString((*_iter1245));
}
xfer += oprot->writeListEnd();
}
@@ -7569,10 +7569,10 @@ uint32_t ThriftHiveMetastore_get_table_meta_pargs::write(::apache::thrift::proto
xfer += oprot->writeFieldBegin("tbl_types", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->tbl_types)).size()));
- std::vector<std::string> ::const_iterator _iter1204;
- for (_iter1204 = (*(this->tbl_types)).begin(); _iter1204 != (*(this->tbl_types)).end(); ++_iter1204)
+ std::vector<std::string> ::const_iterator _iter1246;
+ for (_iter1246 = (*(this->tbl_types)).begin(); _iter1246 != (*(this->tbl_types)).end(); ++_iter1246)
{
- xfer += oprot->writeString((*_iter1204));
+ xfer += oprot->writeString((*_iter1246));
}
xfer += oprot->writeListEnd();
}
@@ -7613,14 +7613,14 @@ uint32_t ThriftHiveMetastore_get_table_meta_result::read(::apache::thrift::proto
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1205;
- ::apache::thrift::protocol::TType _etype1208;
- xfer += iprot->readListBegin(_etype1208, _size1205);
- this->success.resize(_size1205);
- uint32_t _i1209;
- for (_i1209 = 0; _i1209 < _size1205; ++_i1209)
+ uint32_t _size1247;
+ ::apache::thrift::protocol::TType _etype1250;
+ xfer += iprot->readListBegin(_etype1250, _size1247);
+ this->success.resize(_size1247);
+ uint32_t _i1251;
+ for (_i1251 = 0; _i1251 < _size1247; ++_i1251)
{
- xfer += this->success[_i1209].read(iprot);
+ xfer += this->success[_i1251].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -7659,10 +7659,10 @@ uint32_t ThriftHiveMetastore_get_table_meta_result::write(::apache::thrift::prot
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
- std::vector<TableMeta> ::const_iterator _iter1210;
- for (_iter1210 = this->success.begin(); _iter1210 != this->success.end(); ++_iter1210)
+ std::vector<TableMeta> ::const_iterator _iter1252;
+ for (_iter1252 = this->success.begin(); _iter1252 != this->success.end(); ++_iter1252)
{
- xfer += (*_iter1210).write(oprot);
+ xfer += (*_iter1252).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -7707,14 +7707,14 @@ uint32_t ThriftHiveMetastore_get_table_meta_presult::read(::apache::thrift::prot
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1211;
- ::apache::thrift::protocol::TType _etype1214;
- xfer += iprot->readListBegin(_etype1214, _size1211);
- (*(this->success)).resize(_size1211);
- uint32_t _i1215;
- for (_i1215 = 0; _i1215 < _size1211; ++_i1215)
+ uint32_t _size1253;
+ ::apache::thrift::protocol::TType _etype1256;
+ xfer += iprot->readListBegin(_etype1256, _size1253);
+ (*(this->success)).resize(_size1253);
+ uint32_t _i1257;
+ for (_i1257 = 0; _i1257 < _size1253; ++_i1257)
{
- xfer += (*(this->success))[_i1215].read(iprot);
+ xfer += (*(this->success))[_i1257].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -7852,14 +7852,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::read(::apache::thrift::proto
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1216;
- ::apache::thrift::protocol::TType _etype1219;
- xfer += iprot->readListBegin(_etype1219, _size1216);
- this->success.resize(_size1216);
- uint32_t _i1220;
- for (_i1220 = 0; _i1220 < _size1216; ++_i1220)
+ uint32_t _size1258;
+ ::apache::thrift::protocol::TType _etype1261;
+ xfer += iprot->readListBegin(_etype1261, _size1258);
+ this->success.resize(_size1258);
+ uint32_t _i1262;
+ for (_i1262 = 0; _i1262 < _size1258; ++_i1262)
{
- xfer += iprot->readString(this->success[_i1220]);
+ xfer += iprot->readString(this->success[_i1262]);
}
xfer += iprot->readListEnd();
}
@@ -7898,10 +7898,10 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::write(::apache::thrift::prot
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
- std::vector<std::string> ::const_iterator _iter1221;
- for (_iter1221 = this->success.begin(); _iter1221 != this->success.end(); ++_iter1221)
+ std::vector<std::string> ::const_iterator _iter1263;
+ for (_iter1263 = this->success.begin(); _iter1263 != this->success.end(); ++_iter1263)
{
- xfer += oprot->writeString((*_iter1221));
+ xfer += oprot->writeString((*_iter1263));
}
xfer += oprot->writeListEnd();
}
@@ -7946,14 +7946,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_presult::read(::apache::thrift::prot
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1222;
- ::apache::thrift::protocol::TType _etype1225;
- xfer += iprot->readListBegin(_etype1225, _size1222);
- (*(this->success)).resize(_size1222);
- uint32_t _i1226;
- for (_i1226 = 0; _i1226 < _size1222; ++_i1226)
+ uint32_t _size1264;
+ ::apache::thrift::protocol::TType _etype1267;
+ xfer += iprot->readListBegin(_etype1267, _size1264);
+ (*(this->success)).resize(_size1264);
+ uint32_t _i1268;
+ for (_i1268 = 0; _i1268 < _size1264; ++_i1268)
{
- xfer += iprot->readString((*(this->success))[_i1226]);
+ xfer += iprot->readString((*(this->success))[_i1268]);
}
xfer += iprot->readListEnd();
}
@@ -8263,14 +8263,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::read(::apache::thri
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->tbl_names.clear();
- uint32_t _size1227;
- ::apache::thrift::protocol::TType _etype1230;
- xfer += iprot->readListBegin(_etype1230, _size1227);
- this->tbl_names.resize(_size1227);
- uint32_t _i1231;
- for (_i1231 = 0; _i1231 < _size1227; ++_i1231)
+ uint32_t _size1269;
+ ::apache::thrift::protocol::TType _etype1272;
+ xfer += iprot->readListBegin(_etype1272, _size1269);
+ this->tbl_names.resize(_size1269);
+ uint32_t _i1273;
+ for (_i1273 = 0; _i1273 < _size1269; ++_i1273)
{
- xfer += iprot->readString(this->tbl_names[_i1231]);
+ xfer += iprot->readString(this->tbl_names[_i1273]);
}
xfer += iprot->readListEnd();
}
@@ -8303,10 +8303,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thr
xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->tbl_names.size()));
- std::vector<std::string> ::const_iterator _iter1232;
- for (_iter1232 = this->tbl_names.begin(); _iter1232 != this->tbl_names.end(); ++_iter1232)
+ std::vector<std::string> ::const_iterator _iter1274;
+ for (_iter1274 = this->tbl_names.begin(); _iter1274 != this->tbl_names.end(); ++_iter1274)
{
- xfer += oprot->writeString((*_iter1232));
+ xfer += oprot->writeString((*_iter1274));
}
xfer += oprot->writeListEnd();
}
@@ -8334,10 +8334,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::th
xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->tbl_names)).size()));
- std::vector<std::string> ::const_iterator _iter1233;
- for (_iter1233 = (*(this->tbl_names)).begin(); _iter1233 != (*(this->tbl_names)).end(); ++_iter1233)
+ std::vector<std::string> ::const_iterator _iter1275;
+ for (_iter1275 = (*(this->tbl_names)).begin(); _iter1275 != (*(this->tbl_names)).end(); ++_iter1275)
{
- xfer += oprot->writeString((*_iter1233));
+ xfer += oprot->writeString((*_iter1275));
}
xfer += oprot->writeListEnd();
}
@@ -8378,14 +8378,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::read(::apache::th
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1234;
- ::apache::thrift::protocol::TType _etype1237;
- xfer += iprot->readListBegin(_etype1237, _size1234);
- this->success.resize(_size1234);
- uint32_t _i1238;
- for (_i1238 = 0; _i1238 < _size1234; ++_i1238)
+ uint32_t _size1276;
+ ::apache::thrift::protocol::TType _etype1279;
+ xfer += iprot->readListBegin(_etype1279, _size1276);
+ this->success.resize(_size1276);
+ uint32_t _i1280;
+ for (_i1280 = 0; _i1280 < _size1276; ++_i1280)
{
- xfer += this->success[_i1238].read(iprot);
+ xfer += this->success[_i1280].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -8416,10 +8416,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::write(::apache::t
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
- std::vector<Table> ::const_iterator _iter1239;
- for (_iter1239 = this->success.begin(); _iter1239 != this->success.end(); ++_iter1239)
+ std::vector<Table> ::const_iterator _iter1281;
+ for (_iter1281 = this->success.begin(); _iter1281 != this->success.end(); ++_iter1281)
{
- xfer += (*_iter1239).write(oprot);
+ xfer += (*_iter1281).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -8460,14 +8460,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_presult::read(::apache::t
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1240;
- ::apache::thrift::protocol::TType _etype1243;
- xfer += iprot->readListBegin(_etype1243, _size1240);
- (*(this->success)).resize(_size1240);
- uint32_t _i1244;
- for (_i1244 = 0; _i1244 < _size1240; ++_i1244)
+ uint32_t _size1282;
+ ::apache::thrift::protocol::TType _etype1285;
+ xfer += iprot->readListBegin(_etype1285, _size1282);
+ (*(this->success)).resize(_size1282);
+ uint32_t _i1286;
+ for (_i1286 = 0; _i1286 < _size1282; ++_i1286)
{
- xfer += (*(this->success))[_i1244].read(iprot);
+ xfer += (*(this->success))[_i1286].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -9000,14 +9000,14 @@ uint32_t ThriftHiveMetastore_get_materialization_invalidation_info_args::read(::
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->tbl_names.clear();
- uint32_t _size1245;
- ::apache::thrift::protocol::TType _etype1248;
- xfer += iprot->readListBegin(_etype1248, _size1245);
- this->tbl_names.resize(_size1245);
- uint32_t _i1249;
- for (_i1249 = 0; _i1249 < _size1245; ++_i1249)
+ uint32_t _size1287;
+ ::apache::thrift::protocol::TType _etype1290;
+ xfer += iprot->readListBegin(_etype1290, _size1287);
+ this->tbl_names.resize(_size1287);
+ uint32_t _i1291;
+ for (_i1291 = 0; _i1291 < _size1287; ++_i1291)
{
- xfer += iprot->readString(this->tbl_names[_i1249]);
+ xfer += iprot->readString(this->tbl_names[_i1291]);
}
xfer += iprot->readListEnd();
}
@@ -9040,10 +9040,10 @@ uint32_t ThriftHiveMetastore_get_materialization_invalidation_info_args::write(:
xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->tbl_names.size()));
- std::vector<std::string> ::const_iterator _iter1250;
- for (_iter1250 = this->tbl_names.begin(); _iter1250 != this->tbl_names.end(); ++_iter1250)
+ std::vector<std::string> ::const_iterator _iter1292;
+ for (_iter1292 = this->tbl_names.begin(); _iter1292 != this->tbl_names.end(); ++_iter1292)
{
- xfer += oprot->writeString((*_iter1250));
+ xfer += oprot->writeString((*_iter1292));
}
xfer += oprot->writeListEnd();
}
@@ -9071,10 +9071,10 @@ uint32_t ThriftHiveMetastore_get_materialization_invalidation_info_pargs::write(
xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->tbl_names)).size()));
- std::vector<std::string> ::const_iterator _iter1251;
- for (_iter1251 = (*(this->tbl_names)).begin(); _iter1251 != (*(this->tbl_names)).end(); ++_iter1251)
+ std::vector<std::string> ::const_iterator _iter1293;
+ for (_iter1293 = (*(this->tbl_names)).begin(); _iter1293 != (*(this->tbl_names)).end(); ++_iter1293)
{
- xfer += oprot->writeString((*_iter1251));
+ xfer += oprot->writeString((*_iter1293));
}
xfer += oprot->writeListEnd();
}
@@ -9115,17 +9115,17 @@ uint32_t ThriftHiveMetastore_get_materialization_invalidation_info_result::read(
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->success.clear();
- uint32_t _size1252;
- ::apache::thrift::protocol::TType _ktype1253;
- ::apache::thrift::protocol::TType _vtype1254;
- xfer += iprot->readMapBegin(_ktype1253, _vtype1254, _size1252);
- uint32_t _i1256;
- for (_i1256 = 0; _i1256 < _size1252; ++_i1256)
+ uint32_t _size1294;
+ ::apache::thrift::protocol::TType _ktype1295;
+ ::apache::thrift::protocol::TType _vtype1296;
+ xfer += iprot->readMapBegin(_ktype1295, _vtype1296, _size1294);
+ uint32_t _i1298;
+ for (_i1298 = 0; _i1298 < _size1294; ++_i1298)
{
- std::string _key1257;
- xfer += iprot->readString(_key1257);
- Materialization& _val1258 = this->success[_key1257];
- xfer += _val1258.read(iprot);
+ std::string _key1299;
+ xfer += iprot->readString(_key1299);
+ Materialization& _val1300 = this->success[_key1299];
+ xfer += _val1300.read(iprot);
}
xfer += iprot->readMapEnd();
}
@@ -9180,11 +9180,11 @@ uint32_t ThriftHiveMetastore_get_materialization_invalidation_info_result::write
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
- std::map<std::string, Materialization> ::const_iterator _iter1259;
- for (_iter1259 = this->success.begin(); _iter1259 != this->success.end(); ++_iter1259)
+ std::map<std::string, Materialization> ::const_iterator _iter1301;
+ for (_iter1301 = this->success.begin(); _iter1301 != this->success.end(); ++_iter1301)
{
- xfer += oprot->writeString(_iter1259->first);
- xfer += _iter1259->second.write(oprot);
+ xfer += oprot->writeString(_iter1301->first);
+ xfer += _iter1301->second.write(oprot);
}
xfer += oprot->writeMapEnd();
}
@@ -9237,17 +9237,17 @@ uint32_t ThriftHiveMetastore_get_materialization_invalidation_info_presult::read
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
(*(this->success)).clear();
- uint32_t _size1260;
- ::apache::thrift::protocol::TType _ktype1261;
- ::apache::thrift::protocol::TType _vtype1262;
- xfer += iprot->readMapBegin(_ktype1261, _vtype1262, _size1260);
- uint32_t _i1264;
- for (_i1264 = 0; _i1264 < _size1260; ++_i1264)
+ uint32_t _size1302;
+ ::apache::thrift::protocol::TType _ktype1303;
+ ::apache::thrift::protocol::TType _vtype1304;
+ xfer += iprot->readMapBegin(_ktype1303, _vtype1304, _size1302);
+ uint32_t _i1306;
+ for (_i1306 = 0; _i1306 < _size1302; ++_i1306)
{
- std::string _key1265;
- xfer += iprot->readString(_key1265);
- Materialization& _val1266 = (*(this->success))[_key1265];
- xfer += _val1266.read(iprot);
+ std::string _key1307;
+ xfer += iprot->readString(_key1307);
+ Materialization& _val1308 = (*(this->success))[_key1307];
+ xfer += _val1308.read(iprot);
}
xfer += iprot->readMapEnd();
}
@@ -9692,14 +9692,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::read(::apache::th
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size1267;
- ::apache::thrift::protocol::TType _etype1270;
- xfer += iprot->readListBegin(_etype1270, _size1267);
- this->success.resize(_size1267);
- uint32_t _i1271;
- for (_i1271 = 0; _i1271 < _size1267; ++_i1271)
+ uint32_t _size1309;
+ ::apache::thrift::protocol::TType _etype1312;
+ xfer += iprot->readListBegin(_etype1312, _size1309);
+ this->success.resize(_size1309);
+ uint32_t _i1313;
+ for (_i1313 = 0; _i1313 < _size1309; ++_i1313)
{
- xfer += iprot->readString(this->success[_i1271]);
+ xfer += iprot->readString(this->success[_i1313]);
}
xfer += iprot->readListEnd();
}
@@ -9754,10 +9754,10 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::write(::apache::t
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
- std::vector<std::string> ::const_iterator _iter1272;
- for (_iter1272 = this->success.begin(); _iter1272 != this->success.end(); ++_iter1272)
+ std::vector<std::string> ::const_iterator _iter1314;
+ for (_iter1314 = this->success.begin(); _iter1314 != this->success.end(); ++_iter1314)
{
- xfer += oprot->writeString((*_iter1272));
+ xfer += oprot->writeString((*_iter1314));
}
xfer += oprot->writeListEnd();
}
@@ -9810,14 +9810,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_presult::read(::apache::t
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size1273;
- ::apache::thrift::protocol::TType _etype1276;
- xfer += iprot->readListBegin(_etype1276, _size1273);
- (*(this->success)).resize(_size1273);
- uint32_t _i1277;
- for (_i1277 = 0; _i1277 < _size1273; ++_i1277)
+ uint32_t _size1315;
+ ::apache::thrift::protocol::TType _etype1318;
+ xfer += iprot->readListBegin(_etype1318, _size1315);
+ (*(this->success)).resize(_size1315);
+ uint32_t _i1319;
+ for (_i1319 = 0; _i1319 < _size1315; ++_i1319)
{
- xfer += iprot->readString((*(this->success))[_i1277]);
+ xfer += iprot->readString((*(this->success))[_i1319]);
}
xfer += iprot->readListEnd();
}
@@ -11151,14 +11151,14 @@ uint32_t ThriftHiveMetastore_add_partitions_args::read(::apache::thrift::protoco
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->new_parts.clear();
- uint32_t _size1278;
- ::apache::thrift::protocol::TType _etype1281;
- xfer += iprot->readListBegin(_etype1281, _size1278);
- this->new_parts.resize(_size1278);
- uint32_t _i1282;
- for (_i1282 = 0; _i1282 < _size1278; ++_i1282)
+ uint32_t _size1320;
+ ::apache::thrift::protocol::TType _etype1323;
+ xfer += iprot->readListBegin(_etype1323, _size1320);
+ this->new_parts.resize(_size1320);
+ uint32_t _i1324;
+ for (_i1324 = 0; _i1324 < _size1320; ++_i1324)
{
- xfer += this->new_parts[_i1282].read(iprot);
+ xfer += this->new_parts[_i1324].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -11187,10 +11187,10 @@ uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protoc
xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->new_parts.size()));
- std::vector<Partition> ::const_iterator _iter1283;
- for (_iter1283 = this->new_parts.begin(); _iter1283 != this->new_parts.end(); ++_iter1283)
+ std::vector<Partition> ::const_iterator _iter1325;
+ for (_iter1325 = this->new_parts.begin(); _iter1325 != this->new_parts.end(); ++_iter1325)
{
- xfer += (*_iter1283).write(oprot);
+ xfer += (*_iter1325).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -11214,10 +11214,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::proto
xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->new_parts)).size()));
- std::vector<Partition> ::const_iterator _iter1284;
- for (_iter1284 = (*(this->new_parts)).begin(); _iter1284 != (*(this->new_parts)).end(); ++_iter1284)
+ std::vector<Partition> ::const_iterator _iter1326;
+ for (_iter1326 = (*(this->new_parts)).begin(); _iter1326 != (*(this->new_parts)).end(); ++_iter1326)
{
- xfer += (*_iter1284).write(oprot);
+ xfer += (*_iter1326).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -11426,14 +11426,14 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_args::read(::apache::thrift::p
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->new_parts.clear();
- uint32_t _size1285;
- ::apache::thrift::protocol::TType _etype1288;
- xfer += iprot->readListBegin(_etype1288, _size1285);
- this->new_parts.resize(_size1285);
- uint32_t _i1289;
- for (_i1289 = 0; _i1289 < _size1285; ++_i1289)
+ uint32_t _size1327;
+ ::apache::thrift::protocol::TType _etype1330;
+ xfer += iprot->readListBegin(_etype1330, _size1327);
+ this->new_parts.resize(_size1327);
+ uint32_t _i1331;
+ for (_i1331 = 0; _i1331 < _size1327; ++_i1331)
{
- xfer += this->new_parts[_i1289].read(iprot);
+ xfer += this->new_parts[_i1331].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -11462,10 +11462,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_args::write(::apache::thrift::
xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->new_parts.size()));
- std::vector<PartitionSpec> ::const_iterator _iter1290;
- for (_iter1290 = this->new_parts.begin(); _iter1290 != this->new_parts.end(); ++_iter1290)
+ std::vector<PartitionSpec> ::const_iterator _iter1332;
+ for (_iter1332 = this->new_parts.begin(); _iter1332 != this->new_parts.end(); ++_iter1332)
{
- xfer += (*_iter1290).write(oprot);
+ xfer += (*_iter1332).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -11489,10 +11489,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_pargs::write(::apache::thrift:
xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->new_parts)).size()));
- std::vector<PartitionSpec> ::const_iterator _iter1291;
- for (_iter1291 = (*(this->new_parts)).begin(); _iter1291 != (*(this->new_parts)).end(); ++_iter1291)
+ std::vector<PartitionSpec> ::const_iterator _iter1333;
+ for (_iter1333 = (*(this->new_parts)).begin(); _iter1333 != (*(this->new_parts)).end(); ++_iter1333)
{
- xfer += (*_iter1291).write(oprot);
+ xfer += (*_iter1333).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -11717,14 +11717,14 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(::apache::thrift::proto
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size1292;
- ::apache::thrift::protocol::TType _etype1295;
- xfer += iprot->readListBegin(_etype1295, _size1292);
- this->part_vals.resize(_size1292);
- uint32_t _i1296;
- for (_i1296 = 0; _i1296 < _size1292; ++_i1296)
+ uint32_t _size1334;
+ ::apache::thrift::protocol::TType _etype1337;
+ xfer += iprot->readListBegin(_etype1337, _size1334);
+ this->part_vals.resize(_size1334);
+ uint32_t _i1338;
+ for (_i1338 = 0; _i1338 < _size1334; ++_i1338)
{
- xfer += iprot->readString(this->part_vals[_i1296]);
+ xfer += iprot->readString(this->part_vals[_i1338]);
}
xfer += iprot->readListEnd();
}
@@ -11761,10 +11761,10 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::prot
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
- std::vector<std::string> ::const_iterator _iter1297;
- for (_iter1297 = this->part_vals.begin(); _iter1297 != this->part_vals.end(); ++_iter1297)
+ std::vector<std::string> ::const_iterator _iter1339;
+ for (_iter1339 = this->part_vals.begin(); _iter1339 != this->part_vals.end(); ++_iter1339)
{
- xfer += oprot->writeString((*_iter1297));
+ xfer += oprot->writeString((*_iter1339));
}
xfer += oprot->writeListEnd();
}
@@ -11796,10 +11796,10 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::pro
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
- std::vector<std::string> ::const_iterator _iter1298;
- for (_iter1298 = (*(this->part_vals)).begin(); _iter1298 != (*(this->part_vals)).end(); ++_iter1298)
+ std::vector<std::string> ::const_iterator _iter1340;
+ for (_iter1340 = (*(this->part_vals)).begin(); _iter1340 != (*(this->part_vals)).end(); ++_iter1340)
{
- xfer += oprot->writeString((*_iter1298));
+ xfer += oprot->writeString((*_iter1340));
}
xfer += oprot->writeListEnd();
}
@@ -12271,14 +12271,14 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::rea
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size1299;
- ::apache::thrift::protocol::TType _etype1302;
- xfer += iprot->readListBegin(_etype1302, _size1299);
- this->part_vals.resize(_size1299);
- uint32_t _i1303;
- for (_i1303 = 0; _i1303 < _size1299; ++_i1303)
+ uint32_t _size1341;
+ ::apache::thrift::protocol::TType _etype1344;
+ xfer += iprot->readListBegin(_etype1344, _size1341);
+ this->part_vals.resize(_size1341);
+ uint32_t _i1345;
+ for (_i1345 = 0; _i1345 < _size1341; ++_i1345)
{
- xfer += iprot->readString(this->part_vals[_i1303]);
+ xfer += iprot->readString(this->part_vals[_i1345]);
}
xfer += iprot->readListEnd();
}
@@ -12323,10 +12323,10 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::wri
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
- std::vector<std::string> ::const_iterator _iter1304;
- for (_iter1304 = this->part_vals.begin(); _iter1304 != this->part_vals.end(); ++_iter1304)
+ std::vector<std::string> ::const_iterator _iter1346;
+ for (_iter1346 = this->part_vals.begin(); _iter1346 != this->part_vals.end(); ++_iter1346)
{
- xfer += oprot->writeString((*_iter1304));
+ xfer += oprot->writeString((*_iter1346));
}
xfer += oprot->writeListEnd();
}
@@ -12362,10 +12362,10 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_pargs::wr
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
- std::vector<std::string> ::const_iterator _iter1305;
- for (_iter1305 = (*(this->part_vals)).begin(); _iter1305 != (*(this->part_vals)).end(); ++_iter1305)
+ std::vector<std::string> ::const_iterator _iter1347;
+ for (_iter1347 = (*(this->part_vals)).begin(); _iter1347 != (*(this->part_vals)).end(); ++_iter1347)
{
- xfer += oprot->writeString((*_iter1305));
+ xfer += oprot->writeString((*_iter1347));
}
xfer += oprot->writeListEnd();
}
@@ -13168,14 +13168,14 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(::apache::thrift::protoco
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size1306;
- ::apache::thrift::protocol::TType _etype1309;
- xfer += iprot->readListBegin(_etype1309, _size1306);
- this->part_vals.resize(_size1306);
- uint32_t _i1310;
- for (_i1310 = 0; _i1310 < _size1306; ++_i1310)
+ uint32_t _size1348;
+ ::apache::thrift::protocol::TType _etype1351;
+ xfer += iprot->readListBegin(_etype1351, _size1348);
+ this->part_vals.resize(_size1348);
+ uint32_t _i1352;
+ for (_i1352 = 0; _i1352 < _size1348; ++_i1352)
{
- xfer += iprot->readString(this->part_vals[_i1310]);
+ xfer += iprot->readString(this->part_vals[_i1352]);
}
xfer += iprot->readListEnd();
}
@@ -13220,10 +13220,10 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protoc
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
- std::vector<std::string> ::const_iterator _iter1311;
- for (_iter1311 = this->part_vals.begin(); _iter1311 != this->part_vals.end(); ++_iter1311)
+ std::vector<std::string> ::const_iterator _iter1353;
+ for (_iter1353 = this->part_vals.begin(); _iter1353 != this->part_vals.end(); ++_iter1353)
{
- xfer += oprot->writeString((*_iter1311));
+ xfer += oprot->writeString((*_iter1353));
}
xfer += oprot->writeListEnd();
}
@@ -13259,10 +13259,10 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::proto
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
- std::vector<std::string> ::const_iterator _iter1312;
- for (_iter1312 = (*(this->part_vals)).begin(); _iter1312 != (*(this->part_vals)).end(); ++_iter1312)
+ std::vector<std::string> ::const_iterator _iter1354;
+ for (_iter1354 = (*(this->part_vals)).begin(); _iter1354 != (*(this->part_vals)).end(); ++_iter1354)
{
- xfer += oprot->writeString((*_iter1312));
+ xfer += oprot->writeString((*_iter1354));
}
xfer += oprot->writeListEnd();
}
@@ -13471,14 +13471,14 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::read(
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size1313;
- ::apache::thrift::protocol::TType _etype1316;
- xfer += iprot->readListBegin(_etype1316, _size1313);
- this->part_vals.resize(_size1313);
- uint32_t _i1317;
- for (_i1317 = 0; _i1317 < _size1313; ++_i1317)
+ uint32_t _size1355;
+ ::apache::thrift::protocol::TType _etype1358;
+ xfer += iprot->readListBegin(_etype1358, _size1355);
+ this->part_vals.resize(_size1355);
+ uint32_t _i1359;
+ for (_i1359 = 0; _i1359 < _size1355; ++_i1359)
{
- xfer += iprot->readString(this->part_vals[_i1317]);
+ xfer += iprot->readString(this->part_vals[_i1359]);
}
xfer += iprot->readListEnd();
}
@@ -13531,10 +13531,10 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::write
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
- std::vector<std::string> ::const_iterator _iter1318;
- for (_iter1318 = this->part_vals.begin(); _iter1318 != this->part_vals.end(); ++_iter1318)
+ std::vector<std::string> ::const_iterator _iter1360;
+ for (_iter1360 = this->part_vals.begin(); _iter1360 != this->part_vals.end(); ++_iter1360)
{
- xfer += oprot->writeString((*_iter1318));
+ xfer += oprot->writeString((*_iter1360));
}
xfer += oprot->writeListEnd();
}
@@ -13574,10 +13574,10 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_pargs::writ
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
- std::vector<std::string> ::const_iterator _iter1319;
- for (_iter1319 = (*(this->part_vals)).begin(); _iter1319 != (*(this->part_vals)).end(); ++_iter1319)
+ std::vector<std::string> ::const_iterator _iter1361;
+ for (_iter1361 = (*(this->part_vals)).begin(); _iter1361 != (*(this->part_vals)).end(); ++_iter1361)
{
- xfer += oprot->writeString((*_iter1319));
+ xfer += oprot->writeString((*_iter1361));
}
xfer += oprot->writeListEnd();
}
@@ -14583,14 +14583,14 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(::apache::thrift::protocol
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size1320;
- ::apache::thrift::protocol::TType _etype1323;
- xfer += iprot->readListBegin(_etype1323, _size1320);
- this->part_vals.resize(_size1320);
- uint32_t _i1324;
- for (_i1324 = 0; _i1324 < _size1320; ++_i1324)
+ uint32_t _size1362;
+ ::apache::thrift::protocol::TType _etype1365;
+ xfer += iprot->readListBegin(_etype1365, _size1362);
+ this->part_vals.resize(_size1362);
+ uint32_t _i1366;
+ for (_i1366 = 0; _i1366 < _size1362; ++_i1366)
{
- xfer += iprot->readString(this->part_vals[_i1324]);
+ xfer += iprot->readString(this->part_vals[_i1366]);
}
xfer += iprot->readListEnd();
}
@@ -14627,10 +14627,10 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protoco
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
- std::vector<std::string> ::const_iterator _iter1325;
- for (_iter1325 = this->part_vals.begin(); _iter1325 != this->part_vals.end(); ++_iter1325)
+ std::vector<std::string> ::const_iterator _iter1367;
+ for (_iter1367 = this->part_vals.begin(); _iter1367 != this->part_vals.end(); ++_iter1367)
{
- xfer += oprot->writeString((*_iter1325));
+ xfer += oprot->writeString((*_iter1367));
}
xfer += oprot->writeListEnd();
}
@@ -14662,10 +14662,10 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protoc
xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
- std::vector<std::string> ::const_iterator _iter1326;
- for (_iter1326 = (*(this->part_vals)).begin(); _iter1326 != (*(this->part_vals)).end(); ++_iter1326)
+ std::vector<std::string> ::const_iterator _iter1368;
+ for (_iter1368 = (*(this->part_vals)).begin(); _iter1368 != (*(this->part_vals)).end(); ++_iter1368)
{
- xfer += oprot->writeString((*_iter1326));
+ xfer += oprot->writeString((*_iter1368));
}
xfer += oprot->writeListEnd();
}
@@ -14854,17 +14854,17 @@ uint32_t ThriftHiveMetastore_exchange_partition_args::read(::apache::thrift::pro
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->partitionSpecs.clear();
- uint32_t _size1327;
- ::apache::thrift::protocol::TType _ktype1328;
- ::apache::thrift::protocol::TType _vtype1329;
- xfer += iprot->readMapBegin(_ktype1328, _vtype1329, _size1327);
- uint32_t _i1331;
- for (_i1331 = 0; _i1331 < _size1327; ++_i1331)
+ uint32_t _size1369;
+ ::apache::thrift::protocol::TType _ktype1370;
+ ::apache::thrift::protocol::TType _vtype1371;
+ xfer += iprot->readMapBegin(_ktype1370, _vtype1371, _size1369);
+ uint32_t _i1373;
+ for (_i1373 = 0; _i1373 < _size1369; ++_i1373)
{
- std::string _key1332;
- xfer += iprot->readString(_key1332);
- std::string& _val1333 = this->partitionSpecs[_key1332];
- xfer += iprot->readString(_val1333);
+ std::string _key1374;
+ xfer += iprot->readString(_key1374);
+ std::string& _val1375 = this->partitionSpecs[_key1374];
+ xfer += iprot->readString(_val1375);
}
xfer += iprot->readMapEnd();
}
@@ -14925,11 +14925,11 @@ uint32_t ThriftHiveMetastore_exchange_partition_args::write(::apache::thrift::pr
xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionSpecs.size()));
- std::map<std::string, std::string> ::const_iterator _iter1334;
- for (_iter1334 = this->partitionSpecs.begin(); _iter1334 != this->partitionSpecs.end(); ++_iter1334)
+ std::map<std::string, std::string> ::const_iterator _iter1376;
+ for (_iter1376 = this->partitionSpecs.begin(); _iter1376 != this->partitionSpecs.end(); ++_iter1376)
{
- xfer += oprot->writeString(_iter1334->first);
- xfer += oprot->writeString(_iter1334->second);
+ xfer += oprot->writeString(_iter1376->first);
+ xfer += oprot->writeString(_iter1376->second);
}
xfer += oprot->writeMapEnd();
}
@@ -14969,11 +14969,11 @@ uint32_t ThriftHiveMetastore_exchange_partition_pargs::write(::apache::thrift::p
xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->partitionSpecs)).size()));
- std::map<std::string, std::string> ::const_iterator _iter1335;
- for (_iter1335 = (*(this->partitionSpecs)).begin(); _iter1335 != (*(this->partitionSpecs)).end(); ++_iter1335)
+ std::map<std::string, std::string> ::const_iterator _iter1377;
+ for (_iter1377 = (*(this->partitionSpecs)).begin(); _iter1377 != (*(this->partitionSpecs)).end(); ++_iter1377)
{
- xfer += oprot->writeString(_iter1335->first);
- xfer += oprot->writeString(_iter1335->second);
+ xfer += oprot->writeString(_iter1377->first);
+ xfer += oprot->writeString(_iter1377->second);
}
xfer += oprot->writeMapEnd();
}
@@ -15218,17 +15218,17 @@ uint32_t ThriftHiveMetastore_exchange_partitions_args::read(::apache::thrift::pr
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->partitionSpecs.clear();
- uint32_t _size1336;
- ::apache::thrift::protocol::TType _ktype1337;
- ::apache::thrift::protocol::TType _vtype1338;
- xfer += iprot->readMapBegin(_ktype1337, _vtype1338, _size1336);
- uint32_t _i1340;
- for (_i1340 = 0; _i1340 < _size1336; ++_i1340)
+ uint32_t _size1378;
+ ::apache::thrift::protocol::TType _ktype1379;
+ ::apache::thrift::protocol::TType _vtype1380;
+ xfer += iprot->readMapBegin(_ktype1379, _vtype1380, _size1378);
+ uint32_t _i1382;
+ for (_i1382 = 0; _i1382 < _size1378; ++_i1382)
{
- std::string _key1341;
- xfer += iprot->readString(_key1341);
- std::string& _val1342 = this->partitionSpecs[_key1341];
- xfer += iprot->readString(_val1342);
+ std::string _key1383;
+ xfer += iprot->readString(_key1383);
+ std::string& _val1384 = this->partitionSpecs[_key1383];
+ xfer += iprot->readString(_val1384);
}
xfer += iprot->readMapEnd();
}
@@ -15289,11 +15289,11 @@ uint32_t ThriftHiveMetastore_exchange_partitions_args::write(::apache::thrift::p
xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionSpecs.size()));
- std::map<std::string, std::string> ::const_iterator _iter1343;
- for (_iter1343 = this->partitionSpecs.begin(); _iter1343 != this->partitionSpecs.end(); ++_iter1343)
+ std::map<std::string, std::string> ::const_iterator _iter1385;
+ for (_iter1385 = this->partitionSpecs.begin(); _iter1385 != this->partitionSpecs.end(); ++_iter1385)
{
- xfer += oprot->writeString(_iter1343->fir
<TRUNCATED>
[15/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedOrcAcidRowBatchReader.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedOrcAcidRowBatchReader.java b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedOrcAcidRowBatchReader.java
index 68cde2d..709f021 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedOrcAcidRowBatchReader.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedOrcAcidRowBatchReader.java
@@ -26,7 +26,7 @@ import java.util.List;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
@@ -117,8 +117,8 @@ public class TestVectorizedOrcAcidRowBatchReader {
.filesystem(fs)
.bucket(bucket)
.writingBase(false)
- .minimumTransactionId(1)
- .maximumTransactionId(NUM_OTID)
+ .minimumWriteId(1)
+ .maximumWriteId(NUM_OTID)
.inspector(inspector)
.reporter(Reporter.NULL)
.recordIdColumn(1)
@@ -141,7 +141,7 @@ public class TestVectorizedOrcAcidRowBatchReader {
// Create a delete delta that has rowIds divisible by 2 but not by 3. This will produce
// a delete delta file with 50,000 delete events.
long currTxnId = NUM_OTID + 1;
- options.minimumTransactionId(currTxnId).maximumTransactionId(currTxnId);
+ options.minimumWriteId(currTxnId).maximumWriteId(currTxnId);
updater = new OrcRecordUpdater(root, options);
for (long i = 1; i <= NUM_OTID; ++i) {
for (long j = 0; j < NUM_ROWID_PER_OTID; j += 1) {
@@ -154,7 +154,7 @@ public class TestVectorizedOrcAcidRowBatchReader {
// Now, create a delete delta that has rowIds divisible by 3 but not by 2. This will produce
// a delete delta file with 25,000 delete events.
currTxnId = NUM_OTID + 2;
- options.minimumTransactionId(currTxnId).maximumTransactionId(currTxnId);
+ options.minimumWriteId(currTxnId).maximumWriteId(currTxnId);
updater = new OrcRecordUpdater(root, options);
for (long i = 1; i <= NUM_OTID; ++i) {
for (long j = 0; j < NUM_ROWID_PER_OTID; j += 1) {
@@ -167,7 +167,7 @@ public class TestVectorizedOrcAcidRowBatchReader {
// Now, create a delete delta that has rowIds divisible by both 3 and 2. This will produce
// a delete delta file with 25,000 delete events.
currTxnId = NUM_OTID + 3;
- options.minimumTransactionId(currTxnId).maximumTransactionId(currTxnId);
+ options.minimumWriteId(currTxnId).maximumWriteId(currTxnId);
updater = new OrcRecordUpdater(root, options);
for (long i = 1; i <= NUM_OTID; ++i) {
for (long j = 0; j < NUM_ROWID_PER_OTID; j += 1) {
@@ -216,7 +216,7 @@ public class TestVectorizedOrcAcidRowBatchReader {
List<OrcSplit> splits = getSplits();
// Mark one of the transactions as an exception to test that invalid transactions
// are being handled properly.
- conf.set(ValidTxnList.VALID_TXNS_KEY, "14:1:1:5"); // Exclude transaction 5
+ conf.set(ValidWriteIdList.VALID_WRITEIDS_KEY, "tbl:14:1:1:5"); // Exclude transaction 5
VectorizedOrcAcidRowBatchReader vectorizedReader = new VectorizedOrcAcidRowBatchReader(splits.get(0), conf, Reporter.NULL, new VectorizedRowBatchCtx());
if (deleteEventRegistry.equals(ColumnizedDeleteEventRegistry.class.getName())) {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java b/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
index 7650917..d411a8b 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
@@ -21,7 +21,14 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.hive.common.JavaUtils;
import org.apache.hadoop.hive.metastore.MetastoreTaskThread;
import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsRequest;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsResponse;
import org.apache.hadoop.hive.metastore.api.DataOperationType;
+import org.apache.hadoop.hive.metastore.api.LockState;
+import org.apache.hadoop.hive.metastore.api.LockType;
+import org.apache.hadoop.hive.metastore.api.ShowLocksRequest;
+import org.apache.hadoop.hive.metastore.api.ShowLocksResponse;
+import org.apache.hadoop.hive.metastore.api.ShowLocksResponseElement;
import org.apache.hadoop.hive.metastore.txn.AcidWriteSetService;
import org.apache.hadoop.hive.metastore.txn.TxnStore;
import org.apache.hadoop.hive.metastore.txn.TxnUtils;
@@ -29,11 +36,6 @@ import org.junit.After;
import org.junit.Assert;
import org.apache.hadoop.hive.common.FileUtils;
import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.metastore.api.LockState;
-import org.apache.hadoop.hive.metastore.api.LockType;
-import org.apache.hadoop.hive.metastore.api.ShowLocksRequest;
-import org.apache.hadoop.hive.metastore.api.ShowLocksResponse;
-import org.apache.hadoop.hive.metastore.api.ShowLocksResponseElement;
import org.apache.hadoop.hive.metastore.txn.TxnDbUtil;
import org.apache.hadoop.hive.ql.Context;
import org.apache.hadoop.hive.ql.Driver;
@@ -965,13 +967,16 @@ public class TestDbTxnManager2 {
Assert.assertEquals("Unexpected lock count", 2, locks.size());
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB_PART", "p=blah", locks);
checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB_PART", "p=blah", locks);
- AddDynamicPartitions adp = new AddDynamicPartitions(txnId, "default", "TAB_PART",
+ long writeId = txnMgr.getTableWriteId("default", "TAB_PART");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnId, writeId, "default", "TAB_PART",
Collections.singletonList("p=blah"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
txnMgr.commitTxn();
adp.setTxnid(txnId2);
+ writeId = txnMgr2.getTableWriteId("default", "TAB_PART");
+ adp.setWriteid(writeId);
txnHandler.addDynamicPartitions(adp);
LockException expectedException = null;
try {
@@ -1022,7 +1027,13 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", null, locks);
//update stmt has p=blah, thus nothing is actually update and we generate empty dyn part list
Assert.assertEquals(0, TxnDbUtil.countQueryAgent(conf, "select count(*) from WRITE_SET"));
- AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
+
+ AllocateTableWriteIdsResponse writeIds
+ = txnHandler.allocateTableWriteIds(new AllocateTableWriteIdsRequest(Collections.singletonList(txnMgr2.getCurrentTxnId()),
+ "default", "tab2"));
+ Assert.assertEquals(txnMgr2.getCurrentTxnId(), writeIds.getTxnToWriteIds().get(0).getTxnId());
+
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), writeIds.getTxnToWriteIds().get(0).getWriteId(),
"default", "tab2", Collections.EMPTY_LIST);
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1039,7 +1050,12 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", null, locks);//since TAB2 is empty
//update stmt has p=blah, thus nothing is actually update and we generate empty dyn part list
Assert.assertEquals(0, TxnDbUtil.countQueryAgent(conf, "select count(*) from WRITE_SET"));
- adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
+
+ writeIds = txnHandler.allocateTableWriteIds(new AllocateTableWriteIdsRequest(Collections.singletonList(txnMgr2.getCurrentTxnId()),
+ "default", "tab2"));
+ Assert.assertEquals(txnMgr2.getCurrentTxnId(), writeIds.getTxnToWriteIds().get(0).getTxnId());
+
+ adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), writeIds.getTxnToWriteIds().get(0).getWriteId(),
"default", "tab2", Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);//simulate partition update
@@ -1054,8 +1070,13 @@ public class TestDbTxnManager2 {
Assert.assertEquals(1, TxnDbUtil.countQueryAgent(conf, "select count(*) from WRITE_SET"));
checkCmdOnDriver(driver.compileAndRespond("update TAB2 set b = 17 where a = 1"));//no rows match
txnMgr.acquireLocks(driver.getPlan(), ctx, "Long Running");
+
+ writeIds = txnHandler.allocateTableWriteIds(new AllocateTableWriteIdsRequest(Collections.singletonList(txnMgr.getCurrentTxnId()),
+ "default", "tab2"));
+ Assert.assertEquals(txnMgr.getCurrentTxnId(), writeIds.getTxnToWriteIds().get(0).getTxnId());
+
//so generate empty Dyn Part call
- adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(),
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), writeIds.getTxnToWriteIds().get(0).getWriteId(),
"default", "tab2", Collections.EMPTY_LIST);
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1095,7 +1116,12 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB_PART", "p=blah", locks);
txnMgr.rollbackTxn();
- AddDynamicPartitions adp = new AddDynamicPartitions(txnId, "default", "TAB_PART",
+ AllocateTableWriteIdsResponse writeIds
+ = txnHandler.allocateTableWriteIds(new AllocateTableWriteIdsRequest(Collections.singletonList(txnId), "default", "TAB_PART"));
+ Assert.assertEquals(txnId, writeIds.getTxnToWriteIds().get(0).getTxnId());
+
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnId, writeIds.getTxnToWriteIds().get(0).getWriteId(),
+ "default", "TAB_PART",
Arrays.asList("p=blah"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1172,8 +1198,9 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", "p=one", locks);
//this simulates the completion of txnid:2
//this simulates the completion of txnid:idTxnUpdate1
- AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab2",
- Collections.singletonList("p=two"));
+ long writeId = txnMgr2.getTableWriteId("default", "tab2");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), writeId, "default", "tab2",
+ Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
txnMgr2.commitTxn();//txnid:idTxnUpdate1
@@ -1181,7 +1208,8 @@ public class TestDbTxnManager2 {
Assert.assertEquals("Unexpected lock count", 1, locks.size());
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", "p=one", locks);
//completion of txnid:idTxnUpdate2
- adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab2",
+ writeId = txnMgr.getTableWriteId("default", "tab2");
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), writeId, "default", "tab2",
Collections.singletonList("p=one"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1224,7 +1252,8 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=one", locks);
//this simulates the completion of txnid:idTxnUpdate3
- adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ writeId = txnMgr2.getTableWriteId("default", "tab1");
+ adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=one"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1236,7 +1265,8 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks);
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=one", locks);
//completion of txnid:idTxnUpdate4
- adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ writeId = txnMgr.getTableWriteId("default", "tab1");
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1282,7 +1312,8 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks);
//this simulates the completion of txnid:idTxnUpdate1
- AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ long writeId = txnMgr2.getTableWriteId("default", "tab1");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=one"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1293,7 +1324,8 @@ public class TestDbTxnManager2 {
Assert.assertEquals("Unexpected lock count", 1, locks.size());
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks);
//completion of txnid:idTxnUpdate2
- adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ writeId = txnMgr.getTableWriteId("default", "tab1");
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1338,7 +1370,8 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks);
//this simulates the completion of txnid:idTxnUpdate1
- AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ long writeId = txnMgr2.getTableWriteId("default", "tab1");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=one"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1349,7 +1382,8 @@ public class TestDbTxnManager2 {
Assert.assertEquals("Unexpected lock count", 1, locks.size());
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks);
//completion of txnid:idTxnUpdate2
- adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ writeId = txnMgr.getTableWriteId("default", "tab1");
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.DELETE);
txnHandler.addDynamicPartitions(adp);
@@ -1398,7 +1432,8 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks);
//this simulates the completion of "Update tab2" txn
- AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ long writeId = txnMgr2.getTableWriteId("default", "tab1");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -1409,7 +1444,8 @@ public class TestDbTxnManager2 {
Assert.assertEquals("Unexpected lock count", 1, locks.size());
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks);
//completion of "delete from tab1" txn
- adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ writeId = txnMgr.getTableWriteId("default", "tab1");
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.DELETE);
txnHandler.addDynamicPartitions(adp);
@@ -1467,7 +1503,8 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks);
//this simulates the completion of "delete from tab1" txn
- AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ long writeId = txnMgr2.getTableWriteId("default", "tab1");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.DELETE);
txnHandler.addDynamicPartitions(adp);
@@ -1480,7 +1517,8 @@ public class TestDbTxnManager2 {
checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", "p=one", locks);
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks);
//completion of txnid:txnIdSelect
- adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ writeId = txnMgr.getTableWriteId("default", "tab1");
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), writeId, "default", "tab1",
Collections.singletonList("p=two"));
adp.setOperationType(DataOperationType.DELETE);
txnHandler.addDynamicPartitions(adp);
@@ -1653,15 +1691,16 @@ public class TestDbTxnManager2 {
0,
TxnDbUtil.countQueryAgent(conf, "select count(*) from TXN_COMPONENTS where tc_txnid=" + txnId1));
//complete 1st txn
- AddDynamicPartitions adp = new AddDynamicPartitions(txnId1, "default", "target",
+ long writeId = txnMgr.getTableWriteId("default", "target");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnId1, writeId, "default", "target",
Collections.singletonList("p=1/q=3"));//update clause
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
- adp = new AddDynamicPartitions(txnId1, "default", "target",
+ adp = new AddDynamicPartitions(txnId1, writeId, "default", "target",
Arrays.asList("p=1/q=2","p=2/q=2"));//delete clause
adp.setOperationType(DataOperationType.DELETE);
txnHandler.addDynamicPartitions(adp);
- adp = new AddDynamicPartitions(txnId1, "default", "target",
+ adp = new AddDynamicPartitions(txnId1, writeId, "default", "target",
Arrays.asList("p=1/q=2","p=1/q=3","p=1/q=1"));//insert clause
adp.setOperationType(DataOperationType.INSERT);
txnHandler.addDynamicPartitions(adp);
@@ -1718,15 +1757,16 @@ public class TestDbTxnManager2 {
0,
TxnDbUtil.countQueryAgent(conf, "select count(*) from TXN_COMPONENTS where tc_txnid=" + txnId2));
//complete 2nd txn
- adp = new AddDynamicPartitions(txnId2, "default", "target",
+ writeId = txnMgr2.getTableWriteId("default", "target");
+ adp = new AddDynamicPartitions(txnId2, writeId, "default", "target",
Collections.singletonList(cc ? "p=1/q=3" : "p=1/p=2"));//update clause
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
- adp = new AddDynamicPartitions(txnId2, "default", "target",
+ adp = new AddDynamicPartitions(txnId2, writeId, "default", "target",
Arrays.asList("p=1/q=2","p=2/q=2"));//delete clause
adp.setOperationType(DataOperationType.DELETE);
txnHandler.addDynamicPartitions(adp);
- adp = new AddDynamicPartitions(txnId2, "default", "target",
+ adp = new AddDynamicPartitions(txnId2, writeId, "default", "target",
Arrays.asList("p=1/q=2","p=1/q=3","p=1/q=1"));//insert clause
adp.setOperationType(DataOperationType.INSERT);
txnHandler.addDynamicPartitions(adp);
@@ -1965,7 +2005,8 @@ public class TestDbTxnManager2 {
//Plan is using DummyPartition, so can only lock the table... unfortunately
checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "target", null, locks);
checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "_dummy_database", "_dummy_table", null, locks);
- AddDynamicPartitions adp = new AddDynamicPartitions(txnid2, "default", "target", Arrays.asList("p=1/q=2","p=1/q=2"));
+ long writeId = txnMgr.getTableWriteId("default", "target");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnid2, writeId, "default", "target", Arrays.asList("p=1/q=2","p=1/q=2"));
adp.setOperationType(DataOperationType.INSERT);
txnHandler.addDynamicPartitions(adp);
Assert.assertEquals(
@@ -2038,7 +2079,8 @@ public class TestDbTxnManager2 {
0,//because it's using a DP write
TxnDbUtil.countQueryAgent(conf, "select count(*) from TXN_COMPONENTS where tc_txnid=" + txnId1));
//complete T1 transaction (simulate writing to 2 partitions)
- AddDynamicPartitions adp = new AddDynamicPartitions(txnId1, "default", "target",
+ long writeId = txnMgr.getTableWriteId("default", "target");
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnId1, writeId, "default", "target",
Arrays.asList("p=1/q=2","p=1/q=3"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
@@ -2074,7 +2116,8 @@ public class TestDbTxnManager2 {
TxnDbUtil.countQueryAgent(conf, "select count(*) from TXN_COMPONENTS where tc_txnid=" + txnid2));
//complete T2 txn
//simulate Insert into 2 partitions
- adp = new AddDynamicPartitions(txnid2, "default", "target",
+ writeId = txnMgr2.getTableWriteId("default", "target");
+ adp = new AddDynamicPartitions(txnid2, writeId, "default", "target",
Arrays.asList("p=1/q=2","p=1/q=3"));
adp.setOperationType(DataOperationType.INSERT);
txnHandler.addDynamicPartitions(adp);
@@ -2085,7 +2128,7 @@ public class TestDbTxnManager2 {
TxnDbUtil.countQueryAgent(conf, "select count(*) from TXN_COMPONENTS where tc_txnid=" + txnid2 + " and tc_operation_type='i'"));
//simulate Update of 1 partitions; depending on causeConflict, choose one of the partitions
//which was modified by the T1 update stmt or choose a non-conflicting one
- adp = new AddDynamicPartitions(txnid2, "default", "target",
+ adp = new AddDynamicPartitions(txnid2, writeId, "default", "target",
Collections.singletonList(causeConflict ? "p=1/q=2" : "p=1/q=1"));
adp.setOperationType(DataOperationType.UPDATE);
txnHandler.addDynamicPartitions(adp);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java b/ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java
index 3c007a7..a40ad24 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java
@@ -164,7 +164,7 @@ public class TestGenMapRedUtilsCreateConditionalTask {
TableDesc tableDesc = new TableDesc();
reset(mockWork);
when(mockWork.getLoadTableWork()).thenReturn(new LoadTableDesc(
- condOutputPath, tableDesc, null, null));
+ condOutputPath, tableDesc, null));
newWork = GenMapRedUtils.mergeMovePaths(condInputPath, mockWork, lineageState);
assertNotNull(newWork);
assertNotEquals(newWork, mockWork);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java b/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java
index 1140391..ffd0445 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java
@@ -262,6 +262,7 @@ public class TestUpdateDeleteSemanticAnalyzer {
BaseSemanticAnalyzer sem = SemanticAnalyzerFactory.get(queryState, tree);
SessionState.get().initTxnMgr(conf);
+ SessionState.get().getTxnMgr().openTxn(ctx, conf.getUser());
db = sem.getDb();
// I have to create the tables here (rather than in setup()) because I need the Hive
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java
index c337fd5..7ea017a 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java
@@ -24,11 +24,15 @@ import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
import org.apache.hadoop.hive.metastore.IMetaStoreClient;
+import org.apache.hadoop.hive.metastore.TableType;
+import org.apache.hadoop.hive.metastore.TransactionalValidationListener;
import org.apache.hadoop.hive.metastore.api.AbortTxnRequest;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsRequest;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsResponse;
import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.MetaException;
@@ -41,6 +45,7 @@ import org.apache.hadoop.hive.metastore.api.SerDeInfo;
import org.apache.hadoop.hive.metastore.api.StorageDescriptor;
import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.hive.metastore.api.TxnAbortedException;
+import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
import org.apache.hadoop.hive.metastore.txn.TxnDbUtil;
import org.apache.hadoop.hive.metastore.txn.TxnStore;
import org.apache.hadoop.hive.metastore.txn.TxnUtils;
@@ -69,6 +74,7 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -140,6 +146,7 @@ public abstract class CompactorTest {
boolean isTemporary)
throws TException {
Table table = new Table();
+ table.setTableType(TableType.MANAGED_TABLE.name());
table.setTableName(tableName);
table.setDbName(dbName);
table.setOwner("me");
@@ -150,6 +157,16 @@ public abstract class CompactorTest {
table.setPartitionKeys(partKeys);
}
+ // Set the table as transactional for compaction to work
+ if (parameters == null) {
+ parameters = new HashMap<>();
+ }
+ parameters.put(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL, "true");
+ if (sortCols != null) {
+ // Sort columns are not allowed for full ACID table. So, change it to insert-only table
+ parameters.put(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES,
+ TransactionalValidationListener.INSERTONLY_TRANSACTIONAL_PROPERTY);
+ }
table.setParameters(parameters);
if (isTemporary) table.setTemporary(true);
@@ -181,6 +198,14 @@ public abstract class CompactorTest {
return txns.get(0);
}
+ protected long allocateWriteId(String dbName, String tblName, long txnid)
+ throws MetaException, TxnAbortedException, NoSuchTxnException {
+ AllocateTableWriteIdsRequest awiRqst
+ = new AllocateTableWriteIdsRequest(Collections.singletonList(txnid), dbName, tblName);
+ AllocateTableWriteIdsResponse awiResp = txnHandler.allocateTableWriteIds(awiRqst);
+ return awiResp.getTxnToWriteIds().get(0).getWriteId();
+ }
+
protected void addDeltaFile(Table t, Partition p, long minTxn, long maxTxn, int numRecords)
throws Exception {
addFile(t, p, minTxn, maxTxn, numRecords, FileType.DELTA, 2, true);
@@ -220,15 +245,19 @@ public abstract class CompactorTest {
return paths;
}
- protected void burnThroughTransactions(int num)
+ protected void burnThroughTransactions(String dbName, String tblName, int num)
throws MetaException, NoSuchTxnException, TxnAbortedException {
- burnThroughTransactions(num, null, null);
+ burnThroughTransactions(dbName, tblName, num, null, null);
}
- protected void burnThroughTransactions(int num, Set<Long> open, Set<Long> aborted)
+ protected void burnThroughTransactions(String dbName, String tblName, int num, Set<Long> open, Set<Long> aborted)
throws MetaException, NoSuchTxnException, TxnAbortedException {
OpenTxnsResponse rsp = txnHandler.openTxns(new OpenTxnRequest(num, "me", "localhost"));
+ AllocateTableWriteIdsRequest awiRqst = new AllocateTableWriteIdsRequest(rsp.getTxn_ids(), dbName, tblName);
+ AllocateTableWriteIdsResponse awiResp = txnHandler.allocateTableWriteIds(awiRqst);
+ int i = 0;
for (long tid : rsp.getTxn_ids()) {
+ assert(awiResp.getTxnToWriteIds().get(i++).getTxnId() == tid);
if (aborted != null && aborted.contains(tid)) {
txnHandler.abortTxn(new AbortTxnRequest(tid));
} else if (open == null || (open != null && !open.contains(tid))) {
@@ -350,7 +379,7 @@ public abstract class CompactorTest {
@Override
public RawReader<Text> getRawReader(Configuration conf, boolean collapseEvents, int bucket,
- ValidTxnList validTxnList,
+ ValidWriteIdList validWriteIdList,
Path baseDirectory, Path... deltaDirectory) throws IOException {
List<Path> filesToRead = new ArrayList<Path>();
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
index db8e46c..3ca073c 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
@@ -76,7 +76,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, null, 23L, 24L, 2);
addBaseFile(t, null, 25L, 25);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "camtc", 25);
CompactionRequest rqst = new CompactionRequest("default", "camtc", CompactionType.MAJOR);
txnHandler.compact(rqst);
@@ -107,7 +107,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, p, 23L, 24L, 2);
addBaseFile(t, p, 25L, 25);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "campc", 25);
CompactionRequest rqst = new CompactionRequest("default", "campc", CompactionType.MAJOR);
rqst.setPartitionname("ds=today");
@@ -138,7 +138,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, null, 23L, 24L, 2);
addDeltaFile(t, null, 21L, 24L, 4);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "camitc", 25);
CompactionRequest rqst = new CompactionRequest("default", "camitc", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -176,7 +176,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, p, 23L, 24L, 2);
addDeltaFile(t, p, 21L, 24L, 4);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "camipc", 25);
CompactionRequest rqst = new CompactionRequest("default", "camipc", CompactionType.MINOR);
rqst.setPartitionname("ds=today");
@@ -214,7 +214,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, null, 23L, 24L, 2);
addDeltaFile(t, null, 21L, 24L, 4);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "bblt", 25);
CompactionRequest rqst = new CompactionRequest("default", "bblt", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -251,7 +251,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, p, 23L, 24L, 2);
addDeltaFile(t, p, 21L, 24L, 4);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "bblp", 25);
CompactionRequest rqst = new CompactionRequest("default", "bblp", CompactionType.MINOR);
rqst.setPartitionname("ds=today");
@@ -296,7 +296,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, null, 23L, 24L, 2);
addDeltaFile(t, null, 21L, 24L, 4);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "bblt", 25);
CompactionRequest rqst = new CompactionRequest("default", "bblt", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -368,7 +368,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, p, 23L, 24L, 2);
addDeltaFile(t, p, 21L, 24L, 4);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "bblt", 25);
CompactionRequest rqst = new CompactionRequest("default", "bblt", CompactionType.MINOR);
rqst.setPartitionname("ds=today");
@@ -439,7 +439,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, p, 23L, 24L, 2);
addBaseFile(t, p, 25L, 25);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "campcnb", 25);
CompactionRequest rqst = new CompactionRequest("default", "campcnb", CompactionType.MAJOR);
rqst.setPartitionname("ds=today");
@@ -469,7 +469,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, null, 23L, 24L, 2);
addBaseFile(t, null, 25L, 25);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "dt", 25);
CompactionRequest rqst = new CompactionRequest("default", "dt", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -477,14 +477,14 @@ public class TestCleaner extends CompactorTest {
txnHandler.markCompacted(ci);
txnHandler.setRunAs(ci.id, System.getProperty("user.name"));
+ // Drop table will clean the table entry from the compaction queue and hence cleaner have no effect
ms.dropTable("default", "dt");
startCleaner();
// Check there are no compactions requests left.
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
- Assert.assertEquals(1, rsp.getCompactsSize());
- Assert.assertTrue(TxnStore.SUCCEEDED_RESPONSE.equals(rsp.getCompacts().get(0).getState()));
+ Assert.assertEquals(0, rsp.getCompactsSize());
}
@Test
@@ -496,7 +496,7 @@ public class TestCleaner extends CompactorTest {
addDeltaFile(t, p, 23L, 24L, 2);
addBaseFile(t, p, 25L, 25);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "dp", 25);
CompactionRequest rqst = new CompactionRequest("default", "dp", CompactionType.MAJOR);
rqst.setPartitionname("ds=today");
@@ -505,14 +505,14 @@ public class TestCleaner extends CompactorTest {
txnHandler.markCompacted(ci);
txnHandler.setRunAs(ci.id, System.getProperty("user.name"));
+ // Drop partition will clean the partition entry from the compaction queue and hence cleaner have no effect
ms.dropPartition("default", "dp", Collections.singletonList("today"), true);
startCleaner();
// Check there are no compactions requests left.
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
- Assert.assertEquals(1, rsp.getCompactsSize());
- Assert.assertTrue(TxnStore.SUCCEEDED_RESPONSE.equals(rsp.getCompacts().get(0).getState()));
+ Assert.assertEquals(0, rsp.getCompactsSize());
}
@Override
boolean useHive130DeltaDirName() {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
index f35826e..d2818db 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
@@ -339,7 +339,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, null, 21L, 22L, 2);
addDeltaFile(t, null, 23L, 24L, 2);
- burnThroughTransactions(23);
+ burnThroughTransactions("default", "cthdp", 23);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
@@ -350,6 +350,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "cthdp", txnid);
+ Assert.assertEquals(24, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -371,7 +373,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, p, 21L, 22L, 2);
addDeltaFile(t, p, 23L, 24L, 2);
- burnThroughTransactions(23);
+ burnThroughTransactions("default", "cphdp", 23);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
@@ -383,6 +385,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "cphdp", txnid);
+ Assert.assertEquals(24, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -404,7 +408,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, null, 21L, 22L, 2);
addDeltaFile(t, null, 23L, 24L, 2);
- burnThroughTransactions(53);
+ burnThroughTransactions("default", "nctdpnhe", 53);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
@@ -415,6 +419,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "nctdpnhe", txnid);
+ Assert.assertEquals(54, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -440,7 +446,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, null, 210L, 210L, 1);
addDeltaFile(t, null, 211L, 211L, 1);
- burnThroughTransactions(210);
+ burnThroughTransactions("default", "cttmd", 210);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
@@ -451,6 +457,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "cttmd", txnid);
+ Assert.assertEquals(211, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -481,7 +489,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, p, 210L, 210L, 1);
addDeltaFile(t, p, 211L, 211L, 1);
- burnThroughTransactions(210);
+ burnThroughTransactions("default", "cptmd", 210);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
@@ -493,6 +501,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "cptmd", txnid);
+ Assert.assertEquals(211, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -514,7 +524,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, null, 201L, 205L, 5);
addDeltaFile(t, null, 206L, 211L, 6);
- burnThroughTransactions(210);
+ burnThroughTransactions("default", "nctned", 210);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
@@ -525,6 +535,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "nctned", txnid);
+ Assert.assertEquals(211, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -550,7 +562,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, null, 300L, 310L, 11);
addDeltaFile(t, null, 311L, 321L, 11);
- burnThroughTransactions(320);
+ burnThroughTransactions("default", "cmomwbv", 320);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
@@ -561,6 +573,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "cmomwbv", txnid);
+ Assert.assertEquals(321, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -590,7 +604,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, p, 210L, 210L, 1);
addDeltaFile(t, p, 211L, 211L, 1);
- burnThroughTransactions(210);
+ burnThroughTransactions("default", "ednb", 210);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
@@ -602,6 +616,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "ednb", txnid);
+ Assert.assertEquals(211, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -624,7 +640,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, p, 21L, 22L, 2);
addDeltaFile(t, p, 23L, 24L, 2);
- burnThroughTransactions(23);
+ burnThroughTransactions("default", "ttospgocr", 23);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
@@ -636,6 +652,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "ttospgocr", txnid);
+ Assert.assertEquals(24, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
txnid = openTxn();
@@ -648,6 +666,8 @@ public class TestInitiator extends CompactorTest {
req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
res = txnHandler.lock(req);
+ writeid = allocateWriteId("default", "ttospgocr", txnid);
+ Assert.assertEquals(25, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -670,7 +690,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, p, 21L, 22L, 2);
addDeltaFile(t, p, 23L, 24L, 2);
- burnThroughTransactions(23);
+ burnThroughTransactions("default", "nctdp", 23);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
@@ -681,6 +701,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "nctdp", txnid);
+ Assert.assertEquals(24, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
startInitiator();
@@ -698,7 +720,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, null, 21L, 22L, 2);
addDeltaFile(t, null, 23L, 24L, 2);
- burnThroughTransactions(23);
+ burnThroughTransactions("default", "dt", 23);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
@@ -709,6 +731,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "dt", txnid);
+ Assert.assertEquals(24, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
ms.dropTable("default", "dt");
@@ -729,7 +753,7 @@ public class TestInitiator extends CompactorTest {
addDeltaFile(t, p, 21L, 22L, 2);
addDeltaFile(t, p, 23L, 24L, 2);
- burnThroughTransactions(23);
+ burnThroughTransactions("default", "dp", 23);
long txnid = openTxn();
LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
@@ -741,6 +765,8 @@ public class TestInitiator extends CompactorTest {
LockRequest req = new LockRequest(components, "me", "localhost");
req.setTxnid(txnid);
LockResponse res = txnHandler.lock(req);
+ long writeid = allocateWriteId("default", "dp", txnid);
+ Assert.assertEquals(24, writeid);
txnHandler.commitTxn(new CommitTxnRequest(txnid));
ms.dropPartition("default", "dp", Collections.singletonList("today"), true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestWorker.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestWorker.java b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestWorker.java
index 0638126..0353ebf 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestWorker.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestWorker.java
@@ -32,7 +32,6 @@ import org.apache.hadoop.hive.metastore.api.ShowCompactRequest;
import org.apache.hadoop.hive.metastore.api.ShowCompactResponse;
import org.apache.hadoop.hive.metastore.api.ShowCompactResponseElement;
import org.apache.hadoop.hive.metastore.api.Table;
-import org.apache.hadoop.hive.metastore.txn.TxnStore;
import org.apache.hadoop.hive.ql.io.AcidUtils;
import org.junit.After;
import org.junit.Assert;
@@ -236,7 +235,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 23L, 24L, 2);
addDeltaFile(t, null, 21L, 24L, 4);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "st", 25);
CompactionRequest rqst = new CompactionRequest("default", "st", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -262,7 +261,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, p, 23L, 24L, 2);
addDeltaFile(t, p, 21L, 24L, 4);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "sp", 25);
CompactionRequest rqst = new CompactionRequest("default", "sp", CompactionType.MINOR);
rqst.setPartitionname("ds=today");
@@ -285,7 +284,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 21L, 22L, 2);
addDeltaFile(t, null, 23L, 24L, 2);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "mtwb", 25);
CompactionRequest rqst = new CompactionRequest("default", "mtwb", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -344,7 +343,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 23L, 25L, 3);
addLengthFile(t, null, 23L, 25L, 3);
addDeltaFile(t, null, 26L, 27L, 2);
- burnThroughTransactions(27, new HashSet<Long>(Arrays.asList(23L)), null);
+ burnThroughTransactions("default", "mtwb", 27, new HashSet<Long>(Arrays.asList(23L)), null);
CompactionRequest rqst = new CompactionRequest("default", "mtwb", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -380,7 +379,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 23L, 25L, 3);
addLengthFile(t, null, 23L, 25L, 3);
addDeltaFile(t, null, 26L, 27L, 2);
- burnThroughTransactions(27, null, new HashSet<Long>(Arrays.asList(24L, 25L)));
+ burnThroughTransactions("default", "mtwb", 27, null, new HashSet<Long>(Arrays.asList(24L, 25L)));
CompactionRequest rqst = new CompactionRequest("default", "mtwb", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -416,7 +415,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, p, 21L, 22L, 2);
addDeltaFile(t, p, 23L, 24L, 2);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "mpwb", 25);
CompactionRequest rqst = new CompactionRequest("default", "mpwb", CompactionType.MINOR);
rqst.setPartitionname("ds=today");
@@ -469,7 +468,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 1L, 2L, 2);
addDeltaFile(t, null, 3L, 4L, 2);
- burnThroughTransactions(5);
+ burnThroughTransactions("default", "mtnb", 5);
CompactionRequest rqst = new CompactionRequest("default", "mtnb", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -522,7 +521,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 21L, 22L, 2);
addDeltaFile(t, null, 23L, 24L, 2);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "matwb", 25);
CompactionRequest rqst = new CompactionRequest("default", "matwb", CompactionType.MAJOR);
txnHandler.compact(rqst);
@@ -598,7 +597,7 @@ public class TestWorker extends CompactorTest {
* and then the 'requested'
* minor compaction to combine delta_21_23, delta_25_33 and delta_35_35 to make delta_21_35
* or major compaction to create base_35*/
- burnThroughTransactions(35);
+ burnThroughTransactions("default", "mapwb", 35);
CompactionRequest rqst = new CompactionRequest("default", "mapwb", type);
rqst.setPartitionname("ds=today");
txnHandler.compact(rqst);
@@ -690,7 +689,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, p, 21L, 22L, 2);
addDeltaFile(t, p, 23L, 24L, 2);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "mapwb", 25);
CompactionRequest rqst = new CompactionRequest("default", "mapwb", CompactionType.MAJOR);
rqst.setPartitionname("ds=today");
@@ -734,7 +733,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 1L, 2L, 2);
addDeltaFile(t, null, 3L, 4L, 2);
- burnThroughTransactions(4);
+ burnThroughTransactions("default", "matnb", 4);
CompactionRequest rqst = new CompactionRequest("default", "matnb", CompactionType.MAJOR);
txnHandler.compact(rqst);
@@ -778,7 +777,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 21L, 22L, 2);
addDeltaFile(t, null, 23L, 24L, 2);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "matl", 25);
CompactionRequest rqst = new CompactionRequest("default", "matl", CompactionType.MAJOR);
txnHandler.compact(rqst);
@@ -822,7 +821,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 21L, 22L, 2);
addDeltaFile(t, null, 23L, 24L, 2);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "mtl", 25);
CompactionRequest rqst = new CompactionRequest("default", "mtl", CompactionType.MINOR);
txnHandler.compact(rqst);
@@ -865,7 +864,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, p, 21L, 22L, 2, 2, false);
addDeltaFile(t, p, 23L, 26L, 4);
- burnThroughTransactions(27);
+ burnThroughTransactions("default", "mapwbmb", 27);
CompactionRequest rqst = new CompactionRequest("default", "mapwbmb", CompactionType.MAJOR);
rqst.setPartitionname("ds=today");
@@ -919,7 +918,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 23L, 25L, 3);
addLengthFile(t, null, 23L, 25L, 3);
addDeltaFile(t, null, 26L, 27L, 2);
- burnThroughTransactions(27, new HashSet<Long>(Arrays.asList(23L)), null);
+ burnThroughTransactions("default", "mtwb", 27, new HashSet<Long>(Arrays.asList(23L)), null);
CompactionRequest rqst = new CompactionRequest("default", "mtwb", CompactionType.MAJOR);
txnHandler.compact(rqst);
@@ -955,7 +954,7 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 23L, 25L, 3);
addLengthFile(t, null, 23L, 25L, 3);
addDeltaFile(t, null, 26L, 27L, 2);
- burnThroughTransactions(27, null, new HashSet<Long>(Arrays.asList(24L, 25L)));
+ burnThroughTransactions("default", "mtwb", 27, null, new HashSet<Long>(Arrays.asList(24L, 25L)));
CompactionRequest rqst = new CompactionRequest("default", "mtwb", CompactionType.MAJOR);
txnHandler.compact(rqst);
@@ -991,19 +990,19 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, null, 1L, 2L, 2);
addDeltaFile(t, null, 3L, 4L, 2);
- burnThroughTransactions(4);
+ burnThroughTransactions("default", "dt", 4);
CompactionRequest rqst = new CompactionRequest("default", "dt", CompactionType.MAJOR);
txnHandler.compact(rqst);
+ // Drop table will clean the table entry from the compaction queue and hence worker have no effect
ms.dropTable("default", "dt");
startWorker();
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
List<ShowCompactResponseElement> compacts = rsp.getCompacts();
- Assert.assertEquals(1, compacts.size());
- Assert.assertTrue(TxnStore.SUCCEEDED_RESPONSE.equals(compacts.get(0).getState()));
+ Assert.assertEquals(0, compacts.size());
}
@Test
@@ -1015,20 +1014,20 @@ public class TestWorker extends CompactorTest {
addDeltaFile(t, p, 21L, 22L, 2);
addDeltaFile(t, p, 23L, 24L, 2);
- burnThroughTransactions(25);
+ burnThroughTransactions("default", "dp", 25);
CompactionRequest rqst = new CompactionRequest("default", "dp", CompactionType.MINOR);
rqst.setPartitionname("ds=today");
txnHandler.compact(rqst);
+ // Drop partition will clean the partition entry from the compaction queue and hence worker have no effect
ms.dropPartition("default", "dp", Collections.singletonList("today"), true);
startWorker();
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
List<ShowCompactResponseElement> compacts = rsp.getCompacts();
- Assert.assertEquals(1, compacts.size());
- Assert.assertTrue(TxnStore.SUCCEEDED_RESPONSE.equals(rsp.getCompacts().get(0).getState()));
+ Assert.assertEquals(0, compacts.size());
}
@After
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/results/clientpositive/acid_nullscan.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_nullscan.q.out b/ql/src/test/results/clientpositive/acid_nullscan.q.out
index 7fcc831..76df2b6 100644
--- a/ql/src/test/results/clientpositive/acid_nullscan.q.out
+++ b/ql/src/test/results/clientpositive/acid_nullscan.q.out
@@ -42,12 +42,12 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: acid_vectorized
- Statistics: Num rows: 1 Data size: 24510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 1 Data size: 24540 Basic stats: COMPLETE Column stats: NONE
GatherStats: false
Filter Operator
isSamplingPred: false
predicate: false (type: boolean)
- Statistics: Num rows: 1 Data size: 24510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 1 Data size: 24540 Basic stats: COMPLETE Column stats: NONE
Group By Operator
aggregations: sum(a)
mode: hash
@@ -83,7 +83,7 @@ STAGE PLANS:
serialization.ddl struct acid_vectorized { i32 a, string b}
serialization.format 1
serialization.lib org.apache.hadoop.hive.serde2.NullStructSerDe
- totalSize 2451
+ totalSize 2454
transactional true
transactional_properties default
#### A masked pattern was here ####
@@ -106,7 +106,7 @@ STAGE PLANS:
serialization.ddl struct acid_vectorized { i32 a, string b}
serialization.format 1
serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
- totalSize 2451
+ totalSize 2454
transactional true
transactional_properties default
#### A masked pattern was here ####
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/results/clientpositive/acid_table_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_table_stats.q.out b/ql/src/test/results/clientpositive/acid_table_stats.q.out
index 74d4c44..fa6c666 100644
--- a/ql/src/test/results/clientpositive/acid_table_stats.q.out
+++ b/ql/src/test/results/clientpositive/acid_table_stats.q.out
@@ -95,7 +95,7 @@ Partition Parameters:
numFiles 2
numRows 0
rawDataSize 0
- totalSize 3950
+ totalSize 3949
#### A masked pattern was here ####
# Storage Information
@@ -133,9 +133,9 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: acid
- Statistics: Num rows: 81 Data size: 39500 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 81 Data size: 39490 Basic stats: COMPLETE Column stats: NONE
Select Operator
- Statistics: Num rows: 81 Data size: 39500 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 81 Data size: 39490 Basic stats: COMPLETE Column stats: NONE
Group By Operator
aggregations: count()
mode: hash
@@ -210,7 +210,7 @@ Partition Parameters:
numFiles 2
numRows 1000
rawDataSize 208000
- totalSize 3950
+ totalSize 3949
#### A masked pattern was here ####
# Storage Information
@@ -261,7 +261,7 @@ Partition Parameters:
numFiles 2
numRows 1000
rawDataSize 208000
- totalSize 3950
+ totalSize 3949
#### A masked pattern was here ####
# Storage Information
@@ -386,7 +386,7 @@ Partition Parameters:
numFiles 4
numRows 1000
rawDataSize 208000
- totalSize 7904
+ totalSize 7890
#### A masked pattern was here ####
# Storage Information
@@ -433,7 +433,7 @@ Partition Parameters:
numFiles 4
numRows 2000
rawDataSize 416000
- totalSize 7904
+ totalSize 7890
#### A masked pattern was here ####
# Storage Information
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/results/clientpositive/autoColumnStats_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_4.q.out b/ql/src/test/results/clientpositive/autoColumnStats_4.q.out
index b3df04f..9c0e020 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_4.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_4.q.out
@@ -241,7 +241,7 @@ Table Parameters:
numFiles 4
numRows 0
rawDataSize 0
- totalSize 2909
+ totalSize 2884
transactional true
transactional_properties default
#### A masked pattern was here ####
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out b/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out
index 1195f20..fba0158 100644
--- a/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out
+++ b/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out
@@ -103,7 +103,7 @@ STAGE PLANS:
serialization.ddl struct acidtbldefault { i32 a}
serialization.format 1
serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
- totalSize 32572
+ totalSize 32616
transactional true
transactional_properties default
#### A masked pattern was here ####
@@ -127,7 +127,7 @@ STAGE PLANS:
serialization.ddl struct acidtbldefault { i32 a}
serialization.format 1
serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
- totalSize 32572
+ totalSize 32616
transactional true
transactional_properties default
#### A masked pattern was here ####
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/results/clientpositive/row__id.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/row__id.q.out b/ql/src/test/results/clientpositive/row__id.q.out
index 87fb310..6659327 100644
--- a/ql/src/test/results/clientpositive/row__id.q.out
+++ b/ql/src/test/results/clientpositive/row__id.q.out
@@ -62,23 +62,23 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: hello_acid
- Statistics: Num rows: 74 Data size: 18600 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 72 Data size: 18410 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: ROW__ID.transactionid (type: bigint)
outputColumnNames: _col0
- Statistics: Num rows: 74 Data size: 18600 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 72 Data size: 18410 Basic stats: COMPLETE Column stats: NONE
Reduce Output Operator
key expressions: _col0 (type: bigint)
sort order: +
- Statistics: Num rows: 74 Data size: 18600 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 72 Data size: 18410 Basic stats: COMPLETE Column stats: NONE
Reduce Operator Tree:
Select Operator
expressions: KEY.reducesinkkey0 (type: bigint)
outputColumnNames: _col0
- Statistics: Num rows: 74 Data size: 18600 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 72 Data size: 18410 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
- Statistics: Num rows: 74 Data size: 18600 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 72 Data size: 18410 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -104,9 +104,9 @@ POSTHOOK: Input: default@hello_acid@load_date=2016-03-01
POSTHOOK: Input: default@hello_acid@load_date=2016-03-02
POSTHOOK: Input: default@hello_acid@load_date=2016-03-03
#### A masked pattern was here ####
+1
+2
3
-4
-5
PREHOOK: query: explain
select tid from (select row__id.transactionid as tid from hello_acid) sub where tid = 3
PREHOOK: type: QUERY
@@ -123,17 +123,17 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: hello_acid
- Statistics: Num rows: 74 Data size: 18600 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 72 Data size: 18410 Basic stats: COMPLETE Column stats: NONE
Filter Operator
predicate: (ROW__ID.transactionid = 3) (type: boolean)
- Statistics: Num rows: 37 Data size: 9300 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 36 Data size: 9205 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: ROW__ID.transactionid (type: bigint)
outputColumnNames: _col0
- Statistics: Num rows: 37 Data size: 9300 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 36 Data size: 9205 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
- Statistics: Num rows: 37 Data size: 9300 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 36 Data size: 9205 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
[03/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
index 9a504e1..0c60aff 100644
--- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
+++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
@@ -9967,6 +9967,568 @@ class CommitTxnRequest:
def __ne__(self, other):
return not (self == other)
+class GetValidWriteIdsRequest:
+ """
+ Attributes:
+ - fullTableNames
+ - validTxnList
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.LIST, 'fullTableNames', (TType.STRING,None), None, ), # 1
+ (2, TType.STRING, 'validTxnList', None, None, ), # 2
+ )
+
+ def __init__(self, fullTableNames=None, validTxnList=None,):
+ self.fullTableNames = fullTableNames
+ self.validTxnList = validTxnList
+
+ 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.LIST:
+ self.fullTableNames = []
+ (_etype493, _size490) = iprot.readListBegin()
+ for _i494 in xrange(_size490):
+ _elem495 = iprot.readString()
+ self.fullTableNames.append(_elem495)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.validTxnList = 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('GetValidWriteIdsRequest')
+ if self.fullTableNames is not None:
+ oprot.writeFieldBegin('fullTableNames', TType.LIST, 1)
+ oprot.writeListBegin(TType.STRING, len(self.fullTableNames))
+ for iter496 in self.fullTableNames:
+ oprot.writeString(iter496)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.validTxnList is not None:
+ oprot.writeFieldBegin('validTxnList', TType.STRING, 2)
+ oprot.writeString(self.validTxnList)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.fullTableNames is None:
+ raise TProtocol.TProtocolException(message='Required field fullTableNames is unset!')
+ if self.validTxnList is None:
+ raise TProtocol.TProtocolException(message='Required field validTxnList is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.fullTableNames)
+ value = (value * 31) ^ hash(self.validTxnList)
+ 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 TableValidWriteIds:
+ """
+ Attributes:
+ - fullTableName
+ - writeIdHighWaterMark
+ - invalidWriteIds
+ - minOpenWriteId
+ - abortedBits
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'fullTableName', None, None, ), # 1
+ (2, TType.I64, 'writeIdHighWaterMark', None, None, ), # 2
+ (3, TType.LIST, 'invalidWriteIds', (TType.I64,None), None, ), # 3
+ (4, TType.I64, 'minOpenWriteId', None, None, ), # 4
+ (5, TType.STRING, 'abortedBits', None, None, ), # 5
+ )
+
+ def __init__(self, fullTableName=None, writeIdHighWaterMark=None, invalidWriteIds=None, minOpenWriteId=None, abortedBits=None,):
+ self.fullTableName = fullTableName
+ self.writeIdHighWaterMark = writeIdHighWaterMark
+ self.invalidWriteIds = invalidWriteIds
+ self.minOpenWriteId = minOpenWriteId
+ self.abortedBits = abortedBits
+
+ 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.STRING:
+ self.fullTableName = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I64:
+ self.writeIdHighWaterMark = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.LIST:
+ self.invalidWriteIds = []
+ (_etype500, _size497) = iprot.readListBegin()
+ for _i501 in xrange(_size497):
+ _elem502 = iprot.readI64()
+ self.invalidWriteIds.append(_elem502)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.I64:
+ self.minOpenWriteId = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 5:
+ if ftype == TType.STRING:
+ self.abortedBits = 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('TableValidWriteIds')
+ if self.fullTableName is not None:
+ oprot.writeFieldBegin('fullTableName', TType.STRING, 1)
+ oprot.writeString(self.fullTableName)
+ oprot.writeFieldEnd()
+ if self.writeIdHighWaterMark is not None:
+ oprot.writeFieldBegin('writeIdHighWaterMark', TType.I64, 2)
+ oprot.writeI64(self.writeIdHighWaterMark)
+ oprot.writeFieldEnd()
+ if self.invalidWriteIds is not None:
+ oprot.writeFieldBegin('invalidWriteIds', TType.LIST, 3)
+ oprot.writeListBegin(TType.I64, len(self.invalidWriteIds))
+ for iter503 in self.invalidWriteIds:
+ oprot.writeI64(iter503)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.minOpenWriteId is not None:
+ oprot.writeFieldBegin('minOpenWriteId', TType.I64, 4)
+ oprot.writeI64(self.minOpenWriteId)
+ oprot.writeFieldEnd()
+ if self.abortedBits is not None:
+ oprot.writeFieldBegin('abortedBits', TType.STRING, 5)
+ oprot.writeString(self.abortedBits)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.fullTableName is None:
+ raise TProtocol.TProtocolException(message='Required field fullTableName is unset!')
+ if self.writeIdHighWaterMark is None:
+ raise TProtocol.TProtocolException(message='Required field writeIdHighWaterMark is unset!')
+ if self.invalidWriteIds is None:
+ raise TProtocol.TProtocolException(message='Required field invalidWriteIds is unset!')
+ if self.abortedBits is None:
+ raise TProtocol.TProtocolException(message='Required field abortedBits is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.fullTableName)
+ value = (value * 31) ^ hash(self.writeIdHighWaterMark)
+ value = (value * 31) ^ hash(self.invalidWriteIds)
+ value = (value * 31) ^ hash(self.minOpenWriteId)
+ value = (value * 31) ^ hash(self.abortedBits)
+ 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 GetValidWriteIdsResponse:
+ """
+ Attributes:
+ - tblValidWriteIds
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.LIST, 'tblValidWriteIds', (TType.STRUCT,(TableValidWriteIds, TableValidWriteIds.thrift_spec)), None, ), # 1
+ )
+
+ def __init__(self, tblValidWriteIds=None,):
+ self.tblValidWriteIds = tblValidWriteIds
+
+ 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.LIST:
+ self.tblValidWriteIds = []
+ (_etype507, _size504) = iprot.readListBegin()
+ for _i508 in xrange(_size504):
+ _elem509 = TableValidWriteIds()
+ _elem509.read(iprot)
+ self.tblValidWriteIds.append(_elem509)
+ iprot.readListEnd()
+ 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('GetValidWriteIdsResponse')
+ if self.tblValidWriteIds is not None:
+ oprot.writeFieldBegin('tblValidWriteIds', TType.LIST, 1)
+ oprot.writeListBegin(TType.STRUCT, len(self.tblValidWriteIds))
+ for iter510 in self.tblValidWriteIds:
+ iter510.write(oprot)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.tblValidWriteIds is None:
+ raise TProtocol.TProtocolException(message='Required field tblValidWriteIds is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.tblValidWriteIds)
+ 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 AllocateTableWriteIdsRequest:
+ """
+ Attributes:
+ - txnIds
+ - dbName
+ - tableName
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.LIST, 'txnIds', (TType.I64,None), None, ), # 1
+ (2, TType.STRING, 'dbName', None, None, ), # 2
+ (3, TType.STRING, 'tableName', None, None, ), # 3
+ )
+
+ def __init__(self, txnIds=None, dbName=None, tableName=None,):
+ self.txnIds = txnIds
+ self.dbName = dbName
+ self.tableName = tableName
+
+ 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.LIST:
+ self.txnIds = []
+ (_etype514, _size511) = iprot.readListBegin()
+ for _i515 in xrange(_size511):
+ _elem516 = iprot.readI64()
+ self.txnIds.append(_elem516)
+ iprot.readListEnd()
+ 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)
+ 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('AllocateTableWriteIdsRequest')
+ if self.txnIds is not None:
+ oprot.writeFieldBegin('txnIds', TType.LIST, 1)
+ oprot.writeListBegin(TType.I64, len(self.txnIds))
+ for iter517 in self.txnIds:
+ oprot.writeI64(iter517)
+ oprot.writeListEnd()
+ 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()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.txnIds is None:
+ raise TProtocol.TProtocolException(message='Required field txnIds 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!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.txnIds)
+ value = (value * 31) ^ hash(self.dbName)
+ value = (value * 31) ^ hash(self.tableName)
+ 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 TxnToWriteId:
+ """
+ Attributes:
+ - txnId
+ - writeId
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I64, 'txnId', None, None, ), # 1
+ (2, TType.I64, 'writeId', None, None, ), # 2
+ )
+
+ def __init__(self, txnId=None, writeId=None,):
+ self.txnId = txnId
+ self.writeId = writeId
+
+ 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.txnId = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I64:
+ self.writeId = 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('TxnToWriteId')
+ if self.txnId is not None:
+ oprot.writeFieldBegin('txnId', TType.I64, 1)
+ oprot.writeI64(self.txnId)
+ oprot.writeFieldEnd()
+ if self.writeId is not None:
+ oprot.writeFieldBegin('writeId', TType.I64, 2)
+ oprot.writeI64(self.writeId)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.txnId is None:
+ raise TProtocol.TProtocolException(message='Required field txnId is unset!')
+ if self.writeId is None:
+ raise TProtocol.TProtocolException(message='Required field writeId is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.txnId)
+ value = (value * 31) ^ hash(self.writeId)
+ 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 AllocateTableWriteIdsResponse:
+ """
+ Attributes:
+ - txnToWriteIds
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.LIST, 'txnToWriteIds', (TType.STRUCT,(TxnToWriteId, TxnToWriteId.thrift_spec)), None, ), # 1
+ )
+
+ def __init__(self, txnToWriteIds=None,):
+ self.txnToWriteIds = txnToWriteIds
+
+ 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.LIST:
+ self.txnToWriteIds = []
+ (_etype521, _size518) = iprot.readListBegin()
+ for _i522 in xrange(_size518):
+ _elem523 = TxnToWriteId()
+ _elem523.read(iprot)
+ self.txnToWriteIds.append(_elem523)
+ iprot.readListEnd()
+ 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('AllocateTableWriteIdsResponse')
+ if self.txnToWriteIds is not None:
+ oprot.writeFieldBegin('txnToWriteIds', TType.LIST, 1)
+ oprot.writeListBegin(TType.STRUCT, len(self.txnToWriteIds))
+ for iter524 in self.txnToWriteIds:
+ iter524.write(oprot)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.txnToWriteIds is None:
+ raise TProtocol.TProtocolException(message='Required field txnToWriteIds is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.txnToWriteIds)
+ 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 LockComponent:
"""
Attributes:
@@ -10167,11 +10729,11 @@ class LockRequest:
if fid == 1:
if ftype == TType.LIST:
self.component = []
- (_etype493, _size490) = iprot.readListBegin()
- for _i494 in xrange(_size490):
- _elem495 = LockComponent()
- _elem495.read(iprot)
- self.component.append(_elem495)
+ (_etype528, _size525) = iprot.readListBegin()
+ for _i529 in xrange(_size525):
+ _elem530 = LockComponent()
+ _elem530.read(iprot)
+ self.component.append(_elem530)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -10208,8 +10770,8 @@ class LockRequest:
if self.component is not None:
oprot.writeFieldBegin('component', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.component))
- for iter496 in self.component:
- iter496.write(oprot)
+ for iter531 in self.component:
+ iter531.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.txnid is not None:
@@ -10907,11 +11469,11 @@ class ShowLocksResponse:
if fid == 1:
if ftype == TType.LIST:
self.locks = []
- (_etype500, _size497) = iprot.readListBegin()
- for _i501 in xrange(_size497):
- _elem502 = ShowLocksResponseElement()
- _elem502.read(iprot)
- self.locks.append(_elem502)
+ (_etype535, _size532) = iprot.readListBegin()
+ for _i536 in xrange(_size532):
+ _elem537 = ShowLocksResponseElement()
+ _elem537.read(iprot)
+ self.locks.append(_elem537)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -10928,8 +11490,8 @@ class ShowLocksResponse:
if self.locks is not None:
oprot.writeFieldBegin('locks', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.locks))
- for iter503 in self.locks:
- iter503.write(oprot)
+ for iter538 in self.locks:
+ iter538.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -11144,20 +11706,20 @@ class HeartbeatTxnRangeResponse:
if fid == 1:
if ftype == TType.SET:
self.aborted = set()
- (_etype507, _size504) = iprot.readSetBegin()
- for _i508 in xrange(_size504):
- _elem509 = iprot.readI64()
- self.aborted.add(_elem509)
+ (_etype542, _size539) = iprot.readSetBegin()
+ for _i543 in xrange(_size539):
+ _elem544 = iprot.readI64()
+ self.aborted.add(_elem544)
iprot.readSetEnd()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.SET:
self.nosuch = set()
- (_etype513, _size510) = iprot.readSetBegin()
- for _i514 in xrange(_size510):
- _elem515 = iprot.readI64()
- self.nosuch.add(_elem515)
+ (_etype548, _size545) = iprot.readSetBegin()
+ for _i549 in xrange(_size545):
+ _elem550 = iprot.readI64()
+ self.nosuch.add(_elem550)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -11174,15 +11736,15 @@ class HeartbeatTxnRangeResponse:
if self.aborted is not None:
oprot.writeFieldBegin('aborted', TType.SET, 1)
oprot.writeSetBegin(TType.I64, len(self.aborted))
- for iter516 in self.aborted:
- oprot.writeI64(iter516)
+ for iter551 in self.aborted:
+ oprot.writeI64(iter551)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.nosuch is not None:
oprot.writeFieldBegin('nosuch', TType.SET, 2)
oprot.writeSetBegin(TType.I64, len(self.nosuch))
- for iter517 in self.nosuch:
- oprot.writeI64(iter517)
+ for iter552 in self.nosuch:
+ oprot.writeI64(iter552)
oprot.writeSetEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -11279,11 +11841,11 @@ class CompactionRequest:
elif fid == 6:
if ftype == TType.MAP:
self.properties = {}
- (_ktype519, _vtype520, _size518 ) = iprot.readMapBegin()
- for _i522 in xrange(_size518):
- _key523 = iprot.readString()
- _val524 = iprot.readString()
- self.properties[_key523] = _val524
+ (_ktype554, _vtype555, _size553 ) = iprot.readMapBegin()
+ for _i557 in xrange(_size553):
+ _key558 = iprot.readString()
+ _val559 = iprot.readString()
+ self.properties[_key558] = _val559
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -11320,9 +11882,9 @@ class CompactionRequest:
if self.properties is not None:
oprot.writeFieldBegin('properties', TType.MAP, 6)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
- for kiter525,viter526 in self.properties.items():
- oprot.writeString(kiter525)
- oprot.writeString(viter526)
+ for kiter560,viter561 in self.properties.items():
+ oprot.writeString(kiter560)
+ oprot.writeString(viter561)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -11757,11 +12319,11 @@ class ShowCompactResponse:
if fid == 1:
if ftype == TType.LIST:
self.compacts = []
- (_etype530, _size527) = iprot.readListBegin()
- for _i531 in xrange(_size527):
- _elem532 = ShowCompactResponseElement()
- _elem532.read(iprot)
- self.compacts.append(_elem532)
+ (_etype565, _size562) = iprot.readListBegin()
+ for _i566 in xrange(_size562):
+ _elem567 = ShowCompactResponseElement()
+ _elem567.read(iprot)
+ self.compacts.append(_elem567)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -11778,8 +12340,8 @@ class ShowCompactResponse:
if self.compacts is not None:
oprot.writeFieldBegin('compacts', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.compacts))
- for iter533 in self.compacts:
- iter533.write(oprot)
+ for iter568 in self.compacts:
+ iter568.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -11811,6 +12373,7 @@ class AddDynamicPartitions:
"""
Attributes:
- txnid
+ - writeid
- dbname
- tablename
- partitionnames
@@ -11820,14 +12383,16 @@ class AddDynamicPartitions:
thrift_spec = (
None, # 0
(1, TType.I64, 'txnid', None, None, ), # 1
- (2, TType.STRING, 'dbname', None, None, ), # 2
- (3, TType.STRING, 'tablename', None, None, ), # 3
- (4, TType.LIST, 'partitionnames', (TType.STRING,None), None, ), # 4
- (5, TType.I32, 'operationType', None, 5, ), # 5
+ (2, TType.I64, 'writeid', None, None, ), # 2
+ (3, TType.STRING, 'dbname', None, None, ), # 3
+ (4, TType.STRING, 'tablename', None, None, ), # 4
+ (5, TType.LIST, 'partitionnames', (TType.STRING,None), None, ), # 5
+ (6, TType.I32, 'operationType', None, 5, ), # 6
)
- def __init__(self, txnid=None, dbname=None, tablename=None, partitionnames=None, operationType=thrift_spec[5][4],):
+ def __init__(self, txnid=None, writeid=None, dbname=None, tablename=None, partitionnames=None, operationType=thrift_spec[6][4],):
self.txnid = txnid
+ self.writeid = writeid
self.dbname = dbname
self.tablename = tablename
self.partitionnames = partitionnames
@@ -11848,26 +12413,31 @@ class AddDynamicPartitions:
else:
iprot.skip(ftype)
elif fid == 2:
+ if ftype == TType.I64:
+ self.writeid = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
if ftype == TType.STRING:
self.dbname = iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 3:
+ elif fid == 4:
if ftype == TType.STRING:
self.tablename = iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 4:
+ elif fid == 5:
if ftype == TType.LIST:
self.partitionnames = []
- (_etype537, _size534) = iprot.readListBegin()
- for _i538 in xrange(_size534):
- _elem539 = iprot.readString()
- self.partitionnames.append(_elem539)
+ (_etype572, _size569) = iprot.readListBegin()
+ for _i573 in xrange(_size569):
+ _elem574 = iprot.readString()
+ self.partitionnames.append(_elem574)
iprot.readListEnd()
else:
iprot.skip(ftype)
- elif fid == 5:
+ elif fid == 6:
if ftype == TType.I32:
self.operationType = iprot.readI32()
else:
@@ -11886,23 +12456,27 @@ class AddDynamicPartitions:
oprot.writeFieldBegin('txnid', TType.I64, 1)
oprot.writeI64(self.txnid)
oprot.writeFieldEnd()
+ if self.writeid is not None:
+ oprot.writeFieldBegin('writeid', TType.I64, 2)
+ oprot.writeI64(self.writeid)
+ oprot.writeFieldEnd()
if self.dbname is not None:
- oprot.writeFieldBegin('dbname', TType.STRING, 2)
+ oprot.writeFieldBegin('dbname', TType.STRING, 3)
oprot.writeString(self.dbname)
oprot.writeFieldEnd()
if self.tablename is not None:
- oprot.writeFieldBegin('tablename', TType.STRING, 3)
+ oprot.writeFieldBegin('tablename', TType.STRING, 4)
oprot.writeString(self.tablename)
oprot.writeFieldEnd()
if self.partitionnames is not None:
- oprot.writeFieldBegin('partitionnames', TType.LIST, 4)
+ oprot.writeFieldBegin('partitionnames', TType.LIST, 5)
oprot.writeListBegin(TType.STRING, len(self.partitionnames))
- for iter540 in self.partitionnames:
- oprot.writeString(iter540)
+ for iter575 in self.partitionnames:
+ oprot.writeString(iter575)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.operationType is not None:
- oprot.writeFieldBegin('operationType', TType.I32, 5)
+ oprot.writeFieldBegin('operationType', TType.I32, 6)
oprot.writeI32(self.operationType)
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -11911,6 +12485,8 @@ class AddDynamicPartitions:
def validate(self):
if self.txnid is None:
raise TProtocol.TProtocolException(message='Required field txnid is unset!')
+ if self.writeid is None:
+ raise TProtocol.TProtocolException(message='Required field writeid is unset!')
if self.dbname is None:
raise TProtocol.TProtocolException(message='Required field dbname is unset!')
if self.tablename is None:
@@ -11923,6 +12499,7 @@ class AddDynamicPartitions:
def __hash__(self):
value = 17
value = (value * 31) ^ hash(self.txnid)
+ value = (value * 31) ^ hash(self.writeid)
value = (value * 31) ^ hash(self.dbname)
value = (value * 31) ^ hash(self.tablename)
value = (value * 31) ^ hash(self.partitionnames)
@@ -12117,10 +12694,10 @@ class CreationMetadata:
elif fid == 3:
if ftype == TType.SET:
self.tablesUsed = set()
- (_etype544, _size541) = iprot.readSetBegin()
- for _i545 in xrange(_size541):
- _elem546 = iprot.readString()
- self.tablesUsed.add(_elem546)
+ (_etype579, _size576) = iprot.readSetBegin()
+ for _i580 in xrange(_size576):
+ _elem581 = iprot.readString()
+ self.tablesUsed.add(_elem581)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -12150,8 +12727,8 @@ class CreationMetadata:
if self.tablesUsed is not None:
oprot.writeFieldBegin('tablesUsed', TType.SET, 3)
oprot.writeSetBegin(TType.STRING, len(self.tablesUsed))
- for iter547 in self.tablesUsed:
- oprot.writeString(iter547)
+ for iter582 in self.tablesUsed:
+ oprot.writeString(iter582)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.validTxnList is not None:
@@ -12447,11 +13024,11 @@ class NotificationEventResponse:
if fid == 1:
if ftype == TType.LIST:
self.events = []
- (_etype551, _size548) = iprot.readListBegin()
- for _i552 in xrange(_size548):
- _elem553 = NotificationEvent()
- _elem553.read(iprot)
- self.events.append(_elem553)
+ (_etype586, _size583) = iprot.readListBegin()
+ for _i587 in xrange(_size583):
+ _elem588 = NotificationEvent()
+ _elem588.read(iprot)
+ self.events.append(_elem588)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -12468,8 +13045,8 @@ class NotificationEventResponse:
if self.events is not None:
oprot.writeFieldBegin('events', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.events))
- for iter554 in self.events:
- iter554.write(oprot)
+ for iter589 in self.events:
+ iter589.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -12750,20 +13327,20 @@ class InsertEventRequestData:
elif fid == 2:
if ftype == TType.LIST:
self.filesAdded = []
- (_etype558, _size555) = iprot.readListBegin()
- for _i559 in xrange(_size555):
- _elem560 = iprot.readString()
- self.filesAdded.append(_elem560)
+ (_etype593, _size590) = iprot.readListBegin()
+ for _i594 in xrange(_size590):
+ _elem595 = iprot.readString()
+ self.filesAdded.append(_elem595)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.LIST:
self.filesAddedChecksum = []
- (_etype564, _size561) = iprot.readListBegin()
- for _i565 in xrange(_size561):
- _elem566 = iprot.readString()
- self.filesAddedChecksum.append(_elem566)
+ (_etype599, _size596) = iprot.readListBegin()
+ for _i600 in xrange(_size596):
+ _elem601 = iprot.readString()
+ self.filesAddedChecksum.append(_elem601)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -12784,15 +13361,15 @@ class InsertEventRequestData:
if self.filesAdded is not None:
oprot.writeFieldBegin('filesAdded', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.filesAdded))
- for iter567 in self.filesAdded:
- oprot.writeString(iter567)
+ for iter602 in self.filesAdded:
+ oprot.writeString(iter602)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.filesAddedChecksum is not None:
oprot.writeFieldBegin('filesAddedChecksum', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.filesAddedChecksum))
- for iter568 in self.filesAddedChecksum:
- oprot.writeString(iter568)
+ for iter603 in self.filesAddedChecksum:
+ oprot.writeString(iter603)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -12947,10 +13524,10 @@ class FireEventRequest:
elif fid == 5:
if ftype == TType.LIST:
self.partitionVals = []
- (_etype572, _size569) = iprot.readListBegin()
- for _i573 in xrange(_size569):
- _elem574 = iprot.readString()
- self.partitionVals.append(_elem574)
+ (_etype607, _size604) = iprot.readListBegin()
+ for _i608 in xrange(_size604):
+ _elem609 = iprot.readString()
+ self.partitionVals.append(_elem609)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -12983,8 +13560,8 @@ class FireEventRequest:
if self.partitionVals is not None:
oprot.writeFieldBegin('partitionVals', TType.LIST, 5)
oprot.writeListBegin(TType.STRING, len(self.partitionVals))
- for iter575 in self.partitionVals:
- oprot.writeString(iter575)
+ for iter610 in self.partitionVals:
+ oprot.writeString(iter610)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -13171,12 +13748,12 @@ class GetFileMetadataByExprResult:
if fid == 1:
if ftype == TType.MAP:
self.metadata = {}
- (_ktype577, _vtype578, _size576 ) = iprot.readMapBegin()
- for _i580 in xrange(_size576):
- _key581 = iprot.readI64()
- _val582 = MetadataPpdResult()
- _val582.read(iprot)
- self.metadata[_key581] = _val582
+ (_ktype612, _vtype613, _size611 ) = iprot.readMapBegin()
+ for _i615 in xrange(_size611):
+ _key616 = iprot.readI64()
+ _val617 = MetadataPpdResult()
+ _val617.read(iprot)
+ self.metadata[_key616] = _val617
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -13198,9 +13775,9 @@ class GetFileMetadataByExprResult:
if self.metadata is not None:
oprot.writeFieldBegin('metadata', TType.MAP, 1)
oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.metadata))
- for kiter583,viter584 in self.metadata.items():
- oprot.writeI64(kiter583)
- viter584.write(oprot)
+ for kiter618,viter619 in self.metadata.items():
+ oprot.writeI64(kiter618)
+ viter619.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.isSupported is not None:
@@ -13270,10 +13847,10 @@ class GetFileMetadataByExprRequest:
if fid == 1:
if ftype == TType.LIST:
self.fileIds = []
- (_etype588, _size585) = iprot.readListBegin()
- for _i589 in xrange(_size585):
- _elem590 = iprot.readI64()
- self.fileIds.append(_elem590)
+ (_etype623, _size620) = iprot.readListBegin()
+ for _i624 in xrange(_size620):
+ _elem625 = iprot.readI64()
+ self.fileIds.append(_elem625)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -13305,8 +13882,8 @@ class GetFileMetadataByExprRequest:
if self.fileIds is not None:
oprot.writeFieldBegin('fileIds', TType.LIST, 1)
oprot.writeListBegin(TType.I64, len(self.fileIds))
- for iter591 in self.fileIds:
- oprot.writeI64(iter591)
+ for iter626 in self.fileIds:
+ oprot.writeI64(iter626)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.expr is not None:
@@ -13380,11 +13957,11 @@ class GetFileMetadataResult:
if fid == 1:
if ftype == TType.MAP:
self.metadata = {}
- (_ktype593, _vtype594, _size592 ) = iprot.readMapBegin()
- for _i596 in xrange(_size592):
- _key597 = iprot.readI64()
- _val598 = iprot.readString()
- self.metadata[_key597] = _val598
+ (_ktype628, _vtype629, _size627 ) = iprot.readMapBegin()
+ for _i631 in xrange(_size627):
+ _key632 = iprot.readI64()
+ _val633 = iprot.readString()
+ self.metadata[_key632] = _val633
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -13406,9 +13983,9 @@ class GetFileMetadataResult:
if self.metadata is not None:
oprot.writeFieldBegin('metadata', TType.MAP, 1)
oprot.writeMapBegin(TType.I64, TType.STRING, len(self.metadata))
- for kiter599,viter600 in self.metadata.items():
- oprot.writeI64(kiter599)
- oprot.writeString(viter600)
+ for kiter634,viter635 in self.metadata.items():
+ oprot.writeI64(kiter634)
+ oprot.writeString(viter635)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.isSupported is not None:
@@ -13469,10 +14046,10 @@ class GetFileMetadataRequest:
if fid == 1:
if ftype == TType.LIST:
self.fileIds = []
- (_etype604, _size601) = iprot.readListBegin()
- for _i605 in xrange(_size601):
- _elem606 = iprot.readI64()
- self.fileIds.append(_elem606)
+ (_etype639, _size636) = iprot.readListBegin()
+ for _i640 in xrange(_size636):
+ _elem641 = iprot.readI64()
+ self.fileIds.append(_elem641)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -13489,8 +14066,8 @@ class GetFileMetadataRequest:
if self.fileIds is not None:
oprot.writeFieldBegin('fileIds', TType.LIST, 1)
oprot.writeListBegin(TType.I64, len(self.fileIds))
- for iter607 in self.fileIds:
- oprot.writeI64(iter607)
+ for iter642 in self.fileIds:
+ oprot.writeI64(iter642)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -13596,20 +14173,20 @@ class PutFileMetadataRequest:
if fid == 1:
if ftype == TType.LIST:
self.fileIds = []
- (_etype611, _size608) = iprot.readListBegin()
- for _i612 in xrange(_size608):
- _elem613 = iprot.readI64()
- self.fileIds.append(_elem613)
+ (_etype646, _size643) = iprot.readListBegin()
+ for _i647 in xrange(_size643):
+ _elem648 = iprot.readI64()
+ self.fileIds.append(_elem648)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.LIST:
self.metadata = []
- (_etype617, _size614) = iprot.readListBegin()
- for _i618 in xrange(_size614):
- _elem619 = iprot.readString()
- self.metadata.append(_elem619)
+ (_etype652, _size649) = iprot.readListBegin()
+ for _i653 in xrange(_size649):
+ _elem654 = iprot.readString()
+ self.metadata.append(_elem654)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -13631,15 +14208,15 @@ class PutFileMetadataRequest:
if self.fileIds is not None:
oprot.writeFieldBegin('fileIds', TType.LIST, 1)
oprot.writeListBegin(TType.I64, len(self.fileIds))
- for iter620 in self.fileIds:
- oprot.writeI64(iter620)
+ for iter655 in self.fileIds:
+ oprot.writeI64(iter655)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.metadata is not None:
oprot.writeFieldBegin('metadata', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.metadata))
- for iter621 in self.metadata:
- oprot.writeString(iter621)
+ for iter656 in self.metadata:
+ oprot.writeString(iter656)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.type is not None:
@@ -13747,10 +14324,10 @@ class ClearFileMetadataRequest:
if fid == 1:
if ftype == TType.LIST:
self.fileIds = []
- (_etype625, _size622) = iprot.readListBegin()
- for _i626 in xrange(_size622):
- _elem627 = iprot.readI64()
- self.fileIds.append(_elem627)
+ (_etype660, _size657) = iprot.readListBegin()
+ for _i661 in xrange(_size657):
+ _elem662 = iprot.readI64()
+ self.fileIds.append(_elem662)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -13767,8 +14344,8 @@ class ClearFileMetadataRequest:
if self.fileIds is not None:
oprot.writeFieldBegin('fileIds', TType.LIST, 1)
oprot.writeListBegin(TType.I64, len(self.fileIds))
- for iter628 in self.fileIds:
- oprot.writeI64(iter628)
+ for iter663 in self.fileIds:
+ oprot.writeI64(iter663)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -13997,11 +14574,11 @@ class GetAllFunctionsResponse:
if fid == 1:
if ftype == TType.LIST:
self.functions = []
- (_etype632, _size629) = iprot.readListBegin()
- for _i633 in xrange(_size629):
- _elem634 = Function()
- _elem634.read(iprot)
- self.functions.append(_elem634)
+ (_etype667, _size664) = iprot.readListBegin()
+ for _i668 in xrange(_size664):
+ _elem669 = Function()
+ _elem669.read(iprot)
+ self.functions.append(_elem669)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -14018,8 +14595,8 @@ class GetAllFunctionsResponse:
if self.functions is not None:
oprot.writeFieldBegin('functions', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.functions))
- for iter635 in self.functions:
- iter635.write(oprot)
+ for iter670 in self.functions:
+ iter670.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -14071,10 +14648,10 @@ class ClientCapabilities:
if fid == 1:
if ftype == TType.LIST:
self.values = []
- (_etype639, _size636) = iprot.readListBegin()
- for _i640 in xrange(_size636):
- _elem641 = iprot.readI32()
- self.values.append(_elem641)
+ (_etype674, _size671) = iprot.readListBegin()
+ for _i675 in xrange(_size671):
+ _elem676 = iprot.readI32()
+ self.values.append(_elem676)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -14091,8 +14668,8 @@ class ClientCapabilities:
if self.values is not None:
oprot.writeFieldBegin('values', TType.LIST, 1)
oprot.writeListBegin(TType.I32, len(self.values))
- for iter642 in self.values:
- oprot.writeI32(iter642)
+ for iter677 in self.values:
+ oprot.writeI32(iter677)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -14321,10 +14898,10 @@ class GetTablesRequest:
elif fid == 2:
if ftype == TType.LIST:
self.tblNames = []
- (_etype646, _size643) = iprot.readListBegin()
- for _i647 in xrange(_size643):
- _elem648 = iprot.readString()
- self.tblNames.append(_elem648)
+ (_etype681, _size678) = iprot.readListBegin()
+ for _i682 in xrange(_size678):
+ _elem683 = iprot.readString()
+ self.tblNames.append(_elem683)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -14351,8 +14928,8 @@ class GetTablesRequest:
if self.tblNames is not None:
oprot.writeFieldBegin('tblNames', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.tblNames))
- for iter649 in self.tblNames:
- oprot.writeString(iter649)
+ for iter684 in self.tblNames:
+ oprot.writeString(iter684)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.capabilities is not None:
@@ -14412,11 +14989,11 @@ class GetTablesResult:
if fid == 1:
if ftype == TType.LIST:
self.tables = []
- (_etype653, _size650) = iprot.readListBegin()
- for _i654 in xrange(_size650):
- _elem655 = Table()
- _elem655.read(iprot)
- self.tables.append(_elem655)
+ (_etype688, _size685) = iprot.readListBegin()
+ for _i689 in xrange(_size685):
+ _elem690 = Table()
+ _elem690.read(iprot)
+ self.tables.append(_elem690)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -14433,8 +15010,8 @@ class GetTablesResult:
if self.tables is not None:
oprot.writeFieldBegin('tables', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.tables))
- for iter656 in self.tables:
- iter656.write(oprot)
+ for iter691 in self.tables:
+ iter691.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -14732,10 +15309,10 @@ class Materialization:
if fid == 1:
if ftype == TType.SET:
self.tablesUsed = set()
- (_etype660, _size657) = iprot.readSetBegin()
- for _i661 in xrange(_size657):
- _elem662 = iprot.readString()
- self.tablesUsed.add(_elem662)
+ (_etype695, _size692) = iprot.readSetBegin()
+ for _i696 in xrange(_size692):
+ _elem697 = iprot.readString()
+ self.tablesUsed.add(_elem697)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -14762,8 +15339,8 @@ class Materialization:
if self.tablesUsed is not None:
oprot.writeFieldBegin('tablesUsed', TType.SET, 1)
oprot.writeSetBegin(TType.STRING, len(self.tablesUsed))
- for iter663 in self.tablesUsed:
- oprot.writeString(iter663)
+ for iter698 in self.tablesUsed:
+ oprot.writeString(iter698)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.validTxnList is not None:
@@ -15667,44 +16244,44 @@ class WMFullResourcePlan:
elif fid == 2:
if ftype == TType.LIST:
self.pools = []
- (_etype667, _size664) = iprot.readListBegin()
- for _i668 in xrange(_size664):
- _elem669 = WMPool()
- _elem669.read(iprot)
- self.pools.append(_elem669)
+ (_etype702, _size699) = iprot.readListBegin()
+ for _i703 in xrange(_size699):
+ _elem704 = WMPool()
+ _elem704.read(iprot)
+ self.pools.append(_elem704)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.LIST:
self.mappings = []
- (_etype673, _size670) = iprot.readListBegin()
- for _i674 in xrange(_size670):
- _elem675 = WMMapping()
- _elem675.read(iprot)
- self.mappings.append(_elem675)
+ (_etype708, _size705) = iprot.readListBegin()
+ for _i709 in xrange(_size705):
+ _elem710 = WMMapping()
+ _elem710.read(iprot)
+ self.mappings.append(_elem710)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.LIST:
self.triggers = []
- (_etype679, _size676) = iprot.readListBegin()
- for _i680 in xrange(_size676):
- _elem681 = WMTrigger()
- _elem681.read(iprot)
- self.triggers.append(_elem681)
+ (_etype714, _size711) = iprot.readListBegin()
+ for _i715 in xrange(_size711):
+ _elem716 = WMTrigger()
+ _elem716.read(iprot)
+ self.triggers.append(_elem716)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 5:
if ftype == TType.LIST:
self.poolTriggers = []
- (_etype685, _size682) = iprot.readListBegin()
- for _i686 in xrange(_size682):
- _elem687 = WMPoolTrigger()
- _elem687.read(iprot)
- self.poolTriggers.append(_elem687)
+ (_etype720, _size717) = iprot.readListBegin()
+ for _i721 in xrange(_size717):
+ _elem722 = WMPoolTrigger()
+ _elem722.read(iprot)
+ self.poolTriggers.append(_elem722)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -15725,29 +16302,29 @@ class WMFullResourcePlan:
if self.pools is not None:
oprot.writeFieldBegin('pools', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.pools))
- for iter688 in self.pools:
- iter688.write(oprot)
+ for iter723 in self.pools:
+ iter723.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.mappings is not None:
oprot.writeFieldBegin('mappings', TType.LIST, 3)
oprot.writeListBegin(TType.STRUCT, len(self.mappings))
- for iter689 in self.mappings:
- iter689.write(oprot)
+ for iter724 in self.mappings:
+ iter724.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.triggers is not None:
oprot.writeFieldBegin('triggers', TType.LIST, 4)
oprot.writeListBegin(TType.STRUCT, len(self.triggers))
- for iter690 in self.triggers:
- iter690.write(oprot)
+ for iter725 in self.triggers:
+ iter725.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.poolTriggers is not None:
oprot.writeFieldBegin('poolTriggers', TType.LIST, 5)
oprot.writeListBegin(TType.STRUCT, len(self.poolTriggers))
- for iter691 in self.poolTriggers:
- iter691.write(oprot)
+ for iter726 in self.poolTriggers:
+ iter726.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -16221,11 +16798,11 @@ class WMGetAllResourcePlanResponse:
if fid == 1:
if ftype == TType.LIST:
self.resourcePlans = []
- (_etype695, _size692) = iprot.readListBegin()
- for _i696 in xrange(_size692):
- _elem697 = WMResourcePlan()
- _elem697.read(iprot)
- self.resourcePlans.append(_elem697)
+ (_etype730, _size727) = iprot.readListBegin()
+ for _i731 in xrange(_size727):
+ _elem732 = WMResourcePlan()
+ _elem732.read(iprot)
+ self.resourcePlans.append(_elem732)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -16242,8 +16819,8 @@ class WMGetAllResourcePlanResponse:
if self.resourcePlans is not None:
oprot.writeFieldBegin('resourcePlans', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.resourcePlans))
- for iter698 in self.resourcePlans:
- iter698.write(oprot)
+ for iter733 in self.resourcePlans:
+ iter733.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -16547,20 +17124,20 @@ class WMValidateResourcePlanResponse:
if fid == 1:
if ftype == TType.LIST:
self.errors = []
- (_etype702, _size699) = iprot.readListBegin()
- for _i703 in xrange(_size699):
- _elem704 = iprot.readString()
- self.errors.append(_elem704)
+ (_etype737, _size734) = iprot.readListBegin()
+ for _i738 in xrange(_size734):
+ _elem739 = iprot.readString()
+ self.errors.append(_elem739)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.LIST:
self.warnings = []
- (_etype708, _size705) = iprot.readListBegin()
- for _i709 in xrange(_size705):
- _elem710 = iprot.readString()
- self.warnings.append(_elem710)
+ (_etype743, _size740) = iprot.readListBegin()
+ for _i744 in xrange(_size740):
+ _elem745 = iprot.readString()
+ self.warnings.append(_elem745)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -16577,15 +17154,15 @@ class WMValidateResourcePlanResponse:
if self.errors is not None:
oprot.writeFieldBegin('errors', TType.LIST, 1)
oprot.writeListBegin(TType.STRING, len(self.errors))
- for iter711 in self.errors:
- oprot.writeString(iter711)
+ for iter746 in self.errors:
+ oprot.writeString(iter746)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.warnings is not None:
oprot.writeFieldBegin('warnings', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.warnings))
- for iter712 in self.warnings:
- oprot.writeString(iter712)
+ for iter747 in self.warnings:
+ oprot.writeString(iter747)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -17162,11 +17739,11 @@ class WMGetTriggersForResourePlanResponse:
if fid == 1:
if ftype == TType.LIST:
self.triggers = []
- (_etype716, _size713) = iprot.readListBegin()
- for _i717 in xrange(_size713):
- _elem718 = WMTrigger()
- _elem718.read(iprot)
- self.triggers.append(_elem718)
+ (_etype751, _size748) = iprot.readListBegin()
+ for _i752 in xrange(_size748):
+ _elem753 = WMTrigger()
+ _elem753.read(iprot)
+ self.triggers.append(_elem753)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -17183,8 +17760,8 @@ class WMGetTriggersForResourePlanResponse:
if self.triggers is not None:
oprot.writeFieldBegin('triggers', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.triggers))
- for iter719 in self.triggers:
- iter719.write(oprot)
+ for iter754 in self.triggers:
+ iter754.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
index 5faf5ea..625baae 100644
--- a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
+++ b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
@@ -2220,6 +2220,131 @@ class CommitTxnRequest
::Thrift::Struct.generate_accessors self
end
+class GetValidWriteIdsRequest
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ FULLTABLENAMES = 1
+ VALIDTXNLIST = 2
+
+ FIELDS = {
+ FULLTABLENAMES => {:type => ::Thrift::Types::LIST, :name => 'fullTableNames', :element => {:type => ::Thrift::Types::STRING}},
+ VALIDTXNLIST => {:type => ::Thrift::Types::STRING, :name => 'validTxnList'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fullTableNames is unset!') unless @fullTableNames
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field validTxnList is unset!') unless @validTxnList
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class TableValidWriteIds
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ FULLTABLENAME = 1
+ WRITEIDHIGHWATERMARK = 2
+ INVALIDWRITEIDS = 3
+ MINOPENWRITEID = 4
+ ABORTEDBITS = 5
+
+ FIELDS = {
+ FULLTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'fullTableName'},
+ WRITEIDHIGHWATERMARK => {:type => ::Thrift::Types::I64, :name => 'writeIdHighWaterMark'},
+ INVALIDWRITEIDS => {:type => ::Thrift::Types::LIST, :name => 'invalidWriteIds', :element => {:type => ::Thrift::Types::I64}},
+ MINOPENWRITEID => {:type => ::Thrift::Types::I64, :name => 'minOpenWriteId', :optional => true},
+ ABORTEDBITS => {:type => ::Thrift::Types::STRING, :name => 'abortedBits', :binary => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fullTableName is unset!') unless @fullTableName
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field writeIdHighWaterMark is unset!') unless @writeIdHighWaterMark
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field invalidWriteIds is unset!') unless @invalidWriteIds
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field abortedBits is unset!') unless @abortedBits
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class GetValidWriteIdsResponse
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ TBLVALIDWRITEIDS = 1
+
+ FIELDS = {
+ TBLVALIDWRITEIDS => {:type => ::Thrift::Types::LIST, :name => 'tblValidWriteIds', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TableValidWriteIds}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblValidWriteIds is unset!') unless @tblValidWriteIds
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class AllocateTableWriteIdsRequest
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ TXNIDS = 1
+ DBNAME = 2
+ TABLENAME = 3
+
+ FIELDS = {
+ TXNIDS => {:type => ::Thrift::Types::LIST, :name => 'txnIds', :element => {:type => ::Thrift::Types::I64}},
+ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
+ TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnIds is unset!') unless @txnIds
+ 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
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class TxnToWriteId
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ TXNID = 1
+ WRITEID = 2
+
+ FIELDS = {
+ TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId'},
+ WRITEID => {:type => ::Thrift::Types::I64, :name => 'writeId'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnId is unset!') unless @txnId
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field writeId is unset!') unless @writeId
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class AllocateTableWriteIdsResponse
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ TXNTOWRITEIDS = 1
+
+ FIELDS = {
+ TXNTOWRITEIDS => {:type => ::Thrift::Types::LIST, :name => 'txnToWriteIds', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TxnToWriteId}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnToWriteIds is unset!') unless @txnToWriteIds
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
class LockComponent
include ::Thrift::Struct, ::Thrift::Struct_Union
TYPE = 1
@@ -2642,13 +2767,15 @@ end
class AddDynamicPartitions
include ::Thrift::Struct, ::Thrift::Struct_Union
TXNID = 1
- DBNAME = 2
- TABLENAME = 3
- PARTITIONNAMES = 4
- OPERATIONTYPE = 5
+ WRITEID = 2
+ DBNAME = 3
+ TABLENAME = 4
+ PARTITIONNAMES = 5
+ OPERATIONTYPE = 6
FIELDS = {
TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'},
+ WRITEID => {:type => ::Thrift::Types::I64, :name => 'writeid'},
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
PARTITIONNAMES => {:type => ::Thrift::Types::LIST, :name => 'partitionnames', :element => {:type => ::Thrift::Types::STRING}},
@@ -2659,6 +2786,7 @@ class AddDynamicPartitions
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field writeid is unset!') unless @writeid
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 partitionnames is unset!') unless @partitionnames
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb b/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
index 640499e..167bda2 100644
--- a/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
+++ b/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
@@ -2405,6 +2405,41 @@ module ThriftHiveMetastore
return
end
+ def get_valid_write_ids(rqst)
+ send_get_valid_write_ids(rqst)
+ return recv_get_valid_write_ids()
+ end
+
+ def send_get_valid_write_ids(rqst)
+ send_message('get_valid_write_ids', Get_valid_write_ids_args, :rqst => rqst)
+ end
+
+ def recv_get_valid_write_ids()
+ result = receive_message(Get_valid_write_ids_result)
+ return result.success unless result.success.nil?
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_valid_write_ids failed: unknown result')
+ end
+
+ def allocate_table_write_ids(rqst)
+ send_allocate_table_write_ids(rqst)
+ return recv_allocate_table_write_ids()
+ end
+
+ def send_allocate_table_write_ids(rqst)
+ send_message('allocate_table_write_ids', Allocate_table_write_ids_args, :rqst => rqst)
+ end
+
+ def recv_allocate_table_write_ids()
+ result = receive_message(Allocate_table_write_ids_result)
+ return result.success unless result.success.nil?
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ raise result.o3 unless result.o3.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'allocate_table_write_ids failed: unknown result')
+ end
+
def lock(rqst)
send_lock(rqst)
return recv_lock()
@@ -4884,6 +4919,34 @@ module ThriftHiveMetastore
write_result(result, oprot, 'commit_txn', seqid)
end
+ def process_get_valid_write_ids(seqid, iprot, oprot)
+ args = read_args(iprot, Get_valid_write_ids_args)
+ result = Get_valid_write_ids_result.new()
+ begin
+ result.success = @handler.get_valid_write_ids(args.rqst)
+ rescue ::NoSuchTxnException => o1
+ result.o1 = o1
+ rescue ::MetaException => o2
+ result.o2 = o2
+ end
+ write_result(result, oprot, 'get_valid_write_ids', seqid)
+ end
+
+ def process_allocate_table_write_ids(seqid, iprot, oprot)
+ args = read_args(iprot, Allocate_table_write_ids_args)
+ result = Allocate_table_write_ids_result.new()
+ begin
+ result.success = @handler.allocate_table_write_ids(args.rqst)
+ rescue ::NoSuchTxnException => o1
+ result.o1 = o1
+ rescue ::TxnAbortedException => o2
+ result.o2 = o2
+ rescue ::MetaException => o3
+ result.o3 = o3
+ end
+ write_result(result, oprot, 'allocate_table_write_ids', seqid)
+ end
+
def process_lock(seqid, iprot, oprot)
args = read_args(iprot, Lock_args)
result = Lock_result.new()
@@ -10779,6 +10842,80 @@ module ThriftHiveMetastore
::Thrift::Struct.generate_accessors self
end
+ class Get_valid_write_ids_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ RQST = 1
+
+ FIELDS = {
+ RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::GetValidWriteIdsRequest}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Get_valid_write_ids_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ O1 = 1
+ O2 = 2
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetValidWriteIdsResponse},
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Allocate_table_write_ids_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ RQST = 1
+
+ FIELDS = {
+ RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::AllocateTableWriteIdsRequest}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Allocate_table_write_ids_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ O1 = 1
+ O2 = 2
+ O3 = 3
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::AllocateTableWriteIdsResponse},
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException},
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
class Lock_args
include ::Thrift::Struct, ::Thrift::Struct_Union
RQST = 1
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index 47de215..c6e34a8 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -6691,6 +6691,17 @@ public class HiveMetaStore extends ThriftHiveMetastore {
}
@Override
+ public GetValidWriteIdsResponse get_valid_write_ids(GetValidWriteIdsRequest rqst) throws TException {
+ return getTxnHandler().getValidWriteIds(rqst);
+ }
+
+ @Override
+ public AllocateTableWriteIdsResponse allocate_table_write_ids(
+ AllocateTableWriteIdsRequest rqst) throws TException {
+ return getTxnHandler().allocateTableWriteIds(rqst);
+ }
+
+ @Override
public LockResponse lock(LockRequest rqst) throws TException {
return getTxnHandler().lock(rqst);
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
index 5b62114..14ba4ea 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
@@ -48,12 +48,13 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.security.auth.login.LoginException;
-import org.apache.commons.lang.ArrayUtils;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.common.StatsSetupConst;
import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.metastore.api.*;
import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
@@ -2231,6 +2232,20 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
}
@Override
+ public ValidWriteIdList getValidWriteIds(String fullTableName) throws TException {
+ GetValidWriteIdsRequest rqst = new GetValidWriteIdsRequest(Collections.singletonList(fullTableName), null);
+ GetValidWriteIdsResponse validWriteIds = client.get_valid_write_ids(rqst);
+ return TxnUtils.createValidReaderWriteIdList(validWriteIds.getTblValidWriteIds().get(0));
+ }
+
+ @Override
+ public ValidTxnWriteIdList getValidWriteIds(Long currentTxnId, List<String> tablesList, String validTxnList)
+ throws TException {
+ GetValidWriteIdsRequest rqst = new GetValidWriteIdsRequest(tablesList, validTxnList);
+ return TxnUtils.createValidTxnWriteIdList(currentTxnId, client.get_valid_write_ids(rqst));
+ }
+
+ @Override
public long openTxn(String user) throws TException {
OpenTxnsResponse txns = openTxns(user, 1);
return txns.getTxn_ids().get(0);
@@ -2270,6 +2285,19 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
}
@Override
+ public long allocateTableWriteId(long txnId, String dbName, String tableName) throws TException {
+ return allocateTableWriteIdsBatch(Collections.singletonList(txnId), dbName, tableName).get(0).getWriteId();
+ }
+
+ @Override
+ public List<TxnToWriteId> allocateTableWriteIdsBatch(List<Long> txnIds, String dbName, String tableName)
+ throws TException {
+ AllocateTableWriteIdsRequest rqst = new AllocateTableWriteIdsRequest(txnIds, dbName, tableName);
+ AllocateTableWriteIdsResponse writeIds = client.allocate_table_write_ids(rqst);
+ return writeIds.getTxnToWriteIds();
+ }
+
+ @Override
public LockResponse lock(LockRequest request)
throws NoSuchTxnException, TxnAbortedException, TException {
return client.lock(request);
@@ -2354,14 +2382,14 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
@Deprecated
@Override
- public void addDynamicPartitions(long txnId, String dbName, String tableName,
+ public void addDynamicPartitions(long txnId, long writeId, String dbName, String tableName,
List<String> partNames) throws TException {
- client.add_dynamic_partitions(new AddDynamicPartitions(txnId, dbName, tableName, partNames));
+ client.add_dynamic_partitions(new AddDynamicPartitions(txnId, writeId, dbName, tableName, partNames));
}
@Override
- public void addDynamicPartitions(long txnId, String dbName, String tableName,
+ public void addDynamicPartitions(long txnId, long writeId, String dbName, String tableName,
List<String> partNames, DataOperationType operationType) throws TException {
- AddDynamicPartitions adp = new AddDynamicPartitions(txnId, dbName, tableName, partNames);
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnId, writeId, dbName, tableName, partNames);
adp.setOperationType(operationType);
client.add_dynamic_partitions(adp);
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
index 143b04f..43aeeb3 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
@@ -29,6 +29,8 @@ import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.common.classification.RetrySemantics;
import org.apache.hadoop.hive.metastore.annotation.NoReconnect;
import org.apache.hadoop.hive.metastore.api.AggrStats;
@@ -100,6 +102,7 @@ import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.hive.metastore.api.TableMeta;
import org.apache.hadoop.hive.metastore.api.TxnAbortedException;
import org.apache.hadoop.hive.metastore.api.TxnOpenException;
+import org.apache.hadoop.hive.metastore.api.TxnToWriteId;
import org.apache.hadoop.hive.metastore.api.UniqueConstraintsRequest;
import org.apache.hadoop.hive.metastore.api.UnknownDBException;
import org.apache.hadoop.hive.metastore.api.UnknownPartitionException;
@@ -1353,14 +1356,34 @@ public interface IMetaStoreClient {
/**
* Get a structure that details valid transactions.
- * @param currentTxn The current transaction of the caller. This will be removed from the
+ * @param currentTxn The current transaction of the caller. This will be removed from the
* exceptions list so that the caller sees records from his own transaction.
- * @return list of valid transactions
+ * @return list of valid transactions and also valid write IDs for each input table.
* @throws TException
*/
ValidTxnList getValidTxns(long currentTxn) throws TException;
/**
+ * Get a structure that details valid transactions.
+ * @param fullTableName full table name of format <db_name>.<table_name>
+ * @return list of valid write ids for the given table
+ * @throws TException
+ */
+ ValidWriteIdList getValidWriteIds(String fullTableName) throws TException;
+
+ /**
+ * Get a structure that details valid write ids list for all tables read by current txn.
+ * @param currentTxnId current txn ID for which we try to get valid write ids list
+ * @param tablesList list of tables (format: <db_name>.<table_name>) read from the current transaction
+ * for which needs to populate the valid write ids
+ * @param validTxnList snapshot of valid txns for the current txn
+ * @return list of valid write ids for the given list of tables.
+ * @throws TException
+ */
+ ValidTxnWriteIdList getValidWriteIds(Long currentTxnId, List<String> tablesList, String validTxnList)
+ throws TException;
+
+ /**
* Initiate a transaction.
* @param user User who is opening this transaction. This is the Hive user,
* not necessarily the OS user. It is assumed that this user has already been
@@ -1429,6 +1452,24 @@ public interface IMetaStoreClient {
void abortTxns(List<Long> txnids) throws TException;
/**
+ * Allocate a per table write ID and associate it with the given transaction.
+ * @param txnId id of transaction to which the allocated write ID to be associated.
+ * @param dbName name of DB in which the table belongs.
+ * @param tableName table to which the write ID to be allocated
+ * @throws TException
+ */
+ long allocateTableWriteId(long txnId, String dbName, String tableName) throws TException;
+
+ /**
+ * Allocate a per table write ID and associate it with the given transaction.
+ * @param txnIds ids of transaction batchto which the allocated write ID to be associated.
+ * @param dbName name of DB in which the table belongs.
+ * @param tableName table to which the write ID to be allocated
+ * @throws TException
+ */
+ List<TxnToWriteId> allocateTableWriteIdsBatch(List<Long> txnIds, String dbName, String tableName) throws TException;
+
+ /**
* Show the list of currently open transactions. This is for use by "show transactions" in the
* grammar, not for applications that want to find a list of current transactions to work with.
* Those wishing the latter should call {@link #getValidTxns()}.
@@ -1610,18 +1651,19 @@ public interface IMetaStoreClient {
* @deprecated in Hive 1.3.0/2.1.0 - will be removed in 2 releases
*/
@Deprecated
- void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames)
+ void addDynamicPartitions(long txnId, long writeId, String dbName, String tableName, List<String> partNames)
throws TException;
/**
* Send a list of partitions to the metastore to indicate which partitions were loaded
* dynamically.
* @param txnId id of the transaction
+ * @param writeId table write id for this txn
* @param dbName database name
* @param tableName table name
* @param partNames partition name, as constructed by Warehouse.makePartName
* @throws TException
*/
- void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames,
+ void addDynamicPartitions(long txnId, long writeId, String dbName, String tableName, List<String> partNames,
DataOperationType operationType)
throws TException;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java
index 41e428b..b74f69d 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionInfo.java
@@ -17,9 +17,9 @@
*/
package org.apache.hadoop.hive.metastore.txn;
-import org.apache.hadoop.hive.common.ValidCompactorTxnList;
+import org.apache.hadoop.hive.common.ValidCompactorWriteIdList;
import org.apache.hadoop.hive.metastore.api.CompactionType;
-import org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse;
+import org.apache.hadoop.hive.metastore.api.TableValidWriteIds;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -42,11 +42,11 @@ public class CompactionInfo implements Comparable<CompactionInfo> {
public boolean tooManyAborts = false;
/**
* {@code 0} means it wasn't set (e.g. in case of upgrades, since ResultSet.getLong() will return 0 if field is NULL)
- * See {@link TxnStore#setCompactionHighestTxnId(CompactionInfo, long)} for precise definition.
- * See also {@link TxnUtils#createValidCompactTxnList(GetOpenTxnsInfoResponse)} and
- * {@link ValidCompactorTxnList#highWatermark}
+ * See {@link TxnStore#setCompactionHighestWriteId(CompactionInfo, long)} for precise definition.
+ * See also {@link TxnUtils#createValidCompactWriteIdList(TableValidWriteIds)} and
+ * {@link ValidCompactorWriteIdList#highWatermark}.
*/
- public long highestTxnId;
+ public long highestWriteId;
byte[] metaInfo;
String hadoopJobId;
@@ -107,7 +107,7 @@ public class CompactionInfo implements Comparable<CompactionInfo> {
"properties:" + properties + "," +
"runAs:" + runAs + "," +
"tooManyAborts:" + tooManyAborts + "," +
- "highestTxnId:" + highestTxnId;
+ "highestWriteId:" + highestWriteId;
}
/**
@@ -127,7 +127,7 @@ public class CompactionInfo implements Comparable<CompactionInfo> {
fullCi.workerId = rs.getString(8);
fullCi.start = rs.getLong(9);
fullCi.runAs = rs.getString(10);
- fullCi.highestTxnId = rs.getLong(11);
+ fullCi.highestWriteId = rs.getLong(11);
fullCi.metaInfo = rs.getBytes(12);
fullCi.hadoopJobId = rs.getString(13);
return fullCi;
@@ -144,7 +144,7 @@ public class CompactionInfo implements Comparable<CompactionInfo> {
pStmt.setLong(9, ci.start);
pStmt.setLong(10, endTime);
pStmt.setString(11, ci.runAs);
- pStmt.setLong(12, ci.highestTxnId);
+ pStmt.setLong(12, ci.highestWriteId);
pStmt.setBytes(13, ci.metaInfo);
pStmt.setString(14, ci.hadoopJobId);
}
[09/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
index 4bdca8c..e4089c5 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
@@ -547,13 +547,13 @@ import org.slf4j.LoggerFactory;
case 1: // FILE_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list690 = iprot.readListBegin();
- struct.fileIds = new ArrayList<Long>(_list690.size);
- long _elem691;
- for (int _i692 = 0; _i692 < _list690.size; ++_i692)
+ org.apache.thrift.protocol.TList _list730 = iprot.readListBegin();
+ struct.fileIds = new ArrayList<Long>(_list730.size);
+ long _elem731;
+ for (int _i732 = 0; _i732 < _list730.size; ++_i732)
{
- _elem691 = iprot.readI64();
- struct.fileIds.add(_elem691);
+ _elem731 = iprot.readI64();
+ struct.fileIds.add(_elem731);
}
iprot.readListEnd();
}
@@ -565,13 +565,13 @@ import org.slf4j.LoggerFactory;
case 2: // METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list693 = iprot.readListBegin();
- struct.metadata = new ArrayList<ByteBuffer>(_list693.size);
- ByteBuffer _elem694;
- for (int _i695 = 0; _i695 < _list693.size; ++_i695)
+ org.apache.thrift.protocol.TList _list733 = iprot.readListBegin();
+ struct.metadata = new ArrayList<ByteBuffer>(_list733.size);
+ ByteBuffer _elem734;
+ for (int _i735 = 0; _i735 < _list733.size; ++_i735)
{
- _elem694 = iprot.readBinary();
- struct.metadata.add(_elem694);
+ _elem734 = iprot.readBinary();
+ struct.metadata.add(_elem734);
}
iprot.readListEnd();
}
@@ -605,9 +605,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
- for (long _iter696 : struct.fileIds)
+ for (long _iter736 : struct.fileIds)
{
- oprot.writeI64(_iter696);
+ oprot.writeI64(_iter736);
}
oprot.writeListEnd();
}
@@ -617,9 +617,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(METADATA_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
- for (ByteBuffer _iter697 : struct.metadata)
+ for (ByteBuffer _iter737 : struct.metadata)
{
- oprot.writeBinary(_iter697);
+ oprot.writeBinary(_iter737);
}
oprot.writeListEnd();
}
@@ -651,16 +651,16 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.fileIds.size());
- for (long _iter698 : struct.fileIds)
+ for (long _iter738 : struct.fileIds)
{
- oprot.writeI64(_iter698);
+ oprot.writeI64(_iter738);
}
}
{
oprot.writeI32(struct.metadata.size());
- for (ByteBuffer _iter699 : struct.metadata)
+ for (ByteBuffer _iter739 : struct.metadata)
{
- oprot.writeBinary(_iter699);
+ oprot.writeBinary(_iter739);
}
}
BitSet optionals = new BitSet();
@@ -677,24 +677,24 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list700 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.fileIds = new ArrayList<Long>(_list700.size);
- long _elem701;
- for (int _i702 = 0; _i702 < _list700.size; ++_i702)
+ org.apache.thrift.protocol.TList _list740 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.fileIds = new ArrayList<Long>(_list740.size);
+ long _elem741;
+ for (int _i742 = 0; _i742 < _list740.size; ++_i742)
{
- _elem701 = iprot.readI64();
- struct.fileIds.add(_elem701);
+ _elem741 = iprot.readI64();
+ struct.fileIds.add(_elem741);
}
}
struct.setFileIdsIsSet(true);
{
- org.apache.thrift.protocol.TList _list703 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.metadata = new ArrayList<ByteBuffer>(_list703.size);
- ByteBuffer _elem704;
- for (int _i705 = 0; _i705 < _list703.size; ++_i705)
+ org.apache.thrift.protocol.TList _list743 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.metadata = new ArrayList<ByteBuffer>(_list743.size);
+ ByteBuffer _elem744;
+ for (int _i745 = 0; _i745 < _list743.size; ++_i745)
{
- _elem704 = iprot.readBinary();
- struct.metadata.add(_elem704);
+ _elem744 = iprot.readBinary();
+ struct.metadata.add(_elem744);
}
}
struct.setMetadataIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
index 5687b19..fb7b94e 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
case 1: // COMPACTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list598 = iprot.readListBegin();
- struct.compacts = new ArrayList<ShowCompactResponseElement>(_list598.size);
- ShowCompactResponseElement _elem599;
- for (int _i600 = 0; _i600 < _list598.size; ++_i600)
+ org.apache.thrift.protocol.TList _list638 = iprot.readListBegin();
+ struct.compacts = new ArrayList<ShowCompactResponseElement>(_list638.size);
+ ShowCompactResponseElement _elem639;
+ for (int _i640 = 0; _i640 < _list638.size; ++_i640)
{
- _elem599 = new ShowCompactResponseElement();
- _elem599.read(iprot);
- struct.compacts.add(_elem599);
+ _elem639 = new ShowCompactResponseElement();
+ _elem639.read(iprot);
+ struct.compacts.add(_elem639);
}
iprot.readListEnd();
}
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(COMPACTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.compacts.size()));
- for (ShowCompactResponseElement _iter601 : struct.compacts)
+ for (ShowCompactResponseElement _iter641 : struct.compacts)
{
- _iter601.write(oprot);
+ _iter641.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.compacts.size());
- for (ShowCompactResponseElement _iter602 : struct.compacts)
+ for (ShowCompactResponseElement _iter642 : struct.compacts)
{
- _iter602.write(oprot);
+ _iter642.write(oprot);
}
}
}
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list603 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.compacts = new ArrayList<ShowCompactResponseElement>(_list603.size);
- ShowCompactResponseElement _elem604;
- for (int _i605 = 0; _i605 < _list603.size; ++_i605)
+ org.apache.thrift.protocol.TList _list643 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.compacts = new ArrayList<ShowCompactResponseElement>(_list643.size);
+ ShowCompactResponseElement _elem644;
+ for (int _i645 = 0; _i645 < _list643.size; ++_i645)
{
- _elem604 = new ShowCompactResponseElement();
- _elem604.read(iprot);
- struct.compacts.add(_elem604);
+ _elem644 = new ShowCompactResponseElement();
+ _elem644.read(iprot);
+ struct.compacts.add(_elem644);
}
}
struct.setCompactsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
index f22deb2..02dd278 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
@@ -350,14 +350,14 @@ import org.slf4j.LoggerFactory;
case 1: // LOCKS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list564 = iprot.readListBegin();
- struct.locks = new ArrayList<ShowLocksResponseElement>(_list564.size);
- ShowLocksResponseElement _elem565;
- for (int _i566 = 0; _i566 < _list564.size; ++_i566)
+ org.apache.thrift.protocol.TList _list604 = iprot.readListBegin();
+ struct.locks = new ArrayList<ShowLocksResponseElement>(_list604.size);
+ ShowLocksResponseElement _elem605;
+ for (int _i606 = 0; _i606 < _list604.size; ++_i606)
{
- _elem565 = new ShowLocksResponseElement();
- _elem565.read(iprot);
- struct.locks.add(_elem565);
+ _elem605 = new ShowLocksResponseElement();
+ _elem605.read(iprot);
+ struct.locks.add(_elem605);
}
iprot.readListEnd();
}
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(LOCKS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.locks.size()));
- for (ShowLocksResponseElement _iter567 : struct.locks)
+ for (ShowLocksResponseElement _iter607 : struct.locks)
{
- _iter567.write(oprot);
+ _iter607.write(oprot);
}
oprot.writeListEnd();
}
@@ -416,9 +416,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetLocks()) {
{
oprot.writeI32(struct.locks.size());
- for (ShowLocksResponseElement _iter568 : struct.locks)
+ for (ShowLocksResponseElement _iter608 : struct.locks)
{
- _iter568.write(oprot);
+ _iter608.write(oprot);
}
}
}
@@ -430,14 +430,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list569 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.locks = new ArrayList<ShowLocksResponseElement>(_list569.size);
- ShowLocksResponseElement _elem570;
- for (int _i571 = 0; _i571 < _list569.size; ++_i571)
+ org.apache.thrift.protocol.TList _list609 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.locks = new ArrayList<ShowLocksResponseElement>(_list609.size);
+ ShowLocksResponseElement _elem610;
+ for (int _i611 = 0; _i611 < _list609.size; ++_i611)
{
- _elem570 = new ShowLocksResponseElement();
- _elem570.read(iprot);
- struct.locks.add(_elem570);
+ _elem610 = new ShowLocksResponseElement();
+ _elem610.read(iprot);
+ struct.locks.add(_elem610);
}
}
struct.setLocksIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java
new file mode 100644
index 0000000..1d43fb8
--- /dev/null
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java
@@ -0,0 +1,851 @@
+/**
+ * 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 TableValidWriteIds implements org.apache.thrift.TBase<TableValidWriteIds, TableValidWriteIds._Fields>, java.io.Serializable, Cloneable, Comparable<TableValidWriteIds> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableValidWriteIds");
+
+ private static final org.apache.thrift.protocol.TField FULL_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fullTableName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField WRITE_ID_HIGH_WATER_MARK_FIELD_DESC = new org.apache.thrift.protocol.TField("writeIdHighWaterMark", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField INVALID_WRITE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("invalidWriteIds", org.apache.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.thrift.protocol.TField MIN_OPEN_WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("minOpenWriteId", org.apache.thrift.protocol.TType.I64, (short)4);
+ private static final org.apache.thrift.protocol.TField ABORTED_BITS_FIELD_DESC = new org.apache.thrift.protocol.TField("abortedBits", org.apache.thrift.protocol.TType.STRING, (short)5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TableValidWriteIdsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TableValidWriteIdsTupleSchemeFactory());
+ }
+
+ private String fullTableName; // required
+ private long writeIdHighWaterMark; // required
+ private List<Long> invalidWriteIds; // required
+ private long minOpenWriteId; // optional
+ private ByteBuffer abortedBits; // 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 {
+ FULL_TABLE_NAME((short)1, "fullTableName"),
+ WRITE_ID_HIGH_WATER_MARK((short)2, "writeIdHighWaterMark"),
+ INVALID_WRITE_IDS((short)3, "invalidWriteIds"),
+ MIN_OPEN_WRITE_ID((short)4, "minOpenWriteId"),
+ ABORTED_BITS((short)5, "abortedBits");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // FULL_TABLE_NAME
+ return FULL_TABLE_NAME;
+ case 2: // WRITE_ID_HIGH_WATER_MARK
+ return WRITE_ID_HIGH_WATER_MARK;
+ case 3: // INVALID_WRITE_IDS
+ return INVALID_WRITE_IDS;
+ case 4: // MIN_OPEN_WRITE_ID
+ return MIN_OPEN_WRITE_ID;
+ case 5: // ABORTED_BITS
+ return ABORTED_BITS;
+ 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 __WRITEIDHIGHWATERMARK_ISSET_ID = 0;
+ private static final int __MINOPENWRITEID_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.MIN_OPEN_WRITE_ID};
+ 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.FULL_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("fullTableName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WRITE_ID_HIGH_WATER_MARK, new org.apache.thrift.meta_data.FieldMetaData("writeIdHighWaterMark", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.INVALID_WRITE_IDS, new org.apache.thrift.meta_data.FieldMetaData("invalidWriteIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ 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.I64))));
+ tmpMap.put(_Fields.MIN_OPEN_WRITE_ID, new org.apache.thrift.meta_data.FieldMetaData("minOpenWriteId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.ABORTED_BITS, new org.apache.thrift.meta_data.FieldMetaData("abortedBits", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableValidWriteIds.class, metaDataMap);
+ }
+
+ public TableValidWriteIds() {
+ }
+
+ public TableValidWriteIds(
+ String fullTableName,
+ long writeIdHighWaterMark,
+ List<Long> invalidWriteIds,
+ ByteBuffer abortedBits)
+ {
+ this();
+ this.fullTableName = fullTableName;
+ this.writeIdHighWaterMark = writeIdHighWaterMark;
+ setWriteIdHighWaterMarkIsSet(true);
+ this.invalidWriteIds = invalidWriteIds;
+ this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TableValidWriteIds(TableValidWriteIds other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetFullTableName()) {
+ this.fullTableName = other.fullTableName;
+ }
+ this.writeIdHighWaterMark = other.writeIdHighWaterMark;
+ if (other.isSetInvalidWriteIds()) {
+ List<Long> __this__invalidWriteIds = new ArrayList<Long>(other.invalidWriteIds);
+ this.invalidWriteIds = __this__invalidWriteIds;
+ }
+ this.minOpenWriteId = other.minOpenWriteId;
+ if (other.isSetAbortedBits()) {
+ this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(other.abortedBits);
+ }
+ }
+
+ public TableValidWriteIds deepCopy() {
+ return new TableValidWriteIds(this);
+ }
+
+ @Override
+ public void clear() {
+ this.fullTableName = null;
+ setWriteIdHighWaterMarkIsSet(false);
+ this.writeIdHighWaterMark = 0;
+ this.invalidWriteIds = null;
+ setMinOpenWriteIdIsSet(false);
+ this.minOpenWriteId = 0;
+ this.abortedBits = null;
+ }
+
+ public String getFullTableName() {
+ return this.fullTableName;
+ }
+
+ public void setFullTableName(String fullTableName) {
+ this.fullTableName = fullTableName;
+ }
+
+ public void unsetFullTableName() {
+ this.fullTableName = null;
+ }
+
+ /** Returns true if field fullTableName is set (has been assigned a value) and false otherwise */
+ public boolean isSetFullTableName() {
+ return this.fullTableName != null;
+ }
+
+ public void setFullTableNameIsSet(boolean value) {
+ if (!value) {
+ this.fullTableName = null;
+ }
+ }
+
+ public long getWriteIdHighWaterMark() {
+ return this.writeIdHighWaterMark;
+ }
+
+ public void setWriteIdHighWaterMark(long writeIdHighWaterMark) {
+ this.writeIdHighWaterMark = writeIdHighWaterMark;
+ setWriteIdHighWaterMarkIsSet(true);
+ }
+
+ public void unsetWriteIdHighWaterMark() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITEIDHIGHWATERMARK_ISSET_ID);
+ }
+
+ /** Returns true if field writeIdHighWaterMark is set (has been assigned a value) and false otherwise */
+ public boolean isSetWriteIdHighWaterMark() {
+ return EncodingUtils.testBit(__isset_bitfield, __WRITEIDHIGHWATERMARK_ISSET_ID);
+ }
+
+ public void setWriteIdHighWaterMarkIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITEIDHIGHWATERMARK_ISSET_ID, value);
+ }
+
+ public int getInvalidWriteIdsSize() {
+ return (this.invalidWriteIds == null) ? 0 : this.invalidWriteIds.size();
+ }
+
+ public java.util.Iterator<Long> getInvalidWriteIdsIterator() {
+ return (this.invalidWriteIds == null) ? null : this.invalidWriteIds.iterator();
+ }
+
+ public void addToInvalidWriteIds(long elem) {
+ if (this.invalidWriteIds == null) {
+ this.invalidWriteIds = new ArrayList<Long>();
+ }
+ this.invalidWriteIds.add(elem);
+ }
+
+ public List<Long> getInvalidWriteIds() {
+ return this.invalidWriteIds;
+ }
+
+ public void setInvalidWriteIds(List<Long> invalidWriteIds) {
+ this.invalidWriteIds = invalidWriteIds;
+ }
+
+ public void unsetInvalidWriteIds() {
+ this.invalidWriteIds = null;
+ }
+
+ /** Returns true if field invalidWriteIds is set (has been assigned a value) and false otherwise */
+ public boolean isSetInvalidWriteIds() {
+ return this.invalidWriteIds != null;
+ }
+
+ public void setInvalidWriteIdsIsSet(boolean value) {
+ if (!value) {
+ this.invalidWriteIds = null;
+ }
+ }
+
+ public long getMinOpenWriteId() {
+ return this.minOpenWriteId;
+ }
+
+ public void setMinOpenWriteId(long minOpenWriteId) {
+ this.minOpenWriteId = minOpenWriteId;
+ setMinOpenWriteIdIsSet(true);
+ }
+
+ public void unsetMinOpenWriteId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MINOPENWRITEID_ISSET_ID);
+ }
+
+ /** Returns true if field minOpenWriteId is set (has been assigned a value) and false otherwise */
+ public boolean isSetMinOpenWriteId() {
+ return EncodingUtils.testBit(__isset_bitfield, __MINOPENWRITEID_ISSET_ID);
+ }
+
+ public void setMinOpenWriteIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MINOPENWRITEID_ISSET_ID, value);
+ }
+
+ public byte[] getAbortedBits() {
+ setAbortedBits(org.apache.thrift.TBaseHelper.rightSize(abortedBits));
+ return abortedBits == null ? null : abortedBits.array();
+ }
+
+ public ByteBuffer bufferForAbortedBits() {
+ return org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
+ }
+
+ public void setAbortedBits(byte[] abortedBits) {
+ this.abortedBits = abortedBits == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(abortedBits, abortedBits.length));
+ }
+
+ public void setAbortedBits(ByteBuffer abortedBits) {
+ this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
+ }
+
+ public void unsetAbortedBits() {
+ this.abortedBits = null;
+ }
+
+ /** Returns true if field abortedBits is set (has been assigned a value) and false otherwise */
+ public boolean isSetAbortedBits() {
+ return this.abortedBits != null;
+ }
+
+ public void setAbortedBitsIsSet(boolean value) {
+ if (!value) {
+ this.abortedBits = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case FULL_TABLE_NAME:
+ if (value == null) {
+ unsetFullTableName();
+ } else {
+ setFullTableName((String)value);
+ }
+ break;
+
+ case WRITE_ID_HIGH_WATER_MARK:
+ if (value == null) {
+ unsetWriteIdHighWaterMark();
+ } else {
+ setWriteIdHighWaterMark((Long)value);
+ }
+ break;
+
+ case INVALID_WRITE_IDS:
+ if (value == null) {
+ unsetInvalidWriteIds();
+ } else {
+ setInvalidWriteIds((List<Long>)value);
+ }
+ break;
+
+ case MIN_OPEN_WRITE_ID:
+ if (value == null) {
+ unsetMinOpenWriteId();
+ } else {
+ setMinOpenWriteId((Long)value);
+ }
+ break;
+
+ case ABORTED_BITS:
+ if (value == null) {
+ unsetAbortedBits();
+ } else {
+ setAbortedBits((ByteBuffer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case FULL_TABLE_NAME:
+ return getFullTableName();
+
+ case WRITE_ID_HIGH_WATER_MARK:
+ return getWriteIdHighWaterMark();
+
+ case INVALID_WRITE_IDS:
+ return getInvalidWriteIds();
+
+ case MIN_OPEN_WRITE_ID:
+ return getMinOpenWriteId();
+
+ case ABORTED_BITS:
+ return getAbortedBits();
+
+ }
+ 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 FULL_TABLE_NAME:
+ return isSetFullTableName();
+ case WRITE_ID_HIGH_WATER_MARK:
+ return isSetWriteIdHighWaterMark();
+ case INVALID_WRITE_IDS:
+ return isSetInvalidWriteIds();
+ case MIN_OPEN_WRITE_ID:
+ return isSetMinOpenWriteId();
+ case ABORTED_BITS:
+ return isSetAbortedBits();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TableValidWriteIds)
+ return this.equals((TableValidWriteIds)that);
+ return false;
+ }
+
+ public boolean equals(TableValidWriteIds that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_fullTableName = true && this.isSetFullTableName();
+ boolean that_present_fullTableName = true && that.isSetFullTableName();
+ if (this_present_fullTableName || that_present_fullTableName) {
+ if (!(this_present_fullTableName && that_present_fullTableName))
+ return false;
+ if (!this.fullTableName.equals(that.fullTableName))
+ return false;
+ }
+
+ boolean this_present_writeIdHighWaterMark = true;
+ boolean that_present_writeIdHighWaterMark = true;
+ if (this_present_writeIdHighWaterMark || that_present_writeIdHighWaterMark) {
+ if (!(this_present_writeIdHighWaterMark && that_present_writeIdHighWaterMark))
+ return false;
+ if (this.writeIdHighWaterMark != that.writeIdHighWaterMark)
+ return false;
+ }
+
+ boolean this_present_invalidWriteIds = true && this.isSetInvalidWriteIds();
+ boolean that_present_invalidWriteIds = true && that.isSetInvalidWriteIds();
+ if (this_present_invalidWriteIds || that_present_invalidWriteIds) {
+ if (!(this_present_invalidWriteIds && that_present_invalidWriteIds))
+ return false;
+ if (!this.invalidWriteIds.equals(that.invalidWriteIds))
+ return false;
+ }
+
+ boolean this_present_minOpenWriteId = true && this.isSetMinOpenWriteId();
+ boolean that_present_minOpenWriteId = true && that.isSetMinOpenWriteId();
+ if (this_present_minOpenWriteId || that_present_minOpenWriteId) {
+ if (!(this_present_minOpenWriteId && that_present_minOpenWriteId))
+ return false;
+ if (this.minOpenWriteId != that.minOpenWriteId)
+ return false;
+ }
+
+ boolean this_present_abortedBits = true && this.isSetAbortedBits();
+ boolean that_present_abortedBits = true && that.isSetAbortedBits();
+ if (this_present_abortedBits || that_present_abortedBits) {
+ if (!(this_present_abortedBits && that_present_abortedBits))
+ return false;
+ if (!this.abortedBits.equals(that.abortedBits))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_fullTableName = true && (isSetFullTableName());
+ list.add(present_fullTableName);
+ if (present_fullTableName)
+ list.add(fullTableName);
+
+ boolean present_writeIdHighWaterMark = true;
+ list.add(present_writeIdHighWaterMark);
+ if (present_writeIdHighWaterMark)
+ list.add(writeIdHighWaterMark);
+
+ boolean present_invalidWriteIds = true && (isSetInvalidWriteIds());
+ list.add(present_invalidWriteIds);
+ if (present_invalidWriteIds)
+ list.add(invalidWriteIds);
+
+ boolean present_minOpenWriteId = true && (isSetMinOpenWriteId());
+ list.add(present_minOpenWriteId);
+ if (present_minOpenWriteId)
+ list.add(minOpenWriteId);
+
+ boolean present_abortedBits = true && (isSetAbortedBits());
+ list.add(present_abortedBits);
+ if (present_abortedBits)
+ list.add(abortedBits);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(TableValidWriteIds other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetFullTableName()).compareTo(other.isSetFullTableName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFullTableName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullTableName, other.fullTableName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWriteIdHighWaterMark()).compareTo(other.isSetWriteIdHighWaterMark());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWriteIdHighWaterMark()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeIdHighWaterMark, other.writeIdHighWaterMark);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetInvalidWriteIds()).compareTo(other.isSetInvalidWriteIds());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetInvalidWriteIds()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invalidWriteIds, other.invalidWriteIds);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMinOpenWriteId()).compareTo(other.isSetMinOpenWriteId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMinOpenWriteId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minOpenWriteId, other.minOpenWriteId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAbortedBits()).compareTo(other.isSetAbortedBits());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAbortedBits()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.abortedBits, other.abortedBits);
+ 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("TableValidWriteIds(");
+ boolean first = true;
+
+ sb.append("fullTableName:");
+ if (this.fullTableName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.fullTableName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("writeIdHighWaterMark:");
+ sb.append(this.writeIdHighWaterMark);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("invalidWriteIds:");
+ if (this.invalidWriteIds == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.invalidWriteIds);
+ }
+ first = false;
+ if (isSetMinOpenWriteId()) {
+ if (!first) sb.append(", ");
+ sb.append("minOpenWriteId:");
+ sb.append(this.minOpenWriteId);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("abortedBits:");
+ if (this.abortedBits == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.abortedBits, sb);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetFullTableName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'fullTableName' is unset! Struct:" + toString());
+ }
+
+ if (!isSetWriteIdHighWaterMark()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'writeIdHighWaterMark' is unset! Struct:" + toString());
+ }
+
+ if (!isSetInvalidWriteIds()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'invalidWriteIds' is unset! Struct:" + toString());
+ }
+
+ if (!isSetAbortedBits()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'abortedBits' 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 TableValidWriteIdsStandardSchemeFactory implements SchemeFactory {
+ public TableValidWriteIdsStandardScheme getScheme() {
+ return new TableValidWriteIdsStandardScheme();
+ }
+ }
+
+ private static class TableValidWriteIdsStandardScheme extends StandardScheme<TableValidWriteIds> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TableValidWriteIds 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: // FULL_TABLE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.fullTableName = iprot.readString();
+ struct.setFullTableNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // WRITE_ID_HIGH_WATER_MARK
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.writeIdHighWaterMark = iprot.readI64();
+ struct.setWriteIdHighWaterMarkIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // INVALID_WRITE_IDS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list564 = iprot.readListBegin();
+ struct.invalidWriteIds = new ArrayList<Long>(_list564.size);
+ long _elem565;
+ for (int _i566 = 0; _i566 < _list564.size; ++_i566)
+ {
+ _elem565 = iprot.readI64();
+ struct.invalidWriteIds.add(_elem565);
+ }
+ iprot.readListEnd();
+ }
+ struct.setInvalidWriteIdsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // MIN_OPEN_WRITE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.minOpenWriteId = iprot.readI64();
+ struct.setMinOpenWriteIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // ABORTED_BITS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.abortedBits = iprot.readBinary();
+ struct.setAbortedBitsIsSet(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, TableValidWriteIds struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.fullTableName != null) {
+ oprot.writeFieldBegin(FULL_TABLE_NAME_FIELD_DESC);
+ oprot.writeString(struct.fullTableName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(WRITE_ID_HIGH_WATER_MARK_FIELD_DESC);
+ oprot.writeI64(struct.writeIdHighWaterMark);
+ oprot.writeFieldEnd();
+ if (struct.invalidWriteIds != null) {
+ oprot.writeFieldBegin(INVALID_WRITE_IDS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.invalidWriteIds.size()));
+ for (long _iter567 : struct.invalidWriteIds)
+ {
+ oprot.writeI64(_iter567);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetMinOpenWriteId()) {
+ oprot.writeFieldBegin(MIN_OPEN_WRITE_ID_FIELD_DESC);
+ oprot.writeI64(struct.minOpenWriteId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.abortedBits != null) {
+ oprot.writeFieldBegin(ABORTED_BITS_FIELD_DESC);
+ oprot.writeBinary(struct.abortedBits);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TableValidWriteIdsTupleSchemeFactory implements SchemeFactory {
+ public TableValidWriteIdsTupleScheme getScheme() {
+ return new TableValidWriteIdsTupleScheme();
+ }
+ }
+
+ private static class TableValidWriteIdsTupleScheme extends TupleScheme<TableValidWriteIds> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TableValidWriteIds struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.fullTableName);
+ oprot.writeI64(struct.writeIdHighWaterMark);
+ {
+ oprot.writeI32(struct.invalidWriteIds.size());
+ for (long _iter568 : struct.invalidWriteIds)
+ {
+ oprot.writeI64(_iter568);
+ }
+ }
+ oprot.writeBinary(struct.abortedBits);
+ BitSet optionals = new BitSet();
+ if (struct.isSetMinOpenWriteId()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetMinOpenWriteId()) {
+ oprot.writeI64(struct.minOpenWriteId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TableValidWriteIds struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.fullTableName = iprot.readString();
+ struct.setFullTableNameIsSet(true);
+ struct.writeIdHighWaterMark = iprot.readI64();
+ struct.setWriteIdHighWaterMarkIsSet(true);
+ {
+ org.apache.thrift.protocol.TList _list569 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.invalidWriteIds = new ArrayList<Long>(_list569.size);
+ long _elem570;
+ for (int _i571 = 0; _i571 < _list569.size; ++_i571)
+ {
+ _elem570 = iprot.readI64();
+ struct.invalidWriteIds.add(_elem570);
+ }
+ }
+ struct.setInvalidWriteIdsIsSet(true);
+ struct.abortedBits = iprot.readBinary();
+ struct.setAbortedBitsIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.minOpenWriteId = iprot.readI64();
+ struct.setMinOpenWriteIdIsSet(true);
+ }
+ }
+ }
+
+}
+
[19/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
index 553e8bc..70fcd2c 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
@@ -36,7 +36,8 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.PathFilter;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
+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.api.DataOperationType;
@@ -49,6 +50,7 @@ import org.apache.hadoop.hive.ql.io.orc.OrcRecordUpdater;
import org.apache.hadoop.hive.ql.io.orc.Reader;
import org.apache.hadoop.hive.ql.metadata.Table;
import org.apache.hadoop.hive.ql.plan.CreateTableDesc;
+import org.apache.hadoop.hive.ql.plan.TableScanDesc;
import org.apache.hadoop.hive.shims.HadoopShims;
import org.apache.hadoop.hive.shims.HadoopShims.HdfsFileStatusWithId;
import org.apache.hadoop.hive.shims.ShimLoader;
@@ -224,8 +226,8 @@ public class AcidUtils {
return deleteDeltaSubdir(min, max) + "_" + String.format(STATEMENT_DIGITS, statementId);
}
- public static String baseDir(long txnId) {
- return BASE_PREFIX + String.format(DELTA_DIGITS, txnId);
+ public static String baseDir(long writeId) {
+ return BASE_PREFIX + String.format(DELTA_DIGITS, writeId);
}
/**
@@ -254,31 +256,31 @@ public class AcidUtils {
options.getBucketId()) + "_0");
} else if (options.isWritingBase()) {
subdir = BASE_PREFIX + String.format(DELTA_DIGITS,
- options.getMaximumTransactionId());
+ options.getMaximumWriteId());
} else if(options.getStatementId() == -1) {
//when minor compaction runs, we collapse per statement delta files inside a single
//transaction so we no longer need a statementId in the file name
subdir = options.isWritingDeleteDelta() ?
- deleteDeltaSubdir(options.getMinimumTransactionId(),
- options.getMaximumTransactionId())
- : deltaSubdir(options.getMinimumTransactionId(),
- options.getMaximumTransactionId());
+ deleteDeltaSubdir(options.getMinimumWriteId(),
+ options.getMaximumWriteId())
+ : deltaSubdir(options.getMinimumWriteId(),
+ options.getMaximumWriteId());
} else {
subdir = options.isWritingDeleteDelta() ?
- deleteDeltaSubdir(options.getMinimumTransactionId(),
- options.getMaximumTransactionId(),
+ deleteDeltaSubdir(options.getMinimumWriteId(),
+ options.getMaximumWriteId(),
options.getStatementId())
- : deltaSubdir(options.getMinimumTransactionId(),
- options.getMaximumTransactionId(),
+ : deltaSubdir(options.getMinimumWriteId(),
+ options.getMaximumWriteId(),
options.getStatementId());
}
return createBucketFile(new Path(directory, subdir), options.getBucketId());
}
/**
- * Get the transaction id from a base directory name.
+ * Get the write id from a base directory name.
* @param path the base directory name
- * @return the maximum transaction id that is included
+ * @return the maximum write id that is included
*/
public static long parseBase(Path path) {
String filename = path.getName();
@@ -306,8 +308,8 @@ public class AcidUtils {
Integer.parseInt(filename.substring(0, filename.indexOf('_')));
result
.setOldStyle(true)
- .minimumTransactionId(0)
- .maximumTransactionId(0)
+ .minimumWriteId(0)
+ .maximumWriteId(0)
.bucket(bucket)
.writingBase(!bucketFile.getParent().getName().startsWith(DELTA_PREFIX));
}
@@ -318,8 +320,8 @@ public class AcidUtils {
int copyNumber = Integer.parseInt(filename.substring(filename.lastIndexOf('_') + 1));
result
.setOldStyle(true)
- .minimumTransactionId(0)
- .maximumTransactionId(0)
+ .minimumWriteId(0)
+ .maximumWriteId(0)
.bucket(bucket)
.copyNumber(copyNumber)
.writingBase(!bucketFile.getParent().getName().startsWith(DELTA_PREFIX));
@@ -330,8 +332,8 @@ public class AcidUtils {
if (bucketFile.getParent().getName().startsWith(BASE_PREFIX)) {
result
.setOldStyle(false)
- .minimumTransactionId(0)
- .maximumTransactionId(parseBase(bucketFile.getParent()))
+ .minimumWriteId(0)
+ .maximumWriteId(parseBase(bucketFile.getParent()))
.bucket(bucket)
.writingBase(true);
} else if (bucketFile.getParent().getName().startsWith(DELTA_PREFIX)) {
@@ -339,21 +341,21 @@ public class AcidUtils {
bucketFile.getFileSystem(conf));
result
.setOldStyle(false)
- .minimumTransactionId(parsedDelta.minTransaction)
- .maximumTransactionId(parsedDelta.maxTransaction)
+ .minimumWriteId(parsedDelta.minWriteId)
+ .maximumWriteId(parsedDelta.maxWriteId)
.bucket(bucket);
} else if (bucketFile.getParent().getName().startsWith(DELETE_DELTA_PREFIX)) {
ParsedDelta parsedDelta = parsedDelta(bucketFile.getParent(), DELETE_DELTA_PREFIX,
bucketFile.getFileSystem(conf));
result
.setOldStyle(false)
- .minimumTransactionId(parsedDelta.minTransaction)
- .maximumTransactionId(parsedDelta.maxTransaction)
+ .minimumWriteId(parsedDelta.minWriteId)
+ .maximumWriteId(parsedDelta.maxWriteId)
.bucket(bucket);
}
} else {
- result.setOldStyle(true).bucket(-1).minimumTransactionId(0)
- .maximumTransactionId(0);
+ result.setOldStyle(true).bucket(-1).minimumWriteId(0)
+ .maximumWriteId(0);
}
return result;
}
@@ -637,8 +639,8 @@ public class AcidUtils {
* Immutable
*/
public static final class ParsedDelta implements Comparable<ParsedDelta> {
- private final long minTransaction;
- private final long maxTransaction;
+ private final long minWriteId;
+ private final long maxWriteId;
private final FileStatus path;
//-1 is for internal (getAcidState()) purposes and means the delta dir
//had no statement ID
@@ -655,8 +657,8 @@ public class AcidUtils {
}
private ParsedDelta(long min, long max, FileStatus path, int statementId,
boolean isDeleteDelta, boolean isRawFormat) {
- this.minTransaction = min;
- this.maxTransaction = max;
+ this.minWriteId = min;
+ this.maxWriteId = max;
this.path = path;
this.statementId = statementId;
this.isDeleteDelta = isDeleteDelta;
@@ -664,12 +666,12 @@ public class AcidUtils {
assert !isDeleteDelta || !isRawFormat : " deleteDelta should not be raw format";
}
- public long getMinTransaction() {
- return minTransaction;
+ public long getMinWriteId() {
+ return minWriteId;
}
- public long getMaxTransaction() {
- return maxTransaction;
+ public long getMaxWriteId() {
+ return maxWriteId;
}
public Path getPath() {
@@ -698,14 +700,14 @@ public class AcidUtils {
*/
@Override
public int compareTo(ParsedDelta parsedDelta) {
- if (minTransaction != parsedDelta.minTransaction) {
- if (minTransaction < parsedDelta.minTransaction) {
+ if (minWriteId != parsedDelta.minWriteId) {
+ if (minWriteId < parsedDelta.minWriteId) {
return -1;
} else {
return 1;
}
- } else if (maxTransaction != parsedDelta.maxTransaction) {
- if (maxTransaction < parsedDelta.maxTransaction) {
+ } else if (maxWriteId != parsedDelta.maxWriteId) {
+ if (maxWriteId < parsedDelta.maxWriteId) {
return 1;
} else {
return -1;
@@ -753,14 +755,17 @@ public class AcidUtils {
public static List<AcidInputFormat.DeltaMetaData> serializeDeltas(List<ParsedDelta> deltas) {
List<AcidInputFormat.DeltaMetaData> result = new ArrayList<>(deltas.size());
AcidInputFormat.DeltaMetaData last = null;
- for(ParsedDelta parsedDelta : deltas) {
- if(last != null && last.getMinTxnId() == parsedDelta.getMinTransaction() && last.getMaxTxnId() == parsedDelta.getMaxTransaction()) {
+ for (ParsedDelta parsedDelta : deltas) {
+ if ((last != null)
+ && (last.getMinWriteId() == parsedDelta.getMinWriteId())
+ && (last.getMaxWriteId() == parsedDelta.getMaxWriteId())) {
last.getStmtIds().add(parsedDelta.getStatementId());
continue;
}
- last = new AcidInputFormat.DeltaMetaData(parsedDelta.getMinTransaction(), parsedDelta.getMaxTransaction(), new ArrayList<Integer>());
+ last = new AcidInputFormat.DeltaMetaData(parsedDelta.getMinWriteId(),
+ parsedDelta.getMaxWriteId(), new ArrayList<Integer>());
result.add(last);
- if(parsedDelta.statementId >= 0) {
+ if (parsedDelta.statementId >= 0) {
last.getStmtIds().add(parsedDelta.getStatementId());
}
}
@@ -780,11 +785,11 @@ public class AcidUtils {
List<Path> results = new ArrayList<Path>(deleteDeltas.size());
for(AcidInputFormat.DeltaMetaData dmd : deleteDeltas) {
if(dmd.getStmtIds().isEmpty()) {
- results.add(new Path(root, deleteDeltaSubdir(dmd.getMinTxnId(), dmd.getMaxTxnId())));
+ results.add(new Path(root, deleteDeltaSubdir(dmd.getMinWriteId(), dmd.getMaxWriteId())));
continue;
}
for(Integer stmtId : dmd.getStmtIds()) {
- results.add(new Path(root, deleteDeltaSubdir(dmd.getMinTxnId(), dmd.getMaxTxnId(), stmtId)));
+ results.add(new Path(root, deleteDeltaSubdir(dmd.getMinWriteId(), dmd.getMaxWriteId(), stmtId)));
}
}
return results.toArray(new Path[results.size()]);
@@ -802,8 +807,8 @@ public class AcidUtils {
throws IOException {
ParsedDelta p = parsedDelta(path.getPath(), deltaPrefix, fs);
boolean isDeleteDelta = deltaPrefix.equals(DELETE_DELTA_PREFIX);
- return new ParsedDelta(p.getMinTransaction(),
- p.getMaxTransaction(), path, p.statementId, isDeleteDelta, p.isRawFormat());
+ return new ParsedDelta(p.getMinWriteId(),
+ p.getMaxWriteId(), path, p.statementId, isDeleteDelta, p.isRawFormat());
}
public static ParsedDelta parsedDelta(Path deltaDir, String deltaPrefix, FileSystem fs)
@@ -856,16 +861,16 @@ public class AcidUtils {
@VisibleForTesting
public static Directory getAcidState(Path directory,
Configuration conf,
- ValidTxnList txnList
+ ValidWriteIdList writeIdList
) throws IOException {
- return getAcidState(directory, conf, txnList, false, false);
+ return getAcidState(directory, conf, writeIdList, false, false);
}
/** State class for getChildState; cannot modify 2 things in a method. */
private static class TxnBase {
private FileStatus status;
- private long txn = 0;
- private long oldestBaseTxnId = Long.MAX_VALUE;
+ private long writeId = 0;
+ private long oldestBaseWriteId = Long.MAX_VALUE;
private Path oldestBase = null;
}
@@ -876,22 +881,22 @@ public class AcidUtils {
* transaction id that we must exclude.
* @param directory the partition directory to analyze
* @param conf the configuration
- * @param txnList the list of transactions that we are reading
+ * @param writeIdList the list of write ids that we are reading
* @return the state of the directory
* @throws IOException
*/
public static Directory getAcidState(Path directory,
Configuration conf,
- ValidTxnList txnList,
+ ValidWriteIdList writeIdList,
boolean useFileIds,
boolean ignoreEmptyFiles
) throws IOException {
- return getAcidState(directory, conf, txnList, Ref.from(useFileIds), ignoreEmptyFiles, null);
+ return getAcidState(directory, conf, writeIdList, Ref.from(useFileIds), ignoreEmptyFiles, null);
}
public static Directory getAcidState(Path directory,
Configuration conf,
- ValidTxnList txnList,
+ ValidWriteIdList writeIdList,
Ref<Boolean> useFileIds,
boolean ignoreEmptyFiles,
Map<String, String> tblproperties) throws IOException {
@@ -921,13 +926,13 @@ public class AcidUtils {
final List<HdfsFileStatusWithId> original = new ArrayList<>();
if (childrenWithId != null) {
for (HdfsFileStatusWithId child : childrenWithId) {
- getChildState(child.getFileStatus(), child, txnList, working, originalDirectories, original,
+ getChildState(child.getFileStatus(), child, writeIdList, working, originalDirectories, original,
obsolete, bestBase, ignoreEmptyFiles, abortedDirectories, tblproperties, fs);
}
} else {
List<FileStatus> children = HdfsUtils.listLocatedStatus(fs, directory, hiddenFileFilter);
for (FileStatus child : children) {
- getChildState(child, null, txnList, working, originalDirectories, original, obsolete,
+ getChildState(child, null, writeIdList, working, originalDirectories, original, obsolete,
bestBase, ignoreEmptyFiles, abortedDirectories, tblproperties, fs);
}
}
@@ -955,30 +960,30 @@ public class AcidUtils {
Collections.sort(working);
//so now, 'working' should be sorted like delta_5_20 delta_5_10 delta_11_20 delta_51_60 for example
//and we want to end up with the best set containing all relevant data: delta_5_20 delta_51_60,
- //subject to list of 'exceptions' in 'txnList' (not show in above example).
- long current = bestBase.txn;
+ //subject to list of 'exceptions' in 'writeIdList' (not show in above example).
+ long current = bestBase.writeId;
int lastStmtId = -1;
ParsedDelta prev = null;
for(ParsedDelta next: working) {
- if (next.maxTransaction > current) {
+ if (next.maxWriteId > current) {
// are any of the new transactions ones that we care about?
- if (txnList.isTxnRangeValid(current+1, next.maxTransaction) !=
- ValidTxnList.RangeResponse.NONE) {
+ if (writeIdList.isWriteIdRangeValid(current+1, next.maxWriteId) !=
+ ValidWriteIdList.RangeResponse.NONE) {
deltas.add(next);
- current = next.maxTransaction;
+ current = next.maxWriteId;
lastStmtId = next.statementId;
prev = next;
}
}
- else if(next.maxTransaction == current && lastStmtId >= 0) {
+ else if(next.maxWriteId == current && lastStmtId >= 0) {
//make sure to get all deltas within a single transaction; multi-statement txn
//generate multiple delta files with the same txnId range
- //of course, if maxTransaction has already been minor compacted, all per statement deltas are obsolete
+ //of course, if maxWriteId has already been minor compacted, all per statement deltas are obsolete
deltas.add(next);
prev = next;
}
- else if (prev != null && next.maxTransaction == prev.maxTransaction
- && next.minTransaction == prev.minTransaction
+ else if (prev != null && next.maxWriteId == prev.maxWriteId
+ && next.minWriteId == prev.minWriteId
&& next.statementId == prev.statementId) {
// The 'next' parsedDelta may have everything equal to the 'prev' parsedDelta, except
// the path. This may happen when we have split update and we have two types of delta
@@ -1002,15 +1007,15 @@ public class AcidUtils {
if(bestBase.oldestBase != null && bestBase.status == null) {
/**
* If here, it means there was a base_x (> 1 perhaps) but none were suitable for given
- * {@link txnList}. Note that 'original' files are logically a base_Long.MIN_VALUE and thus
+ * {@link writeIdList}. Note that 'original' files are logically a base_Long.MIN_VALUE and thus
* cannot have any data for an open txn. We could check {@link deltas} has files to cover
* [1,n] w/o gaps but this would almost never happen...*/
- long[] exceptions = txnList.getInvalidTransactions();
- String minOpenTxn = exceptions != null && exceptions.length > 0 ?
+ long[] exceptions = writeIdList.getInvalidWriteIds();
+ String minOpenWriteId = exceptions != null && exceptions.length > 0 ?
Long.toString(exceptions[0]) : "x";
throw new IOException(ErrorMsg.ACID_NOT_ENOUGH_HISTORY.format(
- Long.toString(txnList.getHighWatermark()),
- minOpenTxn, bestBase.oldestBase.toString()));
+ Long.toString(writeIdList.getHighWatermark()),
+ minOpenWriteId, bestBase.oldestBase.toString()));
}
final Path base = bestBase.status == null ? null : bestBase.status.getPath();
@@ -1071,43 +1076,44 @@ public class AcidUtils {
* causes anything written previously is ignored (hence the overwrite). In this case, base_x
* is visible if txnid:x is committed for current reader.
*/
- private static boolean isValidBase(long baseTxnId, ValidTxnList txnList, Path baseDir,
- FileSystem fs) throws IOException {
- if(baseTxnId == Long.MIN_VALUE) {
+ private static boolean isValidBase(long baseWriteId, ValidWriteIdList writeIdList, Path baseDir,
+ FileSystem fs) throws IOException {
+ if(baseWriteId == Long.MIN_VALUE) {
//such base is created by 1st compaction in case of non-acid to acid table conversion
//By definition there are no open txns with id < 1.
return true;
}
if(!MetaDataFile.isCompacted(baseDir, fs)) {
//this is the IOW case
- return txnList.isTxnValid(baseTxnId);
+ return writeIdList.isWriteIdValid(baseWriteId);
}
- return txnList.isValidBase(baseTxnId);
+ return writeIdList.isValidBase(baseWriteId);
}
+
private static void getChildState(FileStatus child, HdfsFileStatusWithId childWithId,
- ValidTxnList txnList, List<ParsedDelta> working, List<FileStatus> originalDirectories,
+ ValidWriteIdList writeIdList, List<ParsedDelta> working, List<FileStatus> originalDirectories,
List<HdfsFileStatusWithId> original, List<FileStatus> obsolete, TxnBase bestBase,
boolean ignoreEmptyFiles, List<FileStatus> aborted, Map<String, String> tblproperties,
FileSystem fs) throws IOException {
Path p = child.getPath();
String fn = p.getName();
if (fn.startsWith(BASE_PREFIX) && child.isDir()) {
- long txn = parseBase(p);
- if(bestBase.oldestBaseTxnId > txn) {
+ long writeId = parseBase(p);
+ if(bestBase.oldestBaseWriteId > writeId) {
//keep track for error reporting
bestBase.oldestBase = p;
- bestBase.oldestBaseTxnId = txn;
+ bestBase.oldestBaseWriteId = writeId;
}
if (bestBase.status == null) {
- if(isValidBase(txn, txnList, p, fs)) {
+ if(isValidBase(writeId, writeIdList, p, fs)) {
bestBase.status = child;
- bestBase.txn = txn;
+ bestBase.writeId = writeId;
}
- } else if (bestBase.txn < txn) {
- if(isValidBase(txn, txnList, p, fs)) {
+ } else if (bestBase.writeId < writeId) {
+ if(isValidBase(writeId, writeIdList, p, fs)) {
obsolete.add(bestBase.status);
bestBase.status = child;
- bestBase.txn = txn;
+ bestBase.writeId = writeId;
}
} else {
obsolete.add(child);
@@ -1118,12 +1124,12 @@ public class AcidUtils {
(fn.startsWith(DELTA_PREFIX)) ? DELTA_PREFIX : DELETE_DELTA_PREFIX;
ParsedDelta delta = parseDelta(child, deltaPrefix, fs);
if (tblproperties != null && AcidUtils.isInsertOnlyTable(tblproperties) &&
- ValidTxnList.RangeResponse.ALL == txnList.isTxnRangeAborted(delta.minTransaction, delta.maxTransaction)) {
+ ValidWriteIdList.RangeResponse.ALL == writeIdList.isWriteIdRangeAborted(delta.minWriteId, delta.maxWriteId)) {
aborted.add(child);
}
- if (txnList.isTxnRangeValid(delta.minTransaction,
- delta.maxTransaction) !=
- ValidTxnList.RangeResponse.NONE) {
+ if (writeIdList.isWriteIdRangeValid(delta.minWriteId,
+ delta.maxWriteId) !=
+ ValidWriteIdList.RangeResponse.NONE) {
working.add(delta);
}
} else if (child.isDir()) {
@@ -1391,7 +1397,7 @@ public class AcidUtils {
* Returns the logical end of file for an acid data file.
*
* This relies on the fact that if delta_x_y has no committed transactions it wil be filtered out
- * by {@link #getAcidState(Path, Configuration, ValidTxnList)} and so won't be read at all.
+ * by {@link #getAcidState(Path, Configuration, ValidWriteIdList)} and so won't be read at all.
* @param file - data file to read/compute splits on
*/
public static long getLogicalLength(FileSystem fs, FileStatus file) throws IOException {
@@ -1490,6 +1496,54 @@ public class AcidUtils {
}
/**
+ * Extract the ValidWriteIdList for the given table from the list of tables' ValidWriteIdList.
+ */
+ public static ValidWriteIdList getTableValidWriteIdList(Configuration conf, String fullTableName) {
+ String txnString = conf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY);
+ ValidTxnWriteIdList validTxnList = new ValidTxnWriteIdList(txnString);
+ return validTxnList.getTableValidWriteIdList(fullTableName);
+ }
+
+ /**
+ * Set the valid write id list for the current table scan.
+ */
+ public static void setValidWriteIdList(Configuration conf, ValidWriteIdList validWriteIds) {
+ conf.set(ValidWriteIdList.VALID_WRITEIDS_KEY, validWriteIds.toString());
+ LOG.debug("Setting ValidWriteIdList: " + validWriteIds.toString()
+ + " isAcidTable: " + HiveConf.getBoolVar(conf, ConfVars.HIVE_TRANSACTIONAL_TABLE_SCAN, false)
+ + " acidProperty: " + getAcidOperationalProperties(conf));
+ }
+
+ /**
+ * Set the valid write id list for the current table scan.
+ */
+ public static void setValidWriteIdList(Configuration conf, TableScanDesc tsDesc) {
+ if (tsDesc.isTranscationalTable()) {
+ String dbName = tsDesc.getDatabaseName();
+ String tableName = tsDesc.getTableName();
+ ValidWriteIdList validWriteIdList = getTableValidWriteIdList(conf,
+ AcidUtils.getFullTableName(dbName, tableName));
+ if (validWriteIdList != null) {
+ setValidWriteIdList(conf, validWriteIdList);
+ } else {
+ // Log error if the acid table is missing from the ValidWriteIdList conf
+ LOG.error("setValidWriteIdList on table: " + AcidUtils.getFullTableName(dbName, tableName)
+ + " isAcidTable: " + true
+ + " acidProperty: " + getAcidOperationalProperties(conf)
+ + " couldn't find the ValidWriteId list from ValidTxnWriteIdList: "
+ + conf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY));
+ throw new IllegalStateException("ACID table: " + AcidUtils.getFullTableName(dbName, tableName)
+ + " is missing from the ValidWriteIdList config: "
+ + conf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY));
+ }
+ }
+ }
+
+ public static String getFullTableName(String dbName, String tableName) {
+ return dbName.toLowerCase() + "." + tableName.toLowerCase();
+ }
+
+ /**
* General facility to place a metadta file into a dir created by acid/compactor write.
*
* Load Data commands against Acid tables write {@link AcidBaseFileType#ORIGINAL_BASE} type files
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java
index f0d4988..71498a1 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java
@@ -341,8 +341,8 @@ public final class HiveFileFormatUtils {
.tableProperties(tableProp)
.reporter(reporter)
.writingBase(conf.getInsertOverwrite())
- .minimumTransactionId(conf.getTransactionId())
- .maximumTransactionId(conf.getTransactionId())
+ .minimumWriteId(conf.getTableWriteId())
+ .maximumWriteId(conf.getTableWriteId())
.bucket(bucket)
.inspector(inspector)
.recordIdColumn(rowIdColNum)
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
index 912eb10..7987c4e 100755
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
@@ -36,8 +36,8 @@ import java.util.Map.Entry;
import org.apache.hadoop.hive.common.FileUtils;
import org.apache.hadoop.hive.common.JavaUtils;
import org.apache.hadoop.hive.common.StringInternUtils;
-import org.apache.hadoop.hive.common.ValidReadTxnList;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.ql.exec.SerializationUtilities;
import org.apache.hive.common.util.Ref;
import org.slf4j.Logger;
@@ -478,12 +478,17 @@ public class HiveInputFormat<K extends WritableComparable, V extends Writable>
InputFormat inputFormat, Class<? extends InputFormat> inputFormatClass, int splits,
TableDesc table, List<InputSplit> result)
throws IOException {
- ValidTxnList validTxnList;
+ ValidWriteIdList validWriteIdList = AcidUtils.getTableValidWriteIdList(conf, table.getTableName());
+ ValidWriteIdList validMmWriteIdList;
if (AcidUtils.isInsertOnlyTable(table.getProperties())) {
- String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY);
- validTxnList = txnString == null ? new ValidReadTxnList() : new ValidReadTxnList(txnString);
+ if (validWriteIdList == null) {
+ throw new IOException("Insert-Only table: " + table.getTableName()
+ + " is missing from the ValidWriteIdList config: "
+ + conf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY));
+ }
+ validMmWriteIdList = validWriteIdList;
} else {
- validTxnList = null; // for non-MM case
+ validMmWriteIdList = null; // for non-MM case
}
try {
@@ -491,6 +496,15 @@ public class HiveInputFormat<K extends WritableComparable, V extends Writable>
if (tableScan != null) {
AcidUtils.setAcidOperationalProperties(conf, tableScan.getConf().isTranscationalTable(),
tableScan.getConf().getAcidOperationalProperties());
+
+ if (tableScan.getConf().isTranscationalTable() && (validWriteIdList == null)) {
+ throw new IOException("Acid table: " + table.getTableName()
+ + " is missing from the ValidWriteIdList config: "
+ + conf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY));
+ }
+ if (validWriteIdList != null) {
+ AcidUtils.setValidWriteIdList(conf, validWriteIdList);
+ }
}
} catch (HiveException e) {
throw new IOException(e);
@@ -500,7 +514,7 @@ public class HiveInputFormat<K extends WritableComparable, V extends Writable>
pushFilters(conf, tableScan, this.mrwork);
}
- Path[] finalDirs = processPathsForMmRead(dirs, conf, validTxnList);
+ Path[] finalDirs = processPathsForMmRead(dirs, conf, validMmWriteIdList);
if (finalDirs == null) {
return; // No valid inputs.
}
@@ -531,13 +545,13 @@ public class HiveInputFormat<K extends WritableComparable, V extends Writable>
}
public static Path[] processPathsForMmRead(List<Path> dirs, JobConf conf,
- ValidTxnList validTxnList) throws IOException {
- if (validTxnList == null) {
+ ValidWriteIdList validWriteIdList) throws IOException {
+ if (validWriteIdList == null) {
return dirs.toArray(new Path[dirs.size()]);
} else {
List<Path> finalPaths = new ArrayList<>(dirs.size());
for (Path dir : dirs) {
- processForWriteIds(dir, conf, validTxnList, finalPaths);
+ processForWriteIds(dir, conf, validWriteIdList, finalPaths);
}
if (finalPaths.isEmpty()) {
LOG.warn("No valid inputs found in " + dirs);
@@ -548,7 +562,7 @@ public class HiveInputFormat<K extends WritableComparable, V extends Writable>
}
private static void processForWriteIds(Path dir, JobConf conf,
- ValidTxnList validTxnList, List<Path> finalPaths) throws IOException {
+ ValidWriteIdList validWriteIdList, List<Path> finalPaths) throws IOException {
FileSystem fs = dir.getFileSystem(conf);
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("Checking " + dir + " (root) for inputs");
@@ -574,10 +588,11 @@ public class HiveInputFormat<K extends WritableComparable, V extends Writable>
}
if (!file.isDirectory()) {
Utilities.FILE_OP_LOGGER.warn("Ignoring a file not in MM directory " + path);
- } else if (JavaUtils.extractTxnId(path) == null) {
+ } else if (JavaUtils.extractWriteId(path) == null) {
subdirs.add(path);
} else if (!hadAcidState) {
- AcidUtils.Directory dirInfo = AcidUtils.getAcidState(currDir, conf, validTxnList, Ref.from(false), true, null);
+ AcidUtils.Directory dirInfo
+ = AcidUtils.getAcidState(currDir, conf, validWriteIdList, Ref.from(false), true, null);
hadAcidState = true;
// Find the base, created for IOW.
@@ -890,6 +905,7 @@ public class HiveInputFormat<K extends WritableComparable, V extends Writable>
AcidUtils.setAcidOperationalProperties(job, ts.getConf().isTranscationalTable(),
ts.getConf().getAcidOperationalProperties());
+ AcidUtils.setValidWriteIdList(job, ts.getConf());
}
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/RecordIdentifier.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/RecordIdentifier.java b/ql/src/java/org/apache/hadoop/hive/ql/io/RecordIdentifier.java
index 0c37203..1f673da 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/RecordIdentifier.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/RecordIdentifier.java
@@ -88,7 +88,7 @@ public class RecordIdentifier implements WritableComparable<RecordIdentifier> {
Arrays.fill(struct, null);
return;
}
- struct[Field.transactionId.ordinal()] = ri.getTransactionId();
+ struct[Field.transactionId.ordinal()] = ri.getWriteId();
struct[Field.bucketId.ordinal()] = ri.getBucketProperty();
struct[Field.rowId.ordinal()] = ri.getRowId();
}
@@ -101,20 +101,20 @@ public class RecordIdentifier implements WritableComparable<RecordIdentifier> {
public RecordIdentifier() {
}
- public RecordIdentifier(long transactionId, int bucket, long rowId) {
- this.transactionId = transactionId;
+ public RecordIdentifier(long writeId, int bucket, long rowId) {
+ this.transactionId = writeId;
this.bucketId = bucket;
this.rowId = rowId;
}
/**
* Set the identifier.
- * @param transactionId the transaction id
+ * @param writeId the write id
* @param bucketId the bucket id
* @param rowId the row id
*/
- public void setValues(long transactionId, int bucketId, long rowId) {
- this.transactionId = transactionId;
+ public void setValues(long writeId, int bucketId, long rowId) {
+ this.transactionId = writeId;
this.bucketId = bucketId;
this.rowId = rowId;
}
@@ -134,10 +134,10 @@ public class RecordIdentifier implements WritableComparable<RecordIdentifier> {
}
/**
- * What was the original transaction id for the last row?
- * @return the transaction id
+ * What was the original write id for the last row?
+ * @return the write id
*/
- public long getTransactionId() {
+ public long getWriteId() {
return transactionId;
}
@@ -223,7 +223,7 @@ public class RecordIdentifier implements WritableComparable<RecordIdentifier> {
BucketCodec.determineVersion(bucketId);
String s = "(" + codec.getVersion() + "." + codec.decodeWriterId(bucketId) +
"." + codec.decodeStatementId(bucketId) + ")";
- return "{originalTxn: " + transactionId + ", " + bucketToString() + ", row: " + getRowId() +"}";
+ return "{originalWriteId: " + transactionId + ", " + bucketToString() + ", row: " + getRowId() +"}";
}
protected String bucketToString() {
BucketCodec codec =
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/RecordUpdater.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/RecordUpdater.java b/ql/src/java/org/apache/hadoop/hive/ql/io/RecordUpdater.java
index 36111f0..0aed172 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/RecordUpdater.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/RecordUpdater.java
@@ -30,27 +30,26 @@ public interface RecordUpdater {
/**
* Insert a new record into the table.
- * @param currentTransaction the transaction id of the current transaction.
+ * @param currentWriteId the table write id of the current transaction.
* @param row the row of data to insert
* @throws IOException
*/
- void insert(long currentTransaction,
- Object row) throws IOException;
+ void insert(long currentWriteId, Object row) throws IOException;
/**
* Update an old record with a new set of values.
- * @param currentTransaction the current transaction id
+ * @param currentWriteId the current write id
* @param row the new values for the row
* @throws IOException
*/
- void update(long currentTransaction, Object row) throws IOException;
+ void update(long currentWriteId, Object row) throws IOException;
/**
* Delete a row from the table.
- * @param currentTransaction the current transaction id
+ * @param currentWriteId the current write id
* @throws IOException
*/
- void delete(long currentTransaction, Object row) throws IOException;
+ void delete(long currentWriteId, Object row) throws IOException;
/**
* Flush the current set of rows to the underlying file system, so that
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
index 5e29070..e956485 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
@@ -49,8 +49,8 @@ import org.apache.hadoop.fs.BlockLocation;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidReadTxnList;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidReaderWriteIdList;
+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.Metastore;
@@ -568,7 +568,7 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
private final boolean forceThreadpool;
private final AtomicInteger cacheHitCounter = new AtomicInteger(0);
private final AtomicInteger numFilesCounter = new AtomicInteger(0);
- private final ValidTxnList transactionList;
+ private final ValidWriteIdList writeIdList;
private SplitStrategyKind splitStrategyKind;
private final SearchArgument sarg;
private final AcidOperationalProperties acidOperationalProperties;
@@ -650,8 +650,6 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
footerCache = useExternalCache ? metaCache : localCache;
}
}
- String value = conf.get(ValidTxnList.VALID_TXNS_KEY);
- transactionList = value == null ? new ValidReadTxnList() : new ValidReadTxnList(value);
// Determine the transactional_properties of the table from the job conf stored in context.
// The table properties are copied to job conf at HiveInputFormat::addSplitsForGroup(),
@@ -662,6 +660,11 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
String transactionalProperties = conf.get(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES);
this.acidOperationalProperties = isTableTransactional ?
AcidOperationalProperties.parseString(transactionalProperties) : null;
+
+ String value = conf.get(ValidWriteIdList.VALID_WRITEIDS_KEY);
+ writeIdList = value == null ? new ValidReaderWriteIdList() : new ValidReaderWriteIdList(value);
+ LOG.debug("Context:: Read ValidWriteIdList: " + writeIdList.toString()
+ + " isTransactionalTable: " + isTableTransactional);
}
@VisibleForTesting
@@ -933,10 +936,6 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
}
}
-
-
-
-
private void runGetSplitsSync(List<Future<List<OrcSplit>>> splitFutures,
List<OrcSplit> splits, UserGroupInformation ugi) throws IOException {
UserGroupInformation tpUgi = ugi == null ? UserGroupInformation.getCurrentUser() : ugi;
@@ -1093,8 +1092,8 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
/**
* For plain or acid tables this is the root of the partition (or table if not partitioned).
* For MM table this is delta/ or base/ dir. In MM case applying of the ValidTxnList that
- * {@link AcidUtils#getAcidState(Path, Configuration, ValidTxnList)} normally does has already
- * been done in {@link HiveInputFormat#processPathsForMmRead(List, JobConf, ValidTxnList)}.
+ * {@link AcidUtils#getAcidState(Path, Configuration, ValidWriteIdList)} normally does has already
+ * been done in {@link HiveInputFormat#processPathsForMmRead(List, JobConf, ValidWriteIdList)}.
*/
private final Path dir;
private final Ref<Boolean> useFileIds;
@@ -1134,7 +1133,7 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
private AcidDirInfo callInternal() throws IOException {
//todo: shouldn't ignoreEmptyFiles be set based on ExecutionEngine?
AcidUtils.Directory dirInfo = AcidUtils.getAcidState(dir, context.conf,
- context.transactionList, useFileIds, true, null);
+ context.writeIdList, useFileIds, true, null);
// find the base files (original or new style)
List<AcidBaseFileInfo> baseFiles = new ArrayList<>();
if (dirInfo.getBaseDirectory() == null) {
@@ -1173,8 +1172,7 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
AcidUtils.AcidBaseFileType.ORIGINAL_BASE : AcidUtils.AcidBaseFileType.ACID_SCHEMA;
PathFilter bucketFilter = parsedDelta.isRawFormat() ?
AcidUtils.originalBucketFilter : AcidUtils.bucketFileFilter;
- if(parsedDelta.isRawFormat() && parsedDelta.getMinTransaction() !=
- parsedDelta.getMaxTransaction()) {
+ if (parsedDelta.isRawFormat() && parsedDelta.getMinWriteId() != parsedDelta.getMaxWriteId()) {
//delta/ with files in raw format are a result of Load Data (as opposed to compaction
//or streaming ingest so must have interval length == 1.
throw new IllegalStateException("Delta in " + AcidUtils.AcidBaseFileType.ORIGINAL_BASE
@@ -2009,12 +2007,15 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
final Reader.Options readOptions = OrcInputFormat.createOptionsForReader(conf);
readOptions.range(split.getStart(), split.getLength());
- String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY);
- ValidTxnList validTxnList = txnString == null ? new ValidReadTxnList() :
- new ValidReadTxnList(txnString);
+ String txnString = conf.get(ValidWriteIdList.VALID_WRITEIDS_KEY);
+ ValidWriteIdList validWriteIdList
+ = (txnString == null) ? new ValidReaderWriteIdList() : new ValidReaderWriteIdList(txnString);
+ LOG.debug("getReader:: Read ValidWriteIdList: " + validWriteIdList.toString()
+ + " isTransactionalTable: " + HiveConf.getBoolVar(conf, ConfVars.HIVE_TRANSACTIONAL_TABLE_SCAN));
+
final OrcRawRecordMerger records =
new OrcRawRecordMerger(conf, true, reader, split.isOriginal(), bucket,
- validTxnList, readOptions, deltas, mergerOptions);
+ validWriteIdList, readOptions, deltas, mergerOptions);
return new RowReader<OrcStruct>() {
OrcStruct innerRecord = records.createValue();
@@ -2296,7 +2297,7 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
public RawReader<OrcStruct> getRawReader(Configuration conf,
boolean collapseEvents,
int bucket,
- ValidTxnList validTxnList,
+ ValidWriteIdList validWriteIdList,
Path baseDirectory,
Path[] deltaDirectory
) throws IOException {
@@ -2320,7 +2321,7 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
mergerOptions.rootPath(deltaDirectory[0].getParent());
}
return new OrcRawRecordMerger(conf, collapseEvents, null, isOriginal,
- bucket, validTxnList, new Reader.Options(), deltaDirectory, mergerOptions);
+ bucket, validWriteIdList, new Reader.Options(), deltaDirectory, mergerOptions);
}
/**
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcOutputFormat.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcOutputFormat.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcOutputFormat.java
index f1f638d..57e005d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcOutputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcOutputFormat.java
@@ -204,20 +204,20 @@ public class OrcOutputFormat extends FileOutputFormat<NullWritable, OrcSerdeRow>
}
@Override
- public void insert(long currentTransaction, Object row) throws IOException {
- out.println("insert " + path + " currTxn: " + currentTransaction +
+ public void insert(long currentWriteId, Object row) throws IOException {
+ out.println("insert " + path + " currWriteId: " + currentWriteId +
" obj: " + stringifyObject(row, inspector));
}
@Override
- public void update(long currentTransaction, Object row) throws IOException {
- out.println("update " + path + " currTxn: " + currentTransaction +
+ public void update(long currentWriteId, Object row) throws IOException {
+ out.println("update " + path + " currWriteId: " + currentWriteId +
" obj: " + stringifyObject(row, inspector));
}
@Override
- public void delete(long currentTransaction, Object row) throws IOException {
- out.println("delete " + path + " currTxn: " + currentTransaction + " obj: " + row);
+ public void delete(long currentWriteId, Object row) throws IOException {
+ out.println("delete " + path + " currWriteId: " + currentWriteId + " obj: " + row);
}
@Override
@@ -307,7 +307,7 @@ public class OrcOutputFormat extends FileOutputFormat<NullWritable, OrcSerdeRow>
watcher.addKey(
((IntWritable) orc.getFieldValue(OrcRecordUpdater.OPERATION)).get(),
((LongWritable)
- orc.getFieldValue(OrcRecordUpdater.ORIGINAL_TRANSACTION)).get(),
+ orc.getFieldValue(OrcRecordUpdater.ORIGINAL_WRITEID)).get(),
((IntWritable) orc.getFieldValue(OrcRecordUpdater.BUCKET)).get(),
((LongWritable) orc.getFieldValue(OrcRecordUpdater.ROW_ID)).get());
writer.addRow(w);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java
index 779da4f..27f28de 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.ql.io.AcidInputFormat;
import org.apache.hadoop.hive.ql.io.AcidUtils;
import org.apache.hadoop.hive.ql.io.RecordIdentifier;
@@ -60,7 +60,7 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
private final ObjectInspector objectInspector;
private final long offset;
private final long length;
- private final ValidTxnList validTxnList;
+ private final ValidWriteIdList validWriteIdList;
private final int columns;
private final ReaderKey prevKey = new ReaderKey();
// this is the key less than the lowest key we need to process
@@ -70,15 +70,15 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
// an extra value so that we can return it while reading ahead
private OrcStruct extraValue;
/**
- * A RecordIdentifier extended with the current transaction id. This is the
- * key of our merge sort with the originalTransaction, bucket, and rowId
- * ascending and the currentTransaction, statementId descending. This means that if the
+ * A RecordIdentifier extended with the current write id. This is the
+ * key of our merge sort with the originalWriteId, bucket, and rowId
+ * ascending and the currentWriteId, statementId descending. This means that if the
* reader is collapsing events to just the last update, just the first
* instance of each record is required.
*/
@VisibleForTesting
public final static class ReaderKey extends RecordIdentifier{
- private long currentTransactionId;
+ private long currentWriteId;
/**
* This is the value from delta file name which may be different from value encode in
* {@link RecordIdentifier#getBucketProperty()} in case of Update/Delete.
@@ -86,54 +86,54 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
* or delete event. For Acid 2.0 + multi-stmt txn, it must be a delete event.
* No 2 Insert events from can ever agree on {@link RecordIdentifier}
*/
- private int statementId;//sort on this descending, like currentTransactionId
+ private int statementId; //sort on this descending, like currentWriteId
ReaderKey() {
this(-1, -1, -1, -1, 0);
}
- ReaderKey(long originalTransaction, int bucket, long rowId,
- long currentTransactionId) {
- this(originalTransaction, bucket, rowId, currentTransactionId, 0);
+ ReaderKey(long originalWriteId, int bucket, long rowId,
+ long currentWriteId) {
+ this(originalWriteId, bucket, rowId, currentWriteId, 0);
}
/**
* @param statementId - set this to 0 if N/A
*/
- public ReaderKey(long originalTransaction, int bucket, long rowId,
- long currentTransactionId, int statementId) {
- super(originalTransaction, bucket, rowId);
- this.currentTransactionId = currentTransactionId;
+ public ReaderKey(long originalWriteId, int bucket, long rowId,
+ long currentWriteId, int statementId) {
+ super(originalWriteId, bucket, rowId);
+ this.currentWriteId = currentWriteId;
this.statementId = statementId;
}
@Override
public void set(RecordIdentifier other) {
super.set(other);
- currentTransactionId = ((ReaderKey) other).currentTransactionId;
+ currentWriteId = ((ReaderKey) other).currentWriteId;
statementId = ((ReaderKey) other).statementId;
}
- public void setValues(long originalTransactionId,
+ public void setValues(long originalWriteId,
int bucket,
long rowId,
- long currentTransactionId,
+ long currentWriteId,
int statementId) {
- setValues(originalTransactionId, bucket, rowId);
- this.currentTransactionId = currentTransactionId;
+ setValues(originalWriteId, bucket, rowId);
+ this.currentWriteId = currentWriteId;
this.statementId = statementId;
}
@Override
public boolean equals(Object other) {
return super.equals(other) &&
- currentTransactionId == ((ReaderKey) other).currentTransactionId
+ currentWriteId == ((ReaderKey) other).currentWriteId
&& statementId == ((ReaderKey) other).statementId//consistent with compareTo()
;
}
@Override
public int hashCode() {
int result = super.hashCode();
- result = 31 * result + (int)(currentTransactionId ^ (currentTransactionId >>> 32));
+ result = 31 * result + (int)(currentWriteId ^ (currentWriteId >>> 32));
result = 31 * result + statementId;
return result;
}
@@ -145,8 +145,8 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
if (sup == 0) {
if (other.getClass() == ReaderKey.class) {
ReaderKey oth = (ReaderKey) other;
- if (currentTransactionId != oth.currentTransactionId) {
- return currentTransactionId < oth.currentTransactionId ? +1 : -1;
+ if (currentWriteId != oth.currentWriteId) {
+ return currentWriteId < oth.currentWriteId ? +1 : -1;
}
if(statementId != oth.statementId) {
return statementId < oth.statementId ? +1 : -1;
@@ -162,15 +162,15 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
* This means 1 txn modified the same row more than once
*/
private boolean isSameRow(ReaderKey other) {
- return compareRow(other) == 0 && currentTransactionId == other.currentTransactionId;
+ return compareRow(other) == 0 && currentWriteId == other.currentWriteId;
}
- long getCurrentTransactionId() {
- return currentTransactionId;
+ long getCurrentWriteId() {
+ return currentWriteId;
}
/**
- * Compare rows without considering the currentTransactionId.
+ * Compare rows without considering the currentWriteId.
* @param other the value to compare to
* @return -1, 0, +1
*/
@@ -180,9 +180,9 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
@Override
public String toString() {
- return "{originalTxn: " + getTransactionId() + ", " +
- bucketToString() + ", row: " + getRowId() + ", currentTxn: " +
- currentTransactionId + ", statementId: "+ statementId + "}";
+ return "{originalWriteId: " + getWriteId() + ", " +
+ bucketToString() + ", row: " + getRowId() + ", currentWriteId " +
+ currentWriteId + ", statementId: "+ statementId + "}";
}
}
interface ReaderPair {
@@ -389,9 +389,9 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
IntWritable operation =
new IntWritable(OrcRecordUpdater.INSERT_OPERATION);
nextRecord().setFieldValue(OrcRecordUpdater.OPERATION, operation);
- nextRecord().setFieldValue(OrcRecordUpdater.CURRENT_TRANSACTION,
+ nextRecord().setFieldValue(OrcRecordUpdater.CURRENT_WRITEID,
new LongWritable(transactionId));
- nextRecord().setFieldValue(OrcRecordUpdater.ORIGINAL_TRANSACTION,
+ nextRecord().setFieldValue(OrcRecordUpdater.ORIGINAL_WRITEID,
new LongWritable(transactionId));
nextRecord().setFieldValue(OrcRecordUpdater.BUCKET,
new IntWritable(bucketProperty));
@@ -403,11 +403,11 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
nextRecord = next;
((IntWritable) next.getFieldValue(OrcRecordUpdater.OPERATION))
.set(OrcRecordUpdater.INSERT_OPERATION);
- ((LongWritable) next.getFieldValue(OrcRecordUpdater.ORIGINAL_TRANSACTION))
+ ((LongWritable) next.getFieldValue(OrcRecordUpdater.ORIGINAL_WRITEID))
.set(transactionId);
((IntWritable) next.getFieldValue(OrcRecordUpdater.BUCKET))
.set(bucketProperty);
- ((LongWritable) next.getFieldValue(OrcRecordUpdater.CURRENT_TRANSACTION))
+ ((LongWritable) next.getFieldValue(OrcRecordUpdater.CURRENT_WRITEID))
.set(transactionId);
((LongWritable) next.getFieldValue(OrcRecordUpdater.ROW_ID))
.set(nextRowId);
@@ -445,7 +445,7 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
OriginalReaderPairToRead(ReaderKey key, Reader reader, int bucketId,
final RecordIdentifier minKey, final RecordIdentifier maxKey,
Reader.Options options, Options mergerOptions, Configuration conf,
- ValidTxnList validTxnList, int statementId) throws IOException {
+ ValidWriteIdList validWriteIdList, int statementId) throws IOException {
super(key, bucketId, conf, mergerOptions, statementId);
this.reader = reader;
assert !mergerOptions.isCompacting();
@@ -472,8 +472,8 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
* contents to be in {@link org.apache.hadoop.hive.ql.io.AcidUtils.Directory#getOriginalFiles()}
*/
//the split is from something other than the 1st file of the logical bucket - compute offset
- AcidUtils.Directory directoryState = AcidUtils.getAcidState(mergerOptions.getRootPath(),
- conf, validTxnList, false, true);
+ AcidUtils.Directory directoryState
+ = AcidUtils.getAcidState(mergerOptions.getRootPath(), conf, validWriteIdList, false, true);
for (HadoopShims.HdfsFileStatusWithId f : directoryState.getOriginalFiles()) {
AcidOutputFormat.Options bucketOptions =
AcidUtils.parseBaseOrDeltaBucketFilename(f.getFileStatus().getPath(), conf);
@@ -577,7 +577,7 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
OriginalReaderPairToCompact(ReaderKey key, int bucketId,
Reader.Options options, Options mergerOptions, Configuration conf,
- ValidTxnList validTxnList, int statementId) throws IOException {
+ ValidWriteIdList validWriteIdList, int statementId) throws IOException {
super(key, bucketId, conf, mergerOptions, statementId);
assert mergerOptions.isCompacting() : "Should only be used for Compaction";
this.conf = conf;
@@ -587,8 +587,8 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
//when compacting each split needs to process the whole logical bucket
assert options.getOffset() == 0;
assert options.getMaxOffset() == Long.MAX_VALUE;
- AcidUtils.Directory directoryState = AcidUtils.getAcidState(
- mergerOptions.getRootPath(), conf, validTxnList, false, true);
+ AcidUtils.Directory directoryState
+ = AcidUtils.getAcidState(mergerOptions.getRootPath(), conf, validWriteIdList, false, true);
/**
* Note that for reading base_x/ or delta_x_x/ with non-acid schema,
* {@link Options#getRootPath()} is set to base_x/ or delta_x_x/ which causes all it's
@@ -714,7 +714,7 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
boolean isTail = true;
RecordIdentifier minKey = null;
RecordIdentifier maxKey = null;
- TransactionMetaData tfp = TransactionMetaData.findTransactionIDForSynthetcRowIDs(
+ TransactionMetaData tfp = TransactionMetaData.findWriteIDForSynthetcRowIDs(
mergerOptions.getBucketPath(), mergerOptions.getRootPath(), conf);
int bucketProperty = encodeBucketId(conf, bucket, tfp.statementId);
/**
@@ -939,13 +939,13 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
Reader reader,
boolean isOriginal,
int bucket,
- ValidTxnList validTxnList,
+ ValidWriteIdList validWriteIdList,
Reader.Options options,
Path[] deltaDirectory, Options mergerOptions) throws IOException {
this.collapse = collapseEvents;
this.offset = options.getOffset();
this.length = options.getLength();
- this.validTxnList = validTxnList;
+ this.validWriteIdList = validWriteIdList;
/**
* @since Hive 3.0
* With split update (HIVE-14035) we have base/, delta/ and delete_delta/ - the latter only
@@ -1028,7 +1028,7 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
AcidUtils.parseBase(mergerOptions.getBaseDir()), mergerOptions.getBaseDir());
}
pair = new OriginalReaderPairToCompact(key, bucket, options, readerPairOptions,
- conf, validTxnList,
+ conf, validWriteIdList,
0);//0 since base_x doesn't have a suffix (neither does pre acid write)
} else {
assert mergerOptions.getBucketPath() != null : " since this is not compaction: "
@@ -1036,14 +1036,14 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
//if here it's a non-acid schema file - check if from before table was marked transactional
//or in base_x/delta_x_x from Load Data
Options readerPairOptions = mergerOptions;
- TransactionMetaData tfp = TransactionMetaData.findTransactionIDForSynthetcRowIDs(
+ TransactionMetaData tfp = TransactionMetaData.findWriteIDForSynthetcRowIDs(
mergerOptions.getBucketPath(), mergerOptions.getRootPath(), conf);
- if(tfp.syntheticTransactionId > 0) {
+ if(tfp.syntheticWriteId > 0) {
readerPairOptions = modifyForNonAcidSchemaRead(mergerOptions,
- tfp.syntheticTransactionId, tfp.folder);
+ tfp.syntheticWriteId, tfp.folder);
}
pair = new OriginalReaderPairToRead(key, reader, bucket, keyInterval.getMinKey(),
- keyInterval.getMaxKey(), options, readerPairOptions, conf, validTxnList, tfp.statementId);
+ keyInterval.getMaxKey(), options, readerPairOptions, conf, validWriteIdList, tfp.statementId);
}
} else {
if(mergerOptions.isCompacting()) {
@@ -1100,11 +1100,11 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
assert !deltaDir.isDeleteDelta() : delta.toString();
assert mergerOptions.isCompacting() : "during regular read anything which is not a" +
" delete_delta is treated like base: " + delta;
- Options rawCompactOptions = modifyForNonAcidSchemaRead(mergerOptions,
- deltaDir.getMinTransaction(), delta);
+ Options rawCompactOptions = modifyForNonAcidSchemaRead(mergerOptions, deltaDir.getMinWriteId(), delta);
+
//this will also handle copy_N files if any
ReaderPair deltaPair = new OriginalReaderPairToCompact(key, bucket, options,
- rawCompactOptions, conf, validTxnList, deltaDir.getStatementId());
+ rawCompactOptions, conf, validWriteIdList, deltaDir.getStatementId());
if (deltaPair.nextRecord() != null) {
readers.put(key, deltaPair);
}
@@ -1170,24 +1170,24 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
* type files into a base_x/ or delta_x_x. The data in these are then assigned ROW_IDs at read
* time and made permanent at compaction time. This is identical to how 'original' files (i.e.
* those that existed in the table before it was converted to an Acid table) except that the
- * transaction ID to use in the ROW_ID should be that of the transaction that ran the Load Data.
+ * write ID to use in the ROW_ID should be that of the transaction that ran the Load Data.
*/
static final class TransactionMetaData {
- final long syntheticTransactionId;
+ final long syntheticWriteId;
/**
* folder which determines the transaction id to use in synthetic ROW_IDs
*/
final Path folder;
final int statementId;
- TransactionMetaData(long syntheticTransactionId, Path folder) {
- this(syntheticTransactionId, folder, 0);
+ TransactionMetaData(long syntheticWriteId, Path folder) {
+ this(syntheticWriteId, folder, 0);
}
- TransactionMetaData(long syntheticTransactionId, Path folder, int statementId) {
- this.syntheticTransactionId = syntheticTransactionId;
+ TransactionMetaData(long syntheticWriteId, Path folder, int statementId) {
+ this.syntheticWriteId = syntheticWriteId;
this.folder = folder;
this.statementId = statementId;
}
- static TransactionMetaData findTransactionIDForSynthetcRowIDs(Path splitPath, Path rootPath,
+ static TransactionMetaData findWriteIDForSynthetcRowIDs(Path splitPath, Path rootPath,
Configuration conf) throws IOException {
Path parent = splitPath.getParent();
if(rootPath.equals(parent)) {
@@ -1205,10 +1205,10 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
else {
AcidUtils.ParsedDelta pd = AcidUtils.parsedDelta(parent, AcidUtils.DELTA_PREFIX,
parent.getFileSystem(conf));
- assert pd.getMinTransaction() == pd.getMaxTransaction() :
+ assert pd.getMinWriteId() == pd.getMaxWriteId() :
"This a delta with raw non acid schema, must be result of single write, no compaction: "
+ splitPath;
- return new TransactionMetaData(pd.getMinTransaction(), parent, pd.getStatementId());
+ return new TransactionMetaData(pd.getMinWriteId(), parent, pd.getStatementId());
}
}
parent = parent.getParent();
@@ -1227,7 +1227,7 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
/**
* This is done to read non-acid schema files ("original") located in base_x/ or delta_x_x/ which
* happens as a result of Load Data statement. Setting {@code rootPath} to base_x/ or delta_x_x
- * causes {@link AcidUtils#getAcidState(Path, Configuration, ValidTxnList)} in subsequent
+ * causes {@link AcidUtils#getAcidState(Path, Configuration, ValidWriteIdList)} in subsequent
* {@link OriginalReaderPair} object to return the files in this dir
* in {@link AcidUtils.Directory#getOriginalFiles()}
* @return modified clone of {@code baseOptions}
@@ -1350,8 +1350,8 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
}
// if this transaction isn't ok, skip over it
- if (!validTxnList.isTxnValid(
- ((ReaderKey) recordIdentifier).getCurrentTransactionId())) {
+ if (!validWriteIdList.isWriteIdValid(
+ ((ReaderKey) recordIdentifier).getCurrentWriteId())) {
continue;
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java
index b90ce6e..2e4db22 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java
@@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory;
* A RecordUpdater where the files are stored as ORC.
* A note on various record structures: the {@code row} coming in (as in {@link #insert(long, Object)}
* for example), is a struct like <RecordIdentifier, f1, ... fn> but what is written to the file
- * * is <op, otid, writerId, rowid, ctid, <f1, ... fn>> (see {@link #createEventSchema(ObjectInspector)})
+ * * is <op, owid, writerId, rowid, cwid, <f1, ... fn>> (see {@link #createEventSchema(ObjectInspector)})
* So there are OIs here to make the translation.
*/
public class OrcRecordUpdater implements RecordUpdater {
@@ -72,10 +72,10 @@ public class OrcRecordUpdater implements RecordUpdater {
final static int DELETE_OPERATION = 2;
//column indexes of corresponding data in storage layer
final static int OPERATION = 0;
- final static int ORIGINAL_TRANSACTION = 1;
+ final static int ORIGINAL_WRITEID = 1;
final static int BUCKET = 2;
final static int ROW_ID = 3;
- final static int CURRENT_TRANSACTION = 4;
+ final static int CURRENT_WRITEID = 4;
final static int ROW = 5;
/**
* total number of fields (above)
@@ -100,8 +100,8 @@ public class OrcRecordUpdater implements RecordUpdater {
private final FSDataOutputStream flushLengths;
private final OrcStruct item;
private final IntWritable operation = new IntWritable();
- private final LongWritable currentTransaction = new LongWritable(-1);
- private final LongWritable originalTransaction = new LongWritable(-1);
+ private final LongWritable currentWriteId = new LongWritable(-1);
+ private final LongWritable originalWriteId = new LongWritable(-1);
private final IntWritable bucket = new IntWritable();
private final LongWritable rowId = new LongWritable();
private long insertedRows = 0;
@@ -112,12 +112,12 @@ public class OrcRecordUpdater implements RecordUpdater {
private KeyIndexBuilder deleteEventIndexBuilder;
private StructField recIdField = null; // field to look for the record identifier in
private StructField rowIdField = null; // field inside recId to look for row id in
- private StructField originalTxnField = null; // field inside recId to look for original txn in
+ private StructField originalWriteIdField = null; // field inside recId to look for original write id in
private StructField bucketField = null; // field inside recId to look for bucket in
private StructObjectInspector rowInspector; // OI for the original row
private StructObjectInspector recIdInspector; // OI for the record identifier struct
private LongObjectInspector rowIdInspector; // OI for the long row id inside the recordIdentifier
- private LongObjectInspector origTxnInspector; // OI for the original txn inside the record
+ private LongObjectInspector origWriteIdInspector; // OI for the original write id inside the record
// identifer
private IntObjectInspector bucketInspector;
@@ -126,11 +126,11 @@ public class OrcRecordUpdater implements RecordUpdater {
}
static long getCurrentTransaction(OrcStruct struct) {
- return ((LongWritable) struct.getFieldValue(CURRENT_TRANSACTION)).get();
+ return ((LongWritable) struct.getFieldValue(CURRENT_WRITEID)).get();
}
static long getOriginalTransaction(OrcStruct struct) {
- return ((LongWritable) struct.getFieldValue(ORIGINAL_TRANSACTION)).get();
+ return ((LongWritable) struct.getFieldValue(ORIGINAL_WRITEID)).get();
}
static int getBucket(OrcStruct struct) {
@@ -184,15 +184,13 @@ public class OrcRecordUpdater implements RecordUpdater {
fields.add(new OrcStruct.Field("operation",
PrimitiveObjectInspectorFactory.writableIntObjectInspector, OPERATION));
fields.add(new OrcStruct.Field("originalTransaction",
- PrimitiveObjectInspectorFactory.writableLongObjectInspector,
- ORIGINAL_TRANSACTION));
+ PrimitiveObjectInspectorFactory.writableLongObjectInspector, ORIGINAL_WRITEID));
fields.add(new OrcStruct.Field("bucket",
PrimitiveObjectInspectorFactory.writableIntObjectInspector, BUCKET));
fields.add(new OrcStruct.Field("rowId",
PrimitiveObjectInspectorFactory.writableLongObjectInspector, ROW_ID));
fields.add(new OrcStruct.Field("currentTransaction",
- PrimitiveObjectInspectorFactory.writableLongObjectInspector,
- CURRENT_TRANSACTION));
+ PrimitiveObjectInspectorFactory.writableLongObjectInspector, CURRENT_WRITEID));
fields.add(new OrcStruct.Field("row", rowInspector, ROW));
return new OrcStruct.OrcStructInspector(fields);
}
@@ -246,7 +244,7 @@ public class OrcRecordUpdater implements RecordUpdater {
}
}
}
- if (options.getMinimumTransactionId() != options.getMaximumTransactionId()
+ if (options.getMinimumWriteId() != options.getMaximumWriteId()
&& !options.isWritingBase()){
//throw if file already exists as that should never happen
flushLengths = fs.create(OrcAcidUtils.getSideFile(this.path), false, 8,
@@ -316,8 +314,8 @@ public class OrcRecordUpdater implements RecordUpdater {
options.getRecordIdColumn())));
item = new OrcStruct(FIELDS);
item.setFieldValue(OPERATION, operation);
- item.setFieldValue(CURRENT_TRANSACTION, currentTransaction);
- item.setFieldValue(ORIGINAL_TRANSACTION, originalTransaction);
+ item.setFieldValue(CURRENT_WRITEID, currentWriteId);
+ item.setFieldValue(ORIGINAL_WRITEID, originalWriteId);
item.setFieldValue(BUCKET, bucket);
item.setFieldValue(ROW_ID, rowId);
}
@@ -342,9 +340,9 @@ public class OrcRecordUpdater implements RecordUpdater {
List<? extends StructField> fields =
((StructObjectInspector) recIdField.getFieldObjectInspector()).getAllStructFieldRefs();
// Go by position, not field name, as field names aren't guaranteed. The order of fields
- // in RecordIdentifier is transactionId, bucketId, rowId
- originalTxnField = fields.get(0);
- origTxnInspector = (LongObjectInspector)originalTxnField.getFieldObjectInspector();
+ // in RecordIdentifier is writeId, bucketId, rowId
+ originalWriteIdField = fields.get(0);
+ origWriteIdInspector = (LongObjectInspector)originalWriteIdField.getFieldObjectInspector();
bucketField = fields.get(1);
bucketInspector = (IntObjectInspector) bucketField.getFieldObjectInspector();
rowIdField = fields.get(2);
@@ -361,27 +359,27 @@ public class OrcRecordUpdater implements RecordUpdater {
* thus even for unbucketed tables, the N in bucket_N file name matches writerId/bucketId even for
* late split
*/
- private void addSimpleEvent(int operation, long currentTransaction, long rowId, Object row)
+ private void addSimpleEvent(int operation, long currentWriteId, long rowId, Object row)
throws IOException {
this.operation.set(operation);
- this.currentTransaction.set(currentTransaction);
+ this.currentWriteId.set(currentWriteId);
Integer currentBucket = null;
- // If this is an insert, originalTransaction should be set to this transaction. If not,
+ // If this is an insert, originalWriteId should be set to this transaction. If not,
// it will be reset by the following if anyway.
- long originalTransaction = currentTransaction;
+ long originalWriteId = currentWriteId;
if (operation == DELETE_OPERATION || operation == UPDATE_OPERATION) {
Object rowIdValue = rowInspector.getStructFieldData(row, recIdField);
- originalTransaction = origTxnInspector.get(
- recIdInspector.getStructFieldData(rowIdValue, originalTxnField));
+ originalWriteId = origWriteIdInspector.get(
+ recIdInspector.getStructFieldData(rowIdValue, originalWriteIdField));
rowId = rowIdInspector.get(recIdInspector.getStructFieldData(rowIdValue, rowIdField));
currentBucket = setBucket(bucketInspector.get(
recIdInspector.getStructFieldData(rowIdValue, bucketField)), operation);
}
this.rowId.set(rowId);
- this.originalTransaction.set(originalTransaction);
+ this.originalWriteId.set(originalWriteId);
item.setFieldValue(OrcRecordUpdater.OPERATION, new IntWritable(operation));
item.setFieldValue(OrcRecordUpdater.ROW, (operation == DELETE_OPERATION ? null : row));
- indexBuilder.addKey(operation, originalTransaction, bucket.get(), rowId);
+ indexBuilder.addKey(operation, originalWriteId, bucket.get(), rowId);
if (writer == null) {
writer = OrcFile.createWriter(path, writerOptions);
}
@@ -389,18 +387,18 @@ public class OrcRecordUpdater implements RecordUpdater {
restoreBucket(currentBucket, operation);
}
- private void addSplitUpdateEvent(int operation, long currentTransaction, long rowId, Object row)
+ private void addSplitUpdateEvent(int operation, long currentWriteId, long rowId, Object row)
throws IOException {
if (operation == INSERT_OPERATION) {
// Just insert the record in the usual way, i.e., default to the simple behavior.
- addSimpleEvent(operation, currentTransaction, rowId, row);
+ addSimpleEvent(operation, currentWriteId, rowId, row);
return;
}
this.operation.set(operation);
- this.currentTransaction.set(currentTransaction);
+ this.currentWriteId.set(currentWriteId);
Object rowValue = rowInspector.getStructFieldData(row, recIdField);
- long originalTransaction = origTxnInspector.get(
- recIdInspector.getStructFieldData(rowValue, originalTxnField));
+ long originalWriteId = origWriteIdInspector.get(
+ recIdInspector.getStructFieldData(rowValue, originalWriteIdField));
rowId = rowIdInspector.get(
recIdInspector.getStructFieldData(rowValue, rowIdField));
Integer currentBucket = null;
@@ -423,54 +421,54 @@ public class OrcRecordUpdater implements RecordUpdater {
// A delete/update generates a delete event for the original row.
this.rowId.set(rowId);
- this.originalTransaction.set(originalTransaction);
+ this.originalWriteId.set(originalWriteId);
item.setFieldValue(OrcRecordUpdater.OPERATION, new IntWritable(DELETE_OPERATION));
item.setFieldValue(OrcRecordUpdater.ROW, null); // ROW is null for delete events.
- deleteEventIndexBuilder.addKey(DELETE_OPERATION, originalTransaction, bucket.get(), rowId);
+ deleteEventIndexBuilder.addKey(DELETE_OPERATION, originalWriteId, bucket.get(), rowId);
deleteEventWriter.addRow(item);
restoreBucket(currentBucket, operation);
}
if (operation == UPDATE_OPERATION) {
// A new row is also inserted in the usual delta file for an update event.
- addSimpleEvent(INSERT_OPERATION, currentTransaction, insertedRows++, row);
+ addSimpleEvent(INSERT_OPERATION, currentWriteId, insertedRows++, row);
}
}
@Override
- public void insert(long currentTransaction, Object row) throws IOException {
- if (this.currentTransaction.get() != currentTransaction) {
+ public void insert(long currentWriteId, Object row) throws IOException {
+ if (this.currentWriteId.get() != currentWriteId) {
insertedRows = 0;
}
if (acidOperationalProperties.isSplitUpdate()) {
- addSplitUpdateEvent(INSERT_OPERATION, currentTransaction, insertedRows++, row);
+ addSplitUpdateEvent(INSERT_OPERATION, currentWriteId, insertedRows++, row);
} else {
- addSimpleEvent(INSERT_OPERATION, currentTransaction, insertedRows++, row);
+ addSimpleEvent(INSERT_OPERATION, currentWriteId, insertedRows++, row);
}
rowCountDelta++;
}
@Override
- public void update(long currentTransaction, Object row) throws IOException {
- if (this.currentTransaction.get() != currentTransaction) {
+ public void update(long currentWriteId, Object row) throws IOException {
+ if (this.currentWriteId.get() != currentWriteId) {
insertedRows = 0;
}
if (acidOperationalProperties.isSplitUpdate()) {
- addSplitUpdateEvent(UPDATE_OPERATION, currentTransaction, -1L, row);
+ addSplitUpdateEvent(UPDATE_OPERATION, currentWriteId, -1L, row);
} else {
- addSimpleEvent(UPDATE_OPERATION, currentTransaction, -1L, row);
+ addSimpleEvent(UPDATE_OPERATION, currentWriteId, -1L, row);
}
}
@Override
- public void delete(long currentTransaction, Object row) throws IOException {
- if (this.currentTransaction.get() != currentTransaction) {
+ public void delete(long currentWriteId, Object row) throws IOException {
+ if (this.currentWriteId.get() != currentWriteId) {
insertedRows = 0;
}
if (acidOperationalProperties.isSplitUpdate()) {
- addSplitUpdateEvent(DELETE_OPERATION, currentTransaction, -1L, row);
+ addSplitUpdateEvent(DELETE_OPERATION, currentWriteId, -1L, row);
} else {
- addSimpleEvent(DELETE_OPERATION, currentTransaction, -1L, row);
+ addSimpleEvent(DELETE_OPERATION, currentWriteId, -1L, row);
}
rowCountDelta--;
}
[08/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
index 05064cb..adddd07 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
@@ -328,6 +328,10 @@ import org.slf4j.LoggerFactory;
public void commit_txn(CommitTxnRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException;
+ public GetValidWriteIdsResponse get_valid_write_ids(GetValidWriteIdsRequest rqst) throws NoSuchTxnException, MetaException, org.apache.thrift.TException;
+
+ public AllocateTableWriteIdsResponse allocate_table_write_ids(AllocateTableWriteIdsRequest rqst) throws NoSuchTxnException, TxnAbortedException, MetaException, org.apache.thrift.TException;
+
public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException;
public LockResponse check_lock(CheckLockRequest rqst) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException;
@@ -696,6 +700,10 @@ import org.slf4j.LoggerFactory;
public void commit_txn(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void get_valid_write_ids(GetValidWriteIdsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void allocate_table_write_ids(AllocateTableWriteIdsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void lock(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void check_lock(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -5001,6 +5009,67 @@ import org.slf4j.LoggerFactory;
return;
}
+ public GetValidWriteIdsResponse get_valid_write_ids(GetValidWriteIdsRequest rqst) throws NoSuchTxnException, MetaException, org.apache.thrift.TException
+ {
+ send_get_valid_write_ids(rqst);
+ return recv_get_valid_write_ids();
+ }
+
+ public void send_get_valid_write_ids(GetValidWriteIdsRequest rqst) throws org.apache.thrift.TException
+ {
+ get_valid_write_ids_args args = new get_valid_write_ids_args();
+ args.setRqst(rqst);
+ sendBase("get_valid_write_ids", args);
+ }
+
+ public GetValidWriteIdsResponse recv_get_valid_write_ids() throws NoSuchTxnException, MetaException, org.apache.thrift.TException
+ {
+ get_valid_write_ids_result result = new get_valid_write_ids_result();
+ receiveBase(result, "get_valid_write_ids");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.o1 != null) {
+ throw result.o1;
+ }
+ if (result.o2 != null) {
+ throw result.o2;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_valid_write_ids failed: unknown result");
+ }
+
+ public AllocateTableWriteIdsResponse allocate_table_write_ids(AllocateTableWriteIdsRequest rqst) throws NoSuchTxnException, TxnAbortedException, MetaException, org.apache.thrift.TException
+ {
+ send_allocate_table_write_ids(rqst);
+ return recv_allocate_table_write_ids();
+ }
+
+ public void send_allocate_table_write_ids(AllocateTableWriteIdsRequest rqst) throws org.apache.thrift.TException
+ {
+ allocate_table_write_ids_args args = new allocate_table_write_ids_args();
+ args.setRqst(rqst);
+ sendBase("allocate_table_write_ids", args);
+ }
+
+ public AllocateTableWriteIdsResponse recv_allocate_table_write_ids() throws NoSuchTxnException, TxnAbortedException, MetaException, org.apache.thrift.TException
+ {
+ allocate_table_write_ids_result result = new allocate_table_write_ids_result();
+ receiveBase(result, "allocate_table_write_ids");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.o1 != null) {
+ throw result.o1;
+ }
+ if (result.o2 != null) {
+ throw result.o2;
+ }
+ if (result.o3 != null) {
+ throw result.o3;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "allocate_table_write_ids failed: unknown result");
+ }
+
public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException
{
send_lock(rqst);
@@ -11179,6 +11248,70 @@ import org.slf4j.LoggerFactory;
}
}
+ public void get_valid_write_ids(GetValidWriteIdsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ get_valid_write_ids_call method_call = new get_valid_write_ids_call(rqst, 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 get_valid_write_ids_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private GetValidWriteIdsRequest rqst;
+ public get_valid_write_ids_call(GetValidWriteIdsRequest rqst, 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.rqst = rqst;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_valid_write_ids", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ get_valid_write_ids_args args = new get_valid_write_ids_args();
+ args.setRqst(rqst);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public GetValidWriteIdsResponse getResult() throws NoSuchTxnException, 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_get_valid_write_ids();
+ }
+ }
+
+ public void allocate_table_write_ids(AllocateTableWriteIdsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ allocate_table_write_ids_call method_call = new allocate_table_write_ids_call(rqst, 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 allocate_table_write_ids_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private AllocateTableWriteIdsRequest rqst;
+ public allocate_table_write_ids_call(AllocateTableWriteIdsRequest rqst, 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.rqst = rqst;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("allocate_table_write_ids", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ allocate_table_write_ids_args args = new allocate_table_write_ids_args();
+ args.setRqst(rqst);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public AllocateTableWriteIdsResponse getResult() throws NoSuchTxnException, TxnAbortedException, 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_allocate_table_write_ids();
+ }
+ }
+
public void lock(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
lock_call method_call = new lock_call(rqst, resultHandler, this, ___protocolFactory, ___transport);
@@ -12574,6 +12707,8 @@ import org.slf4j.LoggerFactory;
processMap.put("abort_txn", new abort_txn());
processMap.put("abort_txns", new abort_txns());
processMap.put("commit_txn", new commit_txn());
+ processMap.put("get_valid_write_ids", new get_valid_write_ids());
+ processMap.put("allocate_table_write_ids", new allocate_table_write_ids());
processMap.put("lock", new lock());
processMap.put("check_lock", new check_lock());
processMap.put("unlock", new unlock());
@@ -16334,6 +16469,60 @@ import org.slf4j.LoggerFactory;
}
}
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_valid_write_ids<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_valid_write_ids_args> {
+ public get_valid_write_ids() {
+ super("get_valid_write_ids");
+ }
+
+ public get_valid_write_ids_args getEmptyArgsInstance() {
+ return new get_valid_write_ids_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_valid_write_ids_result getResult(I iface, get_valid_write_ids_args args) throws org.apache.thrift.TException {
+ get_valid_write_ids_result result = new get_valid_write_ids_result();
+ try {
+ result.success = iface.get_valid_write_ids(args.rqst);
+ } catch (NoSuchTxnException o1) {
+ result.o1 = o1;
+ } catch (MetaException o2) {
+ result.o2 = o2;
+ }
+ return result;
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class allocate_table_write_ids<I extends Iface> extends org.apache.thrift.ProcessFunction<I, allocate_table_write_ids_args> {
+ public allocate_table_write_ids() {
+ super("allocate_table_write_ids");
+ }
+
+ public allocate_table_write_ids_args getEmptyArgsInstance() {
+ return new allocate_table_write_ids_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public allocate_table_write_ids_result getResult(I iface, allocate_table_write_ids_args args) throws org.apache.thrift.TException {
+ allocate_table_write_ids_result result = new allocate_table_write_ids_result();
+ try {
+ result.success = iface.allocate_table_write_ids(args.rqst);
+ } catch (NoSuchTxnException o1) {
+ result.o1 = o1;
+ } catch (TxnAbortedException o2) {
+ result.o2 = o2;
+ } catch (MetaException o3) {
+ result.o3 = o3;
+ }
+ return result;
+ }
+ }
+
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class lock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, lock_args> {
public lock() {
super("lock");
@@ -17444,6 +17633,8 @@ import org.slf4j.LoggerFactory;
processMap.put("abort_txn", new abort_txn());
processMap.put("abort_txns", new abort_txns());
processMap.put("commit_txn", new commit_txn());
+ processMap.put("get_valid_write_ids", new get_valid_write_ids());
+ processMap.put("allocate_table_write_ids", new allocate_table_write_ids());
processMap.put("lock", new lock());
processMap.put("check_lock", new check_lock());
processMap.put("unlock", new unlock());
@@ -26316,6 +26507,135 @@ import org.slf4j.LoggerFactory;
}
}
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_valid_write_ids<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_valid_write_ids_args, GetValidWriteIdsResponse> {
+ public get_valid_write_ids() {
+ super("get_valid_write_ids");
+ }
+
+ public get_valid_write_ids_args getEmptyArgsInstance() {
+ return new get_valid_write_ids_args();
+ }
+
+ public AsyncMethodCallback<GetValidWriteIdsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<GetValidWriteIdsResponse>() {
+ public void onComplete(GetValidWriteIdsResponse o) {
+ get_valid_write_ids_result result = new get_valid_write_ids_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_valid_write_ids_result result = new get_valid_write_ids_result();
+ if (e instanceof NoSuchTxnException) {
+ result.o1 = (NoSuchTxnException) e;
+ result.setO1IsSet(true);
+ msg = result;
+ }
+ else if (e instanceof MetaException) {
+ result.o2 = (MetaException) e;
+ result.setO2IsSet(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, get_valid_write_ids_args args, org.apache.thrift.async.AsyncMethodCallback<GetValidWriteIdsResponse> resultHandler) throws TException {
+ iface.get_valid_write_ids(args.rqst,resultHandler);
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class allocate_table_write_ids<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, allocate_table_write_ids_args, AllocateTableWriteIdsResponse> {
+ public allocate_table_write_ids() {
+ super("allocate_table_write_ids");
+ }
+
+ public allocate_table_write_ids_args getEmptyArgsInstance() {
+ return new allocate_table_write_ids_args();
+ }
+
+ public AsyncMethodCallback<AllocateTableWriteIdsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<AllocateTableWriteIdsResponse>() {
+ public void onComplete(AllocateTableWriteIdsResponse o) {
+ allocate_table_write_ids_result result = new allocate_table_write_ids_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;
+ allocate_table_write_ids_result result = new allocate_table_write_ids_result();
+ if (e instanceof NoSuchTxnException) {
+ result.o1 = (NoSuchTxnException) e;
+ result.setO1IsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TxnAbortedException) {
+ result.o2 = (TxnAbortedException) e;
+ result.setO2IsSet(true);
+ msg = result;
+ }
+ else if (e instanceof MetaException) {
+ result.o3 = (MetaException) e;
+ result.setO3IsSet(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, allocate_table_write_ids_args args, org.apache.thrift.async.AsyncMethodCallback<AllocateTableWriteIdsResponse> resultHandler) throws TException {
+ iface.allocate_table_write_ids(args.rqst,resultHandler);
+ }
+ }
+
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class lock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, lock_args, LockResponse> {
public lock() {
super("lock");
@@ -34034,13 +34354,13 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list818 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list818.size);
- String _elem819;
- for (int _i820 = 0; _i820 < _list818.size; ++_i820)
+ org.apache.thrift.protocol.TList _list858 = iprot.readListBegin();
+ struct.success = new ArrayList<String>(_list858.size);
+ String _elem859;
+ for (int _i860 = 0; _i860 < _list858.size; ++_i860)
{
- _elem819 = iprot.readString();
- struct.success.add(_elem819);
+ _elem859 = iprot.readString();
+ struct.success.add(_elem859);
}
iprot.readListEnd();
}
@@ -34075,9 +34395,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter821 : struct.success)
+ for (String _iter861 : struct.success)
{
- oprot.writeString(_iter821);
+ oprot.writeString(_iter861);
}
oprot.writeListEnd();
}
@@ -34116,9 +34436,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (String _iter822 : struct.success)
+ for (String _iter862 : struct.success)
{
- oprot.writeString(_iter822);
+ oprot.writeString(_iter862);
}
}
}
@@ -34133,13 +34453,13 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list823 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list823.size);
- String _elem824;
- for (int _i825 = 0; _i825 < _list823.size; ++_i825)
+ org.apache.thrift.protocol.TList _list863 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new ArrayList<String>(_list863.size);
+ String _elem864;
+ for (int _i865 = 0; _i865 < _list863.size; ++_i865)
{
- _elem824 = iprot.readString();
- struct.success.add(_elem824);
+ _elem864 = iprot.readString();
+ struct.success.add(_elem864);
}
}
struct.setSuccessIsSet(true);
@@ -34793,13 +35113,13 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list826 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list826.size);
- String _elem827;
- for (int _i828 = 0; _i828 < _list826.size; ++_i828)
+ org.apache.thrift.protocol.TList _list866 = iprot.readListBegin();
+ struct.success = new ArrayList<String>(_list866.size);
+ String _elem867;
+ for (int _i868 = 0; _i868 < _list866.size; ++_i868)
{
- _elem827 = iprot.readString();
- struct.success.add(_elem827);
+ _elem867 = iprot.readString();
+ struct.success.add(_elem867);
}
iprot.readListEnd();
}
@@ -34834,9 +35154,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter829 : struct.success)
+ for (String _iter869 : struct.success)
{
- oprot.writeString(_iter829);
+ oprot.writeString(_iter869);
}
oprot.writeListEnd();
}
@@ -34875,9 +35195,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (String _iter830 : struct.success)
+ for (String _iter870 : struct.success)
{
- oprot.writeString(_iter830);
+ oprot.writeString(_iter870);
}
}
}
@@ -34892,13 +35212,13 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list831 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list831.size);
- String _elem832;
- for (int _i833 = 0; _i833 < _list831.size; ++_i833)
+ org.apache.thrift.protocol.TList _list871 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new ArrayList<String>(_list871.size);
+ String _elem872;
+ for (int _i873 = 0; _i873 < _list871.size; ++_i873)
{
- _elem832 = iprot.readString();
- struct.success.add(_elem832);
+ _elem872 = iprot.readString();
+ struct.success.add(_elem872);
}
}
struct.setSuccessIsSet(true);
@@ -39505,16 +39825,16 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map834 = iprot.readMapBegin();
- struct.success = new HashMap<String,Type>(2*_map834.size);
- String _key835;
- Type _val836;
- for (int _i837 = 0; _i837 < _map834.size; ++_i837)
+ org.apache.thrift.protocol.TMap _map874 = iprot.readMapBegin();
+ struct.success = new HashMap<String,Type>(2*_map874.size);
+ String _key875;
+ Type _val876;
+ for (int _i877 = 0; _i877 < _map874.size; ++_i877)
{
- _key835 = iprot.readString();
- _val836 = new Type();
- _val836.read(iprot);
- struct.success.put(_key835, _val836);
+ _key875 = iprot.readString();
+ _val876 = new Type();
+ _val876.read(iprot);
+ struct.success.put(_key875, _val876);
}
iprot.readMapEnd();
}
@@ -39549,10 +39869,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Map.Entry<String, Type> _iter838 : struct.success.entrySet())
+ for (Map.Entry<String, Type> _iter878 : struct.success.entrySet())
{
- oprot.writeString(_iter838.getKey());
- _iter838.getValue().write(oprot);
+ oprot.writeString(_iter878.getKey());
+ _iter878.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -39591,10 +39911,10 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Map.Entry<String, Type> _iter839 : struct.success.entrySet())
+ for (Map.Entry<String, Type> _iter879 : struct.success.entrySet())
{
- oprot.writeString(_iter839.getKey());
- _iter839.getValue().write(oprot);
+ oprot.writeString(_iter879.getKey());
+ _iter879.getValue().write(oprot);
}
}
}
@@ -39609,16 +39929,16 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map840 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new HashMap<String,Type>(2*_map840.size);
- String _key841;
- Type _val842;
- for (int _i843 = 0; _i843 < _map840.size; ++_i843)
+ org.apache.thrift.protocol.TMap _map880 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new HashMap<String,Type>(2*_map880.size);
+ String _key881;
+ Type _val882;
+ for (int _i883 = 0; _i883 < _map880.size; ++_i883)
{
- _key841 = iprot.readString();
- _val842 = new Type();
- _val842.read(iprot);
- struct.success.put(_key841, _val842);
+ _key881 = iprot.readString();
+ _val882 = new Type();
+ _val882.read(iprot);
+ struct.success.put(_key881, _val882);
}
}
struct.setSuccessIsSet(true);
@@ -40653,14 +40973,14 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list844 = iprot.readListBegin();
- struct.success = new ArrayList<FieldSchema>(_list844.size);
- FieldSchema _elem845;
- for (int _i846 = 0; _i846 < _list844.size; ++_i846)
+ org.apache.thrift.protocol.TList _list884 = iprot.readListBegin();
+ struct.success = new ArrayList<FieldSchema>(_list884.size);
+ FieldSchema _elem885;
+ for (int _i886 = 0; _i886 < _list884.size; ++_i886)
{
- _elem845 = new FieldSchema();
- _elem845.read(iprot);
- struct.success.add(_elem845);
+ _elem885 = new FieldSchema();
+ _elem885.read(iprot);
+ struct.success.add(_elem885);
}
iprot.readListEnd();
}
@@ -40713,9 +41033,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (FieldSchema _iter847 : struct.success)
+ for (FieldSchema _iter887 : struct.success)
{
- _iter847.write(oprot);
+ _iter887.write(oprot);
}
oprot.writeListEnd();
}
@@ -40770,9 +41090,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (FieldSchema _iter848 : struct.success)
+ for (FieldSchema _iter888 : struct.success)
{
- _iter848.write(oprot);
+ _iter888.write(oprot);
}
}
}
@@ -40793,14 +41113,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list849 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<FieldSchema>(_list849.size);
- FieldSchema _elem850;
- for (int _i851 = 0; _i851 < _list849.size; ++_i851)
+ org.apache.thrift.protocol.TList _list889 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<FieldSchema>(_list889.size);
+ FieldSchema _elem890;
+ for (int _i891 = 0; _i891 < _list889.size; ++_i891)
{
- _elem850 = new FieldSchema();
- _elem850.read(iprot);
- struct.success.add(_elem850);
+ _elem890 = new FieldSchema();
+ _elem890.read(iprot);
+ struct.success.add(_elem890);
}
}
struct.setSuccessIsSet(true);
@@ -41954,14 +42274,14 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list852 = iprot.readListBegin();
- struct.success = new ArrayList<FieldSchema>(_list852.size);
- FieldSchema _elem853;
- for (int _i854 = 0; _i854 < _list852.size; ++_i854)
+ org.apache.thrift.protocol.TList _list892 = iprot.readListBegin();
+ struct.success = new ArrayList<FieldSchema>(_list892.size);
+ FieldSchema _elem893;
+ for (int _i894 = 0; _i894 < _list892.size; ++_i894)
{
- _elem853 = new FieldSchema();
- _elem853.read(iprot);
- struct.success.add(_elem853);
+ _elem893 = new FieldSchema();
+ _elem893.read(iprot);
+ struct.success.add(_elem893);
}
iprot.readListEnd();
}
@@ -42014,9 +42334,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (FieldSchema _iter855 : struct.success)
+ for (FieldSchema _iter895 : struct.success)
{
- _iter855.write(oprot);
+ _iter895.write(oprot);
}
oprot.writeListEnd();
}
@@ -42071,9 +42391,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (FieldSchema _iter856 : struct.success)
+ for (FieldSchema _iter896 : struct.success)
{
- _iter856.write(oprot);
+ _iter896.write(oprot);
}
}
}
@@ -42094,14 +42414,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list857 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<FieldSchema>(_list857.size);
- FieldSchema _elem858;
- for (int _i859 = 0; _i859 < _list857.size; ++_i859)
+ org.apache.thrift.protocol.TList _list897 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<FieldSchema>(_list897.size);
+ FieldSchema _elem898;
+ for (int _i899 = 0; _i899 < _list897.size; ++_i899)
{
- _elem858 = new FieldSchema();
- _elem858.read(iprot);
- struct.success.add(_elem858);
+ _elem898 = new FieldSchema();
+ _elem898.read(iprot);
+ struct.success.add(_elem898);
}
}
struct.setSuccessIsSet(true);
@@ -43146,14 +43466,14 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list860 = iprot.readListBegin();
- struct.success = new ArrayList<FieldSchema>(_list860.size);
- FieldSchema _elem861;
- for (int _i862 = 0; _i862 < _list860.size; ++_i862)
+ org.apache.thrift.protocol.TList _list900 = iprot.readListBegin();
+ struct.success = new ArrayList<FieldSchema>(_list900.size);
+ FieldSchema _elem901;
+ for (int _i902 = 0; _i902 < _list900.size; ++_i902)
{
- _elem861 = new FieldSchema();
- _elem861.read(iprot);
- struct.success.add(_elem861);
+ _elem901 = new FieldSchema();
+ _elem901.read(iprot);
+ struct.success.add(_elem901);
}
iprot.readListEnd();
}
@@ -43206,9 +43526,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (FieldSchema _iter863 : struct.success)
+ for (FieldSchema _iter903 : struct.success)
{
- _iter863.write(oprot);
+ _iter903.write(oprot);
}
oprot.writeListEnd();
}
@@ -43263,9 +43583,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (FieldSchema _iter864 : struct.success)
+ for (FieldSchema _iter904 : struct.success)
{
- _iter864.write(oprot);
+ _iter904.write(oprot);
}
}
}
@@ -43286,14 +43606,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list865 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<FieldSchema>(_list865.size);
- FieldSchema _elem866;
- for (int _i867 = 0; _i867 < _list865.size; ++_i867)
+ org.apache.thrift.protocol.TList _list905 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<FieldSchema>(_list905.size);
+ FieldSchema _elem906;
+ for (int _i907 = 0; _i907 < _list905.size; ++_i907)
{
- _elem866 = new FieldSchema();
- _elem866.read(iprot);
- struct.success.add(_elem866);
+ _elem906 = new FieldSchema();
+ _elem906.read(iprot);
+ struct.success.add(_elem906);
}
}
struct.setSuccessIsSet(true);
@@ -44447,14 +44767,14 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list868 = iprot.readListBegin();
- struct.success = new ArrayList<FieldSchema>(_list868.size);
- FieldSchema _elem869;
- for (int _i870 = 0; _i870 < _list868.size; ++_i870)
+ org.apache.thrift.protocol.TList _list908 = iprot.readListBegin();
+ struct.success = new ArrayList<FieldSchema>(_list908.size);
+ FieldSchema _elem909;
+ for (int _i910 = 0; _i910 < _list908.size; ++_i910)
{
- _elem869 = new FieldSchema();
- _elem869.read(iprot);
- struct.success.add(_elem869);
+ _elem909 = new FieldSchema();
+ _elem909.read(iprot);
+ struct.success.add(_elem909);
}
iprot.readListEnd();
}
@@ -44507,9 +44827,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (FieldSchema _iter871 : struct.success)
+ for (FieldSchema _iter911 : struct.success)
{
- _iter871.write(oprot);
+ _iter911.write(oprot);
}
oprot.writeListEnd();
}
@@ -44564,9 +44884,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (FieldSchema _iter872 : struct.success)
+ for (FieldSchema _iter912 : struct.success)
{
- _iter872.write(oprot);
+ _iter912.write(oprot);
}
}
}
@@ -44587,14 +44907,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list873 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<FieldSchema>(_list873.size);
- FieldSchema _elem874;
- for (int _i875 = 0; _i875 < _list873.size; ++_i875)
+ org.apache.thrift.protocol.TList _list913 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<FieldSchema>(_list913.size);
+ FieldSchema _elem914;
+ for (int _i915 = 0; _i915 < _list913.size; ++_i915)
{
- _elem874 = new FieldSchema();
- _elem874.read(iprot);
- struct.success.add(_elem874);
+ _elem914 = new FieldSchema();
+ _elem914.read(iprot);
+ struct.success.add(_elem914);
}
}
struct.setSuccessIsSet(true);
@@ -47521,14 +47841,14 @@ import org.slf4j.LoggerFactory;
case 2: // PRIMARY_KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list876 = iprot.readListBegin();
- struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list876.size);
- SQLPrimaryKey _elem877;
- for (int _i878 = 0; _i878 < _list876.size; ++_i878)
+ org.apache.thrift.protocol.TList _list916 = iprot.readListBegin();
+ struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list916.size);
+ SQLPrimaryKey _elem917;
+ for (int _i918 = 0; _i918 < _list916.size; ++_i918)
{
- _elem877 = new SQLPrimaryKey();
- _elem877.read(iprot);
- struct.primaryKeys.add(_elem877);
+ _elem917 = new SQLPrimaryKey();
+ _elem917.read(iprot);
+ struct.primaryKeys.add(_elem917);
}
iprot.readListEnd();
}
@@ -47540,14 +47860,14 @@ import org.slf4j.LoggerFactory;
case 3: // FOREIGN_KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list879 = iprot.readListBegin();
- struct.foreignKeys = new ArrayList<SQLForeignKey>(_list879.size);
- SQLForeignKey _elem880;
- for (int _i881 = 0; _i881 < _list879.size; ++_i881)
+ org.apache.thrift.protocol.TList _list919 = iprot.readListBegin();
+ struct.foreignKeys = new ArrayList<SQLForeignKey>(_list919.size);
+ SQLForeignKey _elem920;
+ for (int _i921 = 0; _i921 < _list919.size; ++_i921)
{
- _elem880 = new SQLForeignKey();
- _elem880.read(iprot);
- struct.foreignKeys.add(_elem880);
+ _elem920 = new SQLForeignKey();
+ _elem920.read(iprot);
+ struct.foreignKeys.add(_elem920);
}
iprot.readListEnd();
}
@@ -47559,14 +47879,14 @@ import org.slf4j.LoggerFactory;
case 4: // UNIQUE_CONSTRAINTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list882 = iprot.readListBegin();
- struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list882.size);
- SQLUniqueConstraint _elem883;
- for (int _i884 = 0; _i884 < _list882.size; ++_i884)
+ org.apache.thrift.protocol.TList _list922 = iprot.readListBegin();
+ struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list922.size);
+ SQLUniqueConstraint _elem923;
+ for (int _i924 = 0; _i924 < _list922.size; ++_i924)
{
- _elem883 = new SQLUniqueConstraint();
- _elem883.read(iprot);
- struct.uniqueConstraints.add(_elem883);
+ _elem923 = new SQLUniqueConstraint();
+ _elem923.read(iprot);
+ struct.uniqueConstraints.add(_elem923);
}
iprot.readListEnd();
}
@@ -47578,14 +47898,14 @@ import org.slf4j.LoggerFactory;
case 5: // NOT_NULL_CONSTRAINTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list885 = iprot.readListBegin();
- struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list885.size);
- SQLNotNullConstraint _elem886;
- for (int _i887 = 0; _i887 < _list885.size; ++_i887)
+ org.apache.thrift.protocol.TList _list925 = iprot.readListBegin();
+ struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list925.size);
+ SQLNotNullConstraint _elem926;
+ for (int _i927 = 0; _i927 < _list925.size; ++_i927)
{
- _elem886 = new SQLNotNullConstraint();
- _elem886.read(iprot);
- struct.notNullConstraints.add(_elem886);
+ _elem926 = new SQLNotNullConstraint();
+ _elem926.read(iprot);
+ struct.notNullConstraints.add(_elem926);
}
iprot.readListEnd();
}
@@ -47616,9 +47936,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size()));
- for (SQLPrimaryKey _iter888 : struct.primaryKeys)
+ for (SQLPrimaryKey _iter928 : struct.primaryKeys)
{
- _iter888.write(oprot);
+ _iter928.write(oprot);
}
oprot.writeListEnd();
}
@@ -47628,9 +47948,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size()));
- for (SQLForeignKey _iter889 : struct.foreignKeys)
+ for (SQLForeignKey _iter929 : struct.foreignKeys)
{
- _iter889.write(oprot);
+ _iter929.write(oprot);
}
oprot.writeListEnd();
}
@@ -47640,9 +47960,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(UNIQUE_CONSTRAINTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraints.size()));
- for (SQLUniqueConstraint _iter890 : struct.uniqueConstraints)
+ for (SQLUniqueConstraint _iter930 : struct.uniqueConstraints)
{
- _iter890.write(oprot);
+ _iter930.write(oprot);
}
oprot.writeListEnd();
}
@@ -47652,9 +47972,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(NOT_NULL_CONSTRAINTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraints.size()));
- for (SQLNotNullConstraint _iter891 : struct.notNullConstraints)
+ for (SQLNotNullConstraint _iter931 : struct.notNullConstraints)
{
- _iter891.write(oprot);
+ _iter931.write(oprot);
}
oprot.writeListEnd();
}
@@ -47700,36 +48020,36 @@ import org.slf4j.LoggerFactory;
if (struct.isSetPrimaryKeys()) {
{
oprot.writeI32(struct.primaryKeys.size());
- for (SQLPrimaryKey _iter892 : struct.primaryKeys)
+ for (SQLPrimaryKey _iter932 : struct.primaryKeys)
{
- _iter892.write(oprot);
+ _iter932.write(oprot);
}
}
}
if (struct.isSetForeignKeys()) {
{
oprot.writeI32(struct.foreignKeys.size());
- for (SQLForeignKey _iter893 : struct.foreignKeys)
+ for (SQLForeignKey _iter933 : struct.foreignKeys)
{
- _iter893.write(oprot);
+ _iter933.write(oprot);
}
}
}
if (struct.isSetUniqueConstraints()) {
{
oprot.writeI32(struct.uniqueConstraints.size());
- for (SQLUniqueConstraint _iter894 : struct.uniqueConstraints)
+ for (SQLUniqueConstraint _iter934 : struct.uniqueConstraints)
{
- _iter894.write(oprot);
+ _iter934.write(oprot);
}
}
}
if (struct.isSetNotNullConstraints()) {
{
oprot.writeI32(struct.notNullConstraints.size());
- for (SQLNotNullConstraint _iter895 : struct.notNullConstraints)
+ for (SQLNotNullConstraint _iter935 : struct.notNullConstraints)
{
- _iter895.write(oprot);
+ _iter935.write(oprot);
}
}
}
@@ -47746,56 +48066,56 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list896 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list896.size);
- SQLPrimaryKey _elem897;
- for (int _i898 = 0; _i898 < _list896.size; ++_i898)
+ org.apache.thrift.protocol.TList _list936 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list936.size);
+ SQLPrimaryKey _elem937;
+ for (int _i938 = 0; _i938 < _list936.size; ++_i938)
{
- _elem897 = new SQLPrimaryKey();
- _elem897.read(iprot);
- struct.primaryKeys.add(_elem897);
+ _elem937 = new SQLPrimaryKey();
+ _elem937.read(iprot);
+ struct.primaryKeys.add(_elem937);
}
}
struct.setPrimaryKeysIsSet(true);
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list899 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.foreignKeys = new ArrayList<SQLForeignKey>(_list899.size);
- SQLForeignKey _elem900;
- for (int _i901 = 0; _i901 < _list899.size; ++_i901)
+ org.apache.thrift.protocol.TList _list939 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.foreignKeys = new ArrayList<SQLForeignKey>(_list939.size);
+ SQLForeignKey _elem940;
+ for (int _i941 = 0; _i941 < _list939.size; ++_i941)
{
- _elem900 = new SQLForeignKey();
- _elem900.read(iprot);
- struct.foreignKeys.add(_elem900);
+ _elem940 = new SQLForeignKey();
+ _elem940.read(iprot);
+ struct.foreignKeys.add(_elem940);
}
}
struct.setForeignKeysIsSet(true);
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list902 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list902.size);
- SQLUniqueConstraint _elem903;
- for (int _i904 = 0; _i904 < _list902.size; ++_i904)
+ org.apache.thrift.protocol.TList _list942 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list942.size);
+ SQLUniqueConstraint _elem943;
+ for (int _i944 = 0; _i944 < _list942.size; ++_i944)
{
- _elem903 = new SQLUniqueConstraint();
- _elem903.read(iprot);
- struct.uniqueConstraints.add(_elem903);
+ _elem943 = new SQLUniqueConstraint();
+ _elem943.read(iprot);
+ struct.uniqueConstraints.add(_elem943);
}
}
struct.setUniqueConstraintsIsSet(true);
}
if (incoming.get(4)) {
{
- org.apache.thrift.protocol.TList _list905 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list905.size);
- SQLNotNullConstraint _elem906;
- for (int _i907 = 0; _i907 < _list905.size; ++_i907)
+ org.apache.thrift.protocol.TList _list945 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list945.size);
+ SQLNotNullConstraint _elem946;
+ for (int _i947 = 0; _i947 < _list945.size; ++_i947)
{
- _elem906 = new SQLNotNullConstraint();
- _elem906.read(iprot);
- struct.notNullConstraints.add(_elem906);
+ _elem946 = new SQLNotNullConstraint();
+ _elem946.read(iprot);
+ struct.notNullConstraints.add(_elem946);
}
}
struct.setNotNullConstraintsIsSet(true);
@@ -55287,13 +55607,13 @@ import org.slf4j.LoggerFactory;
case 3: // PART_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list908 = iprot.readListBegin();
- struct.partNames = new ArrayList<String>(_list908.size);
- String _elem909;
- for (int _i910 = 0; _i910 < _list908.size; ++_i910)
+ org.apache.thrift.protocol.TList _list948 = iprot.readListBegin();
+ struct.partNames = new ArrayList<String>(_list948.size);
+ String _elem949;
+ for (int _i950 = 0; _i950 < _list948.size; ++_i950)
{
- _elem909 = iprot.readString();
- struct.partNames.add(_elem909);
+ _elem949 = iprot.readString();
+ struct.partNames.add(_elem949);
}
iprot.readListEnd();
}
@@ -55329,9 +55649,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(PART_NAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size()));
- for (String _iter911 : struct.partNames)
+ for (String _iter951 : struct.partNames)
{
- oprot.writeString(_iter911);
+ oprot.writeString(_iter951);
}
oprot.writeListEnd();
}
@@ -55374,9 +55694,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetPartNames()) {
{
oprot.writeI32(struct.partNames.size());
- for (String _iter912 : struct.partNames)
+ for (String _iter952 : struct.partNames)
{
- oprot.writeString(_iter912);
+ oprot.writeString(_iter952);
}
}
}
@@ -55396,13 +55716,13 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list913 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.partNames = new ArrayList<String>(_list913.size);
- String _elem914;
- for (int _i915 = 0; _i915 < _list913.size; ++_i915)
+ org.apache.thrift.protocol.TList _list953 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.partNames = new ArrayList<String>(_list953.size);
+ String _elem954;
+ for (int _i955 = 0; _i955 < _list953.size; ++_i955)
{
- _elem914 = iprot.readString();
- struct.partNames.add(_elem914);
+ _elem954 = iprot.readString();
+ struct.partNames.add(_elem954);
}
}
struct.setPartNamesIsSet(true);
@@ -56627,13 +56947,13 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list916 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list916.size);
- String _elem917;
- for (int _i918 = 0; _i918 < _list916.size; ++_i918)
+ org.apache.thrift.protocol.TList _list956 = iprot.readListBegin();
+ struct.success = new ArrayList<String>(_list956.size);
+ String _elem957;
+ for (int _i958 = 0; _i958 < _list956.size; ++_i958)
{
- _elem917 = iprot.readString();
- struct.success.add(_elem917);
+ _elem957 = iprot.readString();
+ struct.success.add(_elem957);
}
iprot.readListEnd();
}
@@ -56668,9 +56988,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter919 : struct.success)
+ for (String _iter959 : struct.success)
{
- oprot.writeString(_iter919);
+ oprot.writeString(_iter959);
}
oprot.writeListEnd();
}
@@ -56709,9 +57029,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (String _iter920 : struct.success)
+ for (String _iter960 : struct.success)
{
- oprot.writeString(_iter920);
+ oprot.writeString(_iter960);
}
}
}
@@ -56726,13 +57046,13 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list921 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list921.size);
- String _elem922;
- for (int _i923 = 0; _i923 < _list921.size; ++_i923)
+ org.apache.thrift.protocol.TList _list961 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new ArrayList<String>(_list961.size);
+ String _elem962;
+ for (int _i963 = 0; _i963 < _list961.size; ++_i963)
{
- _elem922 = iprot.readString();
- struct.success.add(_elem922);
+ _elem962 = iprot.readString();
+ struct.success.add(_elem962);
}
}
struct.setSuccessIsSet(true);
@@ -57706,13 +58026,13 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list924 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list924.size);
- String _elem925;
- for (int _i926 = 0; _i926 < _list924.size; ++_i926)
+ org.apache.thrift.protocol.TList _list964 = iprot.readListBegin();
+ struct.success = new ArrayList<String>(_list964.size);
+ String _elem965;
+ for (int _i966 = 0; _i966 < _list964.size; ++_i966)
{
- _elem925 = iprot.readString();
- struct.success.add(_elem925);
+ _elem965 = iprot.readString();
+ struct.success.add(_elem965);
}
iprot.readListEnd();
}
@@ -57747,9 +58067,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter927 : struct.success)
+ for (String _iter967 : struct.success)
{
- oprot.writeString(_iter927);
+ oprot.writeString(_iter967);
}
oprot.writeListEnd();
}
@@ -57788,9 +58108,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (String _iter928 : struct.success)
+ for (String _iter968 : struct.success)
{
- oprot.writeString(_iter928);
+ oprot.writeString(_iter968);
}
}
}
@@ -57805,13 +58125,13 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list929 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list929.size);
- String _elem930;
- for (int _i931 = 0; _i931 < _list929.size; ++_i931)
+ org.apache.thrift.protocol.TList _list969 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new ArrayList<String>(_list969.size);
+ String _elem970;
+ for (int _i971 = 0; _i971 < _list969.size; ++_i971)
{
- _elem930 = iprot.readString();
- struct.success.add(_elem930);
+ _elem970 = iprot.readString();
+ struct.success.add(_elem970);
}
}
struct.setSuccessIsSet(true);
@@ -58577,13 +58897,13 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list932 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list932.size);
- String _elem933;
- for (int _i934 = 0; _i934 < _list932.size; ++_i934)
+ org.apache.thrift.protocol.TList _list972 = iprot.readListBegin();
+ struct.success = new ArrayList<String>(_list972.size);
+ String _elem973;
+ for (int _i974 = 0; _i974 < _list972.size; ++_i974)
{
- _elem933 = iprot.readString();
- struct.success.add(_elem933);
+ _elem973 = iprot.readString();
+ struct.success.add(_elem973);
}
iprot.readListEnd();
}
@@ -58618,9 +58938,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter935 : struct.success)
+ for (String _iter975 : struct.success)
{
- oprot.writeString(_iter935);
+ oprot.writeString(_iter975);
}
oprot.writeListEnd();
}
@@ -58659,9 +58979,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (String _iter936 : struct.success)
+ for (String _iter976 : struct.success)
{
- oprot.writeString(_iter936);
+ oprot.writeString(_iter976);
}
}
}
@@ -58676,13 +58996,13 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list937 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list937.size);
- String _elem938;
- for (int _i939 = 0; _i939 < _list937.size; ++_i939)
+ org.apache.thrift.protocol.TList _list977 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new ArrayList<String>(_list977.size);
+ String _elem978;
+ for (int _i979 = 0; _i979 < _list977.size; ++_i979)
{
- _elem938 = iprot.readString();
- struct.success.add(_elem938);
+ _elem978 = iprot.readString();
+ struct.success.add(_elem978);
}
}
struct.setSuccessIsSet(true);
@@ -59187,13 +59507,13 @@ import org.slf4j.LoggerFactory;
case 3: // TBL_TYPES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list940 = iprot.readListBegin();
- struct.tbl_types = new ArrayList<String>(_list940.size);
- String _elem941;
- for (int _i942 = 0; _i942 < _list940.size; ++_i942)
+ org.apache.thrift.protocol.TList _list980 = iprot.readListBegin();
+ struct.tbl_types = new ArrayList<String>(_list980.size);
+ String _elem981;
+ for (int _i982 = 0; _i982 < _list980.size; ++_i982)
{
- _elem941 = iprot.readString();
- struct.tbl_types.add(_elem941);
+ _elem981 = iprot.readString();
+ struct.tbl_types.add(_elem981);
}
iprot.readListEnd();
}
@@ -59229,9 +59549,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TBL_TYPES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_types.size()));
- for (String _iter943 : struct.tbl_types)
+ for (String _iter983 : struct.tbl_types)
{
- oprot.writeString(_iter943);
+ oprot.writeString(_iter983);
}
oprot.writeListEnd();
}
@@ -59274,9 +59594,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetTbl_types()) {
{
oprot.writeI32(struct.tbl_types.size());
- for (String _iter944 : struct.tbl_types)
+ for (String _iter984 : struct.tbl_types)
{
- oprot.writeString(_iter944);
+ oprot.writeString(_iter984);
}
}
}
@@ -59296,13 +59616,13 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list945 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tbl_types = new ArrayList<String>(_list945.size);
- String _elem946;
- for (int _i947 = 0; _i947 < _list945.size; ++_i947)
+ org.apache.thrift.protocol.TList _list985 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.tbl_types = new ArrayList<String>(_list985.size);
+ String _elem986;
+ for (int _i987 = 0; _i987 < _list985.size; ++_i987)
{
- _elem946 = iprot.readString();
- struct.tbl_types.add(_elem946);
+ _elem986 = iprot.readString();
+ struct.tbl_types.add(_elem986);
}
}
struct.setTbl_typesIsSet(true);
@@ -59708,14 +60028,14 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list948 = iprot.readListBegin();
- struct.success = new ArrayList<TableMeta>(_list948.size);
- TableMeta _elem949;
- for (int _i950 = 0; _i950 < _list948.size; ++_i950)
+ org.apache.thrift.protocol.TList _list988 = iprot.readListBegin();
+ struct.success = new ArrayList<TableMeta>(_list988.size);
+ TableMeta _elem989;
+ for (int _i990 = 0; _i990 < _list988.size; ++_i990)
{
- _elem949 = new TableMeta();
- _elem949.read(iprot);
- struct.success.add(_elem949);
+ _elem989 = new TableMeta();
+ _elem989.read(iprot);
+ struct.success.add(_elem989);
}
iprot.readListEnd();
}
@@ -59750,9 +60070,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (TableMeta _iter951 : struct.success)
+ for (TableMeta _iter991 : struct.success)
{
- _iter951.write(oprot);
+ _iter991.write(oprot);
}
oprot.writeListEnd();
}
@@ -59791,9 +60111,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (TableMeta _iter952 : struct.success)
+ for (TableMeta _iter992 : struct.success)
{
- _iter952.write(oprot);
+ _iter992.write(oprot);
}
}
}
@@ -59808,14 +60128,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list953 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<TableMeta>(_list953.size);
- TableMeta _elem954;
- for (int _i955 = 0; _i955 < _list953.size; ++_i955)
+ org.apache.thrift.protocol.TList _list993 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<TableMeta>(_list993.size);
+ TableMeta _elem994;
+ for (int _i995 = 0; _i995 < _list993.size; ++_i995)
{
- _elem954 = new TableMeta();
- _elem954.read(iprot);
- struct.success.add(_elem954);
+ _elem994 = new TableMeta();
+ _elem994.read(iprot);
+ struct.success.add(_elem994);
}
}
struct.setSuccessIsSet(true);
@@ -60581,13 +60901,13 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list956 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list956.size);
- String _elem957;
- for (int _i958 = 0; _i958 < _list956.size; ++_i958)
+ org.apache.thrift.protocol.TList _list996 = iprot.readListBegin();
+ struct.success = new ArrayList<String>(_list996.size);
+ String _elem997;
+ for (int _i998 = 0; _i998 < _list996.size; ++_i998)
{
- _elem957 = iprot.readString();
- struct.success.add(_elem957);
+ _elem997 = iprot.readString();
+ struct.success.add(_elem997);
}
iprot.readListEnd();
}
@@ -60622,9 +60942,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter959 : struct.success)
+ for (String _iter999 : struct.success)
{
- oprot.writeString(_iter959);
+ oprot.writeString(_iter999);
}
oprot.writeListEnd();
}
@@ -60663,9 +60983,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (String _iter960 : struct.success)
+ for (String _iter1000 : struct.success)
{
- oprot.writeString(_iter960);
+ oprot.writeString(_iter1000);
}
}
}
@@ -60680,13 +61000,13 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list961 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list961.size);
- String _elem962;
- for (int _i963 = 0; _i963 < _list961.size; ++_i963)
+ org.apache.thrift.protocol.TList _list1001 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.success = new ArrayList<String>(_list1001.size);
+ String _elem1002;
+ for (int _i1003 = 0; _i1003 < _list1001.size; ++_i1003)
{
- _elem962 = iprot.readString();
- struct.success.add(_elem962);
+ _elem1002 = iprot.readString();
+ struct.success.add(_elem1002);
}
}
struct.setSuccessIsSet(true);
@@ -62139,13 +62459,13 @@ import org.slf4j.LoggerFactory;
case 2: // TBL_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list964 = iprot.readListBegin();
- struct.tbl_names = new ArrayList<String>(_list964.size);
- String _elem965;
- for (int _i966 = 0; _i966 < _list964.size; ++_i966)
+ org.apache.thrift.protocol.TList _list1004 = iprot.readListBegin();
+ struct.tbl_names = new ArrayList<String>(_list1004.size);
+ String _elem1005;
+ for (int _i1006 = 0; _i1006 < _list1004.size; ++_i1006)
{
- _elem965 = iprot.readString();
- struct.tbl_names.add(_elem965);
+ _elem1005 = iprot.readString();
+ struct.tbl_names.add(_elem1005);
}
iprot.readListEnd();
}
@@ -62176,9 +62496,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_names.size()));
- for (String _iter967 : struct.tbl_names)
+ for (String _iter1007 : struct.tbl_names)
{
- oprot.writeString(_iter967);
+ oprot.writeString(_iter1007);
}
oprot.writeListEnd();
}
@@ -62215,9 +62535,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetTbl_names()) {
{
oprot.writeI32(struct.tbl_names.size());
- for (String _iter968 : struct.tbl_names)
+ for (String _iter1008 : struct.tbl_names)
{
- oprot.writeString(_iter968);
+ oprot.writeString(_iter1008);
}
}
}
@@ -62233,13 +62553,13 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list969 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tbl_names = new ArrayList<String>(_list969.size);
- String _elem970;
- for (int _i971 = 0; _i971 < _list969.size; ++_i971)
+ org.apache.thrift.protocol.TList _list1009 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.tbl_names = new ArrayList<String>(_list1009.size);
+ String _elem1010;
+ for (int _i1011 = 0; _i1011 < _list1009.size; ++_i1011)
{
- _elem970 = iprot.readString();
- struct.tbl_names.add(_elem970);
+ _elem1010 = iprot.readString();
+ struct.tbl_names.add(_elem1010);
}
}
struct.setTbl_namesIsSet(true);
@@ -62564,14 +62884,14 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list972 = iprot.readListBegin();
- struct.success = new ArrayList<Table>(_list972.size);
- Table _elem973;
- for (int _i974 = 0; _i974 < _list972.size; ++_i974)
+ org.apache.thrift.protocol.TList _list1012 = iprot.readListBegin();
+ struct.success = new ArrayList<Table>(_list1012.size);
+ Table _elem1013;
+ for (int _i1014 = 0; _i1014 < _list1012.size; ++_i1014)
{
- _elem973 = new Table();
- _elem973.read(iprot);
- struct.success.add(_elem973);
+ _elem1013 = new Table();
+ _elem1013.read(iprot);
+ struct.success.add(_elem1013);
}
iprot.readListEnd();
}
@@ -62597,9 +62917,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Table _iter975 : struct.success)
+ for (Table _iter1015 : struct.success)
{
- _iter975.write(oprot);
+ _iter1015.write(oprot);
}
oprot.writeListEnd();
}
@@ -62630,9 +62950,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Table _iter976 : struct.success)
+ for (Table _iter1016 : struct.success)
{
- _iter976.write(oprot);
+ _iter1016.write(oprot);
}
}
}
@@ -62644,14 +62964,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list977 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Table>(_list977.size);
- Table _elem978;
- for (int _i979 = 0; _i979 < _list977.size; ++_i979)
+ org.apache.thrift.protocol.TList _list1017 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<Table>(_list1017.size);
+ Table _elem1018;
+ for (int _i1019 = 0; _i1019 < _list1017.size; ++_i1019)
{
- _elem978 = new Table();
- _elem978.read(iprot);
- struct.success.add(_elem978);
+ _elem1018 = new Table();
+ _elem1018.read(iprot);
+ struct.success.add(_elem1018);
}
}
struct.setSuccessIsSet(true);
@@ -65044,13 +65364,13 @@ import org.slf4j.LoggerFactory;
case 2: // TBL_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list980 = iprot.readListBegin();
- struct.tbl_names = new ArrayList<String>(_list980.size);
- String _elem981;
- for (int _i982 = 0; _i982 < _list980.size; ++_i982)
+ org.apache.thrift.protocol.TList _list1020 = iprot.readListBegin();
+ struct.tbl_names = new ArrayList<String>(_list1020.size);
+ String _elem1021;
+ for (int _i1022 = 0; _i1022 < _list1020.size; ++_i1022)
{
- _elem981 = iprot.readString();
- struct.tbl_names.add(_elem981);
+ _elem1021 = iprot.readString();
+ struct.tbl_names.add(_elem1021);
}
iprot.readListEnd();
}
@@ -65081,9 +65401,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_names.size()));
- for (String _iter983 : struct.tbl_names)
+ for (String _iter1023 : struct.tbl_names)
{
- oprot.writeString(_iter983);
+ oprot.writeString(_iter1023);
}
oprot.writeListEnd();
}
@@ -65120,9 +65440,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetTbl_names()) {
{
oprot.writeI32(struct.tbl_names.size());
- for (String _iter984 : struct.tbl_names)
+ for (String _iter1024 : struct.tbl_names)
{
- oprot.writeString(_iter984);
+ oprot.writeString(_iter1024);
}
}
}
@@ -65138,13 +65458,13 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list985 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tbl_names = new ArrayList<String>(_list985.size);
- String _elem986;
- for (int _i987 = 0; _i987 < _list985.size; ++_i987)
+ org.apache.thrift.protocol.TList _list1025 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.tbl_names = new ArrayList<String>(_list1025.size);
+ String _elem1026;
+ for (int _i1027 = 0; _i1027 < _list1025.size; ++_i1027)
{
- _elem986 = iprot.readString();
- struct.tbl_names.add(_elem986);
+ _elem1026 = iprot.readString();
+ struct.tbl_names.add(_elem1026);
}
}
struct.setTbl_namesIsSet(true);
@@ -65717,16 +66037,16 @@ import org.slf4j.LoggerFactory;
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map988 = iprot.readMapBegin();
- struct.success = new HashMap<String,Materialization>(2*_map988.size);
- String _key989;
- Materialization _val990;
- for (int _i991 = 0; _i991 < _map988.size; ++_i991)
+ org.apache.thrift.protocol.TMap _map1028 = iprot.readMapBegin();
+ struct.success = new HashMap<String,Materialization>(2*_map1028.size);
+ String _key1029;
+ Materialization _val1030;
+ for (int _i1031 = 0; _i1031 < _map1028.size; ++_i1031)
{
- _key989 = iprot.readString();
- _val990 = new Materialization();
- _val990.read(iprot);
- struct.success.put(_key989, _val990);
+ _key1029 = iprot.readString();
+ _val1030 = new Materialization();
+ _val1030.read(iprot);
+ struct.success.put(_key1029, _val1030);
}
iprot.readMapEnd();
}
@@ -65779,10 +66099,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Map.Entry<String, Materialization> _iter992 : struct.success.entrySet())
+ for (Map.Entry<String, Materialization> _iter1032 : struct.success.entrySet())
{
- oprot.writeString(_iter992.getKey());
- _iter992.getValue().write(oprot);
+ oprot.writeString(_iter1032.getKey());
+ _iter1032.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -65837,10 +66157,10 @@ import org.slf4j.LoggerFactory;
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Map.Entry<String, Materialization> _iter993 : struct.success.entrySet())
+ for (Map.Entry<String, Materialization> _iter1033 : struct.success.entrySet())
{
- oprot.writeString(_iter993.getKey());
- _iter993.getValue().write(oprot);
+ oprot.writeString(_iter1033.getKey());
+ _iter1033.getValue().write(oprot);
}
}
}
@@ -65861,16 +66181,16 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map994 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new HashM
<TRUNCATED>
[18/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java
index d4b29d5..d67b1e9 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java
@@ -27,8 +27,8 @@ import java.util.TreeMap;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidReadTxnList;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidReaderWriteIdList;
+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.api.hive_metastoreConstants;
@@ -72,7 +72,7 @@ public class VectorizedOrcAcidRowBatchReader
protected float progress = 0.0f;
protected Object[] partitionValues;
private boolean addPartitionCols = true;
- private final ValidTxnList validTxnList;
+ private final ValidWriteIdList validWriteIdList;
private final DeleteEventRegistry deleteEventRegistry;
/**
* {@link RecordIdentifier}/{@link VirtualColumn#ROWID} information
@@ -183,8 +183,10 @@ public class VectorizedOrcAcidRowBatchReader
partitionValues = null;
}
- String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY);
- this.validTxnList = (txnString == null) ? new ValidReadTxnList() : new ValidReadTxnList(txnString);
+ String txnString = conf.get(ValidWriteIdList.VALID_WRITEIDS_KEY);
+ this.validWriteIdList = (txnString == null) ? new ValidReaderWriteIdList() : new ValidReaderWriteIdList(txnString);
+ LOG.debug("VectorizedOrcAcidRowBatchReader:: Read ValidWriteIdList: " + this.validWriteIdList.toString()
+ + " isFullAcidTable: " + AcidUtils.isFullAcidScan(conf));
// Clone readerOptions for deleteEvents.
Reader.Options deleteEventReaderOptions = readerOptions.clone();
@@ -214,7 +216,7 @@ public class VectorizedOrcAcidRowBatchReader
}
rowIdProjected = areRowIdsProjected(rbCtx);
rootPath = orcSplit.getRootDir();
- syntheticProps = computeOffsetAndBucket(orcSplit, conf, validTxnList);
+ syntheticProps = computeOffsetAndBucket(orcSplit, conf, validWriteIdList);
}
/**
@@ -242,8 +244,8 @@ public class VectorizedOrcAcidRowBatchReader
* before/during split computation and passing the info in the split. (HIVE-17917)
*/
private OffsetAndBucketProperty computeOffsetAndBucket(
- OrcSplit split, JobConf conf,ValidTxnList validTxnList) throws IOException {
- if(!needSyntheticRowIds(split.isOriginal(), !deleteEventRegistry.isEmpty(), rowIdProjected)) {
+ OrcSplit split, JobConf conf, ValidWriteIdList validWriteIdList) throws IOException {
+ if (!needSyntheticRowIds(split.isOriginal(), !deleteEventRegistry.isEmpty(), rowIdProjected)) {
if(split.isOriginal()) {
/**
* Even if we don't need to project ROW_IDs, we still need to check the transaction ID that
@@ -252,22 +254,20 @@ public class VectorizedOrcAcidRowBatchReader
* filter out base/delta files but this makes fewer dependencies)
*/
OrcRawRecordMerger.TransactionMetaData syntheticTxnInfo =
- OrcRawRecordMerger.TransactionMetaData.findTransactionIDForSynthetcRowIDs(split.getPath(),
- split.getRootDir(), conf);
- return new OffsetAndBucketProperty(-1,-1,
- syntheticTxnInfo.syntheticTransactionId);
+ OrcRawRecordMerger.TransactionMetaData.findWriteIDForSynthetcRowIDs(split.getPath(),
+ split.getRootDir(), conf);
+ return new OffsetAndBucketProperty(-1,-1, syntheticTxnInfo.syntheticWriteId);
}
return null;
}
long rowIdOffset = 0;
OrcRawRecordMerger.TransactionMetaData syntheticTxnInfo =
- OrcRawRecordMerger.TransactionMetaData.findTransactionIDForSynthetcRowIDs(split.getPath(),
- split.getRootDir(), conf);
+ OrcRawRecordMerger.TransactionMetaData.findWriteIDForSynthetcRowIDs(split.getPath(), split.getRootDir(), conf);
int bucketId = AcidUtils.parseBaseOrDeltaBucketFilename(split.getPath(), conf).getBucketId();
int bucketProperty = BucketCodec.V1.encode(new AcidOutputFormat.Options(conf)
.statementId(syntheticTxnInfo.statementId).bucket(bucketId));
AcidUtils.Directory directoryState = AcidUtils.getAcidState( syntheticTxnInfo.folder, conf,
- validTxnList, false, true);
+ validWriteIdList, false, true);
for (HadoopShims.HdfsFileStatusWithId f : directoryState.getOriginalFiles()) {
AcidOutputFormat.Options bucketOptions =
AcidUtils.parseBaseOrDeltaBucketFilename(f.getFileStatus().getPath(), conf);
@@ -283,7 +283,7 @@ public class VectorizedOrcAcidRowBatchReader
rowIdOffset += reader.getNumberOfRows();
}
return new OffsetAndBucketProperty(rowIdOffset, bucketProperty,
- syntheticTxnInfo.syntheticTransactionId);
+ syntheticTxnInfo.syntheticWriteId);
}
/**
* {@link VectorizedOrcAcidRowBatchReader} is always used for vectorized reads of acid tables.
@@ -426,7 +426,7 @@ public class VectorizedOrcAcidRowBatchReader
" to handle original files that require ROW__IDs: " + rootPath);
}
/**
- * {@link RecordIdentifier#getTransactionId()}
+ * {@link RecordIdentifier#getWriteId()}
*/
recordIdColumnVector.fields[0].noNulls = true;
recordIdColumnVector.fields[0].isRepeating = true;
@@ -450,11 +450,11 @@ public class VectorizedOrcAcidRowBatchReader
}
//Now populate a structure to use to apply delete events
innerRecordIdColumnVector = new ColumnVector[OrcRecordUpdater.FIELDS];
- innerRecordIdColumnVector[OrcRecordUpdater.ORIGINAL_TRANSACTION] = recordIdColumnVector.fields[0];
+ innerRecordIdColumnVector[OrcRecordUpdater.ORIGINAL_WRITEID] = recordIdColumnVector.fields[0];
innerRecordIdColumnVector[OrcRecordUpdater.BUCKET] = recordIdColumnVector.fields[1];
innerRecordIdColumnVector[OrcRecordUpdater.ROW_ID] = recordIdColumnVector.fields[2];
//these are insert events so (original txn == current) txn for all rows
- innerRecordIdColumnVector[OrcRecordUpdater.CURRENT_TRANSACTION] = recordIdColumnVector.fields[0];
+ innerRecordIdColumnVector[OrcRecordUpdater.CURRENT_WRITEID] = recordIdColumnVector.fields[0];
}
if(syntheticProps.syntheticTxnId > 0) {
//"originals" (written before table was converted to acid) is considered written by
@@ -470,7 +470,7 @@ public class VectorizedOrcAcidRowBatchReader
* reader (transactions) is concerned. Since here we are reading 'original' schema file,
* all rows in it have been created by the same txn, namely 'syntheticProps.syntheticTxnId'
*/
- if (!validTxnList.isTxnValid(syntheticProps.syntheticTxnId)) {
+ if (!validWriteIdList.isWriteIdValid(syntheticProps.syntheticTxnId)) {
selectedBitSet.clear(0, vectorizedRowBatchBase.size);
}
}
@@ -514,7 +514,7 @@ public class VectorizedOrcAcidRowBatchReader
// Transfer columnVector objects from base batch to outgoing batch.
System.arraycopy(payloadStruct.fields, 0, value.cols, 0, value.getDataColumnCount());
if(rowIdProjected) {
- recordIdColumnVector.fields[0] = vectorizedRowBatchBase.cols[OrcRecordUpdater.ORIGINAL_TRANSACTION];
+ recordIdColumnVector.fields[0] = vectorizedRowBatchBase.cols[OrcRecordUpdater.ORIGINAL_WRITEID];
recordIdColumnVector.fields[1] = vectorizedRowBatchBase.cols[OrcRecordUpdater.BUCKET];
recordIdColumnVector.fields[2] = vectorizedRowBatchBase.cols[OrcRecordUpdater.ROW_ID];
}
@@ -531,24 +531,24 @@ public class VectorizedOrcAcidRowBatchReader
}
private void findRecordsWithInvalidTransactionIds(ColumnVector[] cols, int size, BitSet selectedBitSet) {
- if (cols[OrcRecordUpdater.CURRENT_TRANSACTION].isRepeating) {
+ if (cols[OrcRecordUpdater.CURRENT_WRITEID].isRepeating) {
// When we have repeating values, we can unset the whole bitset at once
// if the repeating value is not a valid transaction.
long currentTransactionIdForBatch = ((LongColumnVector)
- cols[OrcRecordUpdater.CURRENT_TRANSACTION]).vector[0];
- if (!validTxnList.isTxnValid(currentTransactionIdForBatch)) {
+ cols[OrcRecordUpdater.CURRENT_WRITEID]).vector[0];
+ if (!validWriteIdList.isWriteIdValid(currentTransactionIdForBatch)) {
selectedBitSet.clear(0, size);
}
return;
}
long[] currentTransactionVector =
- ((LongColumnVector) cols[OrcRecordUpdater.CURRENT_TRANSACTION]).vector;
+ ((LongColumnVector) cols[OrcRecordUpdater.CURRENT_WRITEID]).vector;
// Loop through the bits that are set to true and mark those rows as false, if their
// current transactions are not valid.
for (int setBitIndex = selectedBitSet.nextSetBit(0);
setBitIndex >= 0;
setBitIndex = selectedBitSet.nextSetBit(setBitIndex+1)) {
- if (!validTxnList.isTxnValid(currentTransactionVector[setBitIndex])) {
+ if (!validWriteIdList.isWriteIdValid(currentTransactionVector[setBitIndex])) {
selectedBitSet.clear(setBitIndex);
}
}
@@ -630,30 +630,33 @@ public class VectorizedOrcAcidRowBatchReader
private OrcRawRecordMerger.ReaderKey deleteRecordKey;
private OrcStruct deleteRecordValue;
private Boolean isDeleteRecordAvailable = null;
- private ValidTxnList validTxnList;
+ private ValidWriteIdList validWriteIdList;
SortMergedDeleteEventRegistry(JobConf conf, OrcSplit orcSplit, Reader.Options readerOptions)
- throws IOException {
- final Path[] deleteDeltas = getDeleteDeltaDirsFromSplit(orcSplit);
- if (deleteDeltas.length > 0) {
- int bucket = AcidUtils.parseBaseOrDeltaBucketFilename(orcSplit.getPath(), conf).getBucketId();
- String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY);
- this.validTxnList = (txnString == null) ? new ValidReadTxnList() : new ValidReadTxnList(txnString);
- OrcRawRecordMerger.Options mergerOptions = new OrcRawRecordMerger.Options().isDeleteReader(true);
- assert !orcSplit.isOriginal() : "If this now supports Original splits, set up mergeOptions properly";
- this.deleteRecords = new OrcRawRecordMerger(conf, true, null, false, bucket,
- validTxnList, readerOptions, deleteDeltas,
- mergerOptions);
- this.deleteRecordKey = new OrcRawRecordMerger.ReaderKey();
- this.deleteRecordValue = this.deleteRecords.createValue();
- // Initialize the first value in the delete reader.
- this.isDeleteRecordAvailable = this.deleteRecords.next(deleteRecordKey, deleteRecordValue);
- } else {
- this.isDeleteRecordAvailable = false;
- this.deleteRecordKey = null;
- this.deleteRecordValue = null;
- this.deleteRecords = null;
- }
+ throws IOException {
+ final Path[] deleteDeltas = getDeleteDeltaDirsFromSplit(orcSplit);
+ if (deleteDeltas.length > 0) {
+ int bucket = AcidUtils.parseBaseOrDeltaBucketFilename(orcSplit.getPath(), conf).getBucketId();
+ String txnString = conf.get(ValidWriteIdList.VALID_WRITEIDS_KEY);
+ this.validWriteIdList
+ = (txnString == null) ? new ValidReaderWriteIdList() : new ValidReaderWriteIdList(txnString);
+ LOG.debug("SortMergedDeleteEventRegistry:: Read ValidWriteIdList: " + this.validWriteIdList.toString()
+ + " isFullAcidTable: " + AcidUtils.isFullAcidScan(conf));
+ OrcRawRecordMerger.Options mergerOptions = new OrcRawRecordMerger.Options().isDeleteReader(true);
+ assert !orcSplit.isOriginal() : "If this now supports Original splits, set up mergeOptions properly";
+ this.deleteRecords = new OrcRawRecordMerger(conf, true, null, false, bucket,
+ validWriteIdList, readerOptions, deleteDeltas,
+ mergerOptions);
+ this.deleteRecordKey = new OrcRawRecordMerger.ReaderKey();
+ this.deleteRecordValue = this.deleteRecords.createValue();
+ // Initialize the first value in the delete reader.
+ this.isDeleteRecordAvailable = this.deleteRecords.next(deleteRecordKey, deleteRecordValue);
+ } else {
+ this.isDeleteRecordAvailable = false;
+ this.deleteRecordKey = null;
+ this.deleteRecordValue = null;
+ this.deleteRecords = null;
+ }
}
@Override
@@ -671,8 +674,8 @@ public class VectorizedOrcAcidRowBatchReader
}
long[] originalTransaction =
- cols[OrcRecordUpdater.ORIGINAL_TRANSACTION].isRepeating ? null
- : ((LongColumnVector) cols[OrcRecordUpdater.ORIGINAL_TRANSACTION]).vector;
+ cols[OrcRecordUpdater.ORIGINAL_WRITEID].isRepeating ? null
+ : ((LongColumnVector) cols[OrcRecordUpdater.ORIGINAL_WRITEID]).vector;
long[] bucket =
cols[OrcRecordUpdater.BUCKET].isRepeating ? null
: ((LongColumnVector) cols[OrcRecordUpdater.BUCKET]).vector;
@@ -682,7 +685,7 @@ public class VectorizedOrcAcidRowBatchReader
// The following repeatedX values will be set, if any of the columns are repeating.
long repeatedOriginalTransaction = (originalTransaction != null) ? -1
- : ((LongColumnVector) cols[OrcRecordUpdater.ORIGINAL_TRANSACTION]).vector[0];
+ : ((LongColumnVector) cols[OrcRecordUpdater.ORIGINAL_WRITEID]).vector[0];
long repeatedBucket = (bucket != null) ? -1
: ((LongColumnVector) cols[OrcRecordUpdater.BUCKET]).vector[0];
long repeatedRowId = (rowId != null) ? -1
@@ -828,12 +831,12 @@ public class VectorizedOrcAcidRowBatchReader
private final RecordReader recordReader;
private int indexPtrInBatch;
private final int bucketForSplit; // The bucket value should be same for all the records.
- private final ValidTxnList validTxnList;
+ private final ValidWriteIdList validWriteIdList;
private boolean isBucketPropertyRepeating;
private final boolean isBucketedTable;
DeleteReaderValue(Reader deleteDeltaReader, Reader.Options readerOptions, int bucket,
- ValidTxnList validTxnList, boolean isBucketedTable) throws IOException {
+ ValidWriteIdList validWriteIdList, boolean isBucketedTable) throws IOException {
this.recordReader = deleteDeltaReader.rowsOptions(readerOptions);
this.bucketForSplit = bucket;
this.batch = deleteDeltaReader.getSchema().createRowBatch();
@@ -841,7 +844,7 @@ public class VectorizedOrcAcidRowBatchReader
this.batch = null; // Oh! the first batch itself was null. Close the reader.
}
this.indexPtrInBatch = 0;
- this.validTxnList = validTxnList;
+ this.validWriteIdList = validWriteIdList;
this.isBucketedTable = isBucketedTable;
checkBucketId();//check 1st batch
}
@@ -866,7 +869,7 @@ public class VectorizedOrcAcidRowBatchReader
checkBucketId(deleteRecordKey.bucketProperty);
}
++indexPtrInBatch;
- if (validTxnList.isTxnValid(currentTransaction)) {
+ if (validWriteIdList.isWriteIdValid(currentTransaction)) {
isValidNext = true;
}
}
@@ -878,17 +881,17 @@ public class VectorizedOrcAcidRowBatchReader
}
private long setCurrentDeleteKey(DeleteRecordKey deleteRecordKey) {
int originalTransactionIndex =
- batch.cols[OrcRecordUpdater.ORIGINAL_TRANSACTION].isRepeating ? 0 : indexPtrInBatch;
- long originalTransaction =
- ((LongColumnVector) batch.cols[OrcRecordUpdater.ORIGINAL_TRANSACTION]).vector[originalTransactionIndex];
+ batch.cols[OrcRecordUpdater.ORIGINAL_WRITEID].isRepeating ? 0 : indexPtrInBatch;
+ long originalTransaction
+ = ((LongColumnVector) batch.cols[OrcRecordUpdater.ORIGINAL_WRITEID]).vector[originalTransactionIndex];
int bucketPropertyIndex =
batch.cols[OrcRecordUpdater.BUCKET].isRepeating ? 0 : indexPtrInBatch;
int bucketProperty = (int)((LongColumnVector)batch.cols[OrcRecordUpdater.BUCKET]).vector[bucketPropertyIndex];
long rowId = ((LongColumnVector) batch.cols[OrcRecordUpdater.ROW_ID]).vector[indexPtrInBatch];
- int currentTransactionIndex =
- batch.cols[OrcRecordUpdater.CURRENT_TRANSACTION].isRepeating ? 0 : indexPtrInBatch;
- long currentTransaction =
- ((LongColumnVector) batch.cols[OrcRecordUpdater.CURRENT_TRANSACTION]).vector[currentTransactionIndex];
+ int currentTransactionIndex
+ = batch.cols[OrcRecordUpdater.CURRENT_WRITEID].isRepeating ? 0 : indexPtrInBatch;
+ long currentTransaction
+ = ((LongColumnVector) batch.cols[OrcRecordUpdater.CURRENT_WRITEID]).vector[currentTransactionIndex];
deleteRecordKey.set(originalTransaction, bucketProperty, rowId);
return currentTransaction;
}
@@ -976,14 +979,17 @@ public class VectorizedOrcAcidRowBatchReader
private TreeMap<DeleteRecordKey, DeleteReaderValue> sortMerger;
private long rowIds[];
private CompressedOtid compressedOtids[];
- private ValidTxnList validTxnList;
+ private ValidWriteIdList validWriteIdList;
private Boolean isEmpty = null;
ColumnizedDeleteEventRegistry(JobConf conf, OrcSplit orcSplit,
Reader.Options readerOptions) throws IOException, DeleteEventsOverflowMemoryException {
int bucket = AcidUtils.parseBaseOrDeltaBucketFilename(orcSplit.getPath(), conf).getBucketId();
- String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY);
- this.validTxnList = (txnString == null) ? new ValidReadTxnList() : new ValidReadTxnList(txnString);
+ String txnString = conf.get(ValidWriteIdList.VALID_WRITEIDS_KEY);
+ this.validWriteIdList
+ = (txnString == null) ? new ValidReaderWriteIdList() : new ValidReaderWriteIdList(txnString);
+ LOG.debug("ColumnizedDeleteEventRegistry:: Read ValidWriteIdList: " + this.validWriteIdList.toString()
+ + " isFullAcidTable: " + AcidUtils.isFullAcidScan(conf));
this.sortMerger = new TreeMap<DeleteRecordKey, DeleteReaderValue>();
this.rowIds = null;
this.compressedOtids = null;
@@ -1025,7 +1031,7 @@ public class VectorizedOrcAcidRowBatchReader
throw new DeleteEventsOverflowMemoryException();
}
DeleteReaderValue deleteReaderValue = new DeleteReaderValue(deleteDeltaReader,
- readerOptions, bucket, validTxnList, isBucketedTable);
+ readerOptions, bucket, validWriteIdList, isBucketedTable);
DeleteRecordKey deleteRecordKey = new DeleteRecordKey();
if (deleteReaderValue.next(deleteRecordKey)) {
sortMerger.put(deleteRecordKey, deleteReaderValue);
@@ -1165,10 +1171,10 @@ public class VectorizedOrcAcidRowBatchReader
// check if it is deleted or not.
long[] originalTransactionVector =
- cols[OrcRecordUpdater.ORIGINAL_TRANSACTION].isRepeating ? null
- : ((LongColumnVector) cols[OrcRecordUpdater.ORIGINAL_TRANSACTION]).vector;
+ cols[OrcRecordUpdater.ORIGINAL_WRITEID].isRepeating ? null
+ : ((LongColumnVector) cols[OrcRecordUpdater.ORIGINAL_WRITEID]).vector;
long repeatedOriginalTransaction = (originalTransactionVector != null) ? -1
- : ((LongColumnVector) cols[OrcRecordUpdater.ORIGINAL_TRANSACTION]).vector[0];
+ : ((LongColumnVector) cols[OrcRecordUpdater.ORIGINAL_WRITEID]).vector[0];
long[] bucketProperties =
cols[OrcRecordUpdater.BUCKET].isRepeating ? null
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java
index 5bbfe95..683aa95 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java
@@ -32,6 +32,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hive.common.JavaUtils;
import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.LockComponentBuilder;
import org.apache.hadoop.hive.metastore.LockRequestBuilder;
@@ -50,7 +51,9 @@ import org.apache.thrift.TException;
import java.io.IOException;
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
@@ -84,18 +87,26 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
* transaction id. Thus is 1 is first transaction id.
*/
private volatile long txnId = 0;
+
+ /**
+ * The local cache of table write IDs allocated/created by the current transaction
+ */
+ private Map<String, Long> tableWriteIds = new HashMap<>();
+
/**
* assigns a unique monotonically increasing ID to each statement
* which is part of an open transaction. This is used by storage
* layer (see {@link org.apache.hadoop.hive.ql.io.AcidUtils#deltaSubdir(long, long, int)})
* to keep apart multiple writes of the same data within the same transaction
- * Also see {@link org.apache.hadoop.hive.ql.io.AcidOutputFormat.Options}
+ * Also see {@link org.apache.hadoop.hive.ql.io.AcidOutputFormat.Options}.
*/
- private int writeId = -1;
+ private int stmtId = -1;
+
/**
- * counts number of statements in the current transaction
+ * counts number of statements in the current transaction.
*/
private int numStatements = 0;
+
/**
* if {@code true} it means current transaction is started via START TRANSACTION which means it cannot
* include any Operations which cannot be rolled back (drop partition; write to non-acid table).
@@ -125,9 +136,10 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
*
* As a side note: what should the lock manager do with locks for non-transactional resources?
* Should it it release them at the end of the stmt or txn?
- * Some interesting thoughts: http://mysqlmusings.blogspot.com/2009/02/mixing-engines-in-transactions.html
+ * Some interesting thoughts: http://mysqlmusings.blogspot.com/2009/02/mixing-engines-in-transactions.html.
*/
private boolean isExplicitTransaction = false;
+
/**
* To ensure transactions don't nest.
*/
@@ -141,6 +153,7 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
private ScheduledFuture<?> heartbeatTask = null;
private Runnable shutdownRunner = null;
private static final int SHUTDOWN_HOOK_PRIORITY = 0;
+
/**
* We do this on every call to make sure TM uses same MS connection as is used by the caller (Driver,
* SemanticAnalyzer, etc). {@code Hive} instances are cached using ThreadLocal and
@@ -208,8 +221,9 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
}
try {
txnId = getMS().openTxn(user);
- writeId = 0;
+ stmtId = 0;
numStatements = 0;
+ tableWriteIds.clear();
isExplicitTransaction = false;
startTransactionCount = 0;
LOG.debug("Opened " + JavaUtils.txnIdToString(txnId));
@@ -241,7 +255,8 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
catch(LockException e) {
if(e.getCause() instanceof TxnAbortedException) {
txnId = 0;
- writeId = -1;
+ stmtId = -1;
+ tableWriteIds.clear();
}
throw e;
}
@@ -597,8 +612,9 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
e);
} finally {
txnId = 0;
- writeId = -1;
+ stmtId = -1;
numStatements = 0;
+ tableWriteIds.clear();
}
}
@@ -622,8 +638,9 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
e);
} finally {
txnId = 0;
- writeId = -1;
+ stmtId = -1;
numStatements = 0;
+ tableWriteIds.clear();
}
}
@@ -743,12 +760,24 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
@Override
public ValidTxnList getValidTxns() throws LockException {
+ assert isTxnOpen();
init();
try {
return getMS().getValidTxns(txnId);
} catch (TException e) {
- throw new LockException(ErrorMsg.METASTORE_COMMUNICATION_FAILED.getMsg(),
- e);
+ throw new LockException(ErrorMsg.METASTORE_COMMUNICATION_FAILED.getMsg(), e);
+ }
+ }
+
+ @Override
+ public ValidTxnWriteIdList getValidWriteIds(List<String> tableList,
+ String validTxnList) throws LockException {
+ assert isTxnOpen();
+ assert validTxnList != null && !validTxnList.isEmpty();
+ try {
+ return getMS().getValidWriteIds(txnId, tableList, validTxnList);
+ } catch (TException e) {
+ throw new LockException(ErrorMsg.METASTORE_COMMUNICATION_FAILED.getMsg(), e);
}
}
@@ -886,9 +915,25 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
return txnId;
}
@Override
- public int getWriteIdAndIncrement() {
+ public int getStmtIdAndIncrement() {
assert isTxnOpen();
- return writeId++;
+ return stmtId++;
+ }
+
+ @Override
+ public long getTableWriteId(String dbName, String tableName) throws LockException {
+ assert isTxnOpen();
+ String fullTableName = AcidUtils.getFullTableName(dbName, tableName);
+ if (tableWriteIds.containsKey(fullTableName)) {
+ return tableWriteIds.get(fullTableName);
+ }
+ try {
+ long writeId = getMS().allocateTableWriteId(txnId, dbName, tableName);
+ tableWriteIds.put(fullTableName, writeId);
+ return writeId;
+ } catch (TException e) {
+ throw new LockException(ErrorMsg.METASTORE_COMMUNICATION_FAILED.getMsg(), e);
+ }
}
private static long getHeartbeatInterval(Configuration conf) throws LockException {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java
index fca6408..7413074 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java
@@ -17,6 +17,7 @@
*/
package org.apache.hadoop.hive.ql.lockmgr;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hive.common.ValidTxnList;
@@ -62,12 +63,15 @@ class DummyTxnManager extends HiveTxnManagerImpl {
public long getCurrentTxnId() {
return 0L;
}
-
@Override
- public int getWriteIdAndIncrement() {
+ public int getStmtIdAndIncrement() {
return 0;
}
@Override
+ public long getTableWriteId(String dbName, String tableName) throws LockException {
+ return 0L;
+ }
+ @Override
public HiveLockManager getLockManager() throws LockException {
if (lockMgr == null) {
boolean supportConcurrency =
@@ -220,6 +224,12 @@ class DummyTxnManager extends HiveTxnManagerImpl {
}
@Override
+ public ValidTxnWriteIdList getValidWriteIds(List<String> tableList,
+ String validTxnList) throws LockException {
+ return new ValidTxnWriteIdList(getCurrentTxnId());
+ }
+
+ @Override
public String getTxnManagerName() {
return DummyTxnManager.class.getName();
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java
index 4f9f0c2..0db2a2c 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java
@@ -18,6 +18,7 @@
package org.apache.hadoop.hive.ql.lockmgr;
import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
import org.apache.hadoop.hive.ql.Context;
import org.apache.hadoop.hive.ql.Driver.LockedDriverState;
import org.apache.hadoop.hive.ql.QueryPlan;
@@ -122,8 +123,7 @@ public interface HiveTxnManager {
/**
* Get the transactions that are currently valid. The resulting
- * {@link ValidTxnList} object is a thrift object and can
- * be passed to the processing
+ * {@link ValidTxnList} object can be passed as string to the processing
* tasks for use in the reading the data. This call should be made once up
* front by the planner and should never be called on the backend,
* as this will violate the isolation level semantics.
@@ -133,6 +133,18 @@ public interface HiveTxnManager {
ValidTxnList getValidTxns() throws LockException;
/**
+ * Get the table write Ids that are valid for the current transaction. The resulting
+ * {@link ValidTxnWriteIdList} object can be passed as string to the processing
+ * tasks for use in the reading the data. This call will return same results as long as validTxnString
+ * passed is same.
+ * @param tableList list of tables (<db_name>.<table_name>) read/written by current transaction.
+ * @param validTxnList snapshot of valid txns for the current txn
+ * @return list of valid table write Ids.
+ * @throws LockException
+ */
+ ValidTxnWriteIdList getValidWriteIds(List<String> tableList, String validTxnList) throws LockException;
+
+ /**
* Get the name for currently installed transaction manager.
* @return transaction manager name
*/
@@ -202,7 +214,7 @@ public interface HiveTxnManager {
boolean useNewShowLocksFormat();
/**
- * Indicate whether this transaction manager supports ACID operations
+ * Indicate whether this transaction manager supports ACID operations.
* @return true if this transaction manager does ACID
*/
boolean supportsAcid();
@@ -217,14 +229,19 @@ public interface HiveTxnManager {
boolean isTxnOpen();
/**
- * if {@code isTxnOpen()}, returns the currently active transaction ID
+ * if {@code isTxnOpen()}, returns the currently active transaction ID.
*/
long getCurrentTxnId();
/**
+ * if {@code isTxnOpen()}, returns the table write ID associated with current active transaction.
+ */
+ long getTableWriteId(String dbName, String tableName) throws LockException;
+
+ /**
* Should be though of more as a unique write operation ID in a given txn (at QueryPlan level).
* Each statement writing data within a multi statement txn should have a unique WriteId.
* Even a single statement, (e.g. Merge, multi-insert may generates several writes).
*/
- int getWriteIdAndIncrement();
+ int getStmtIdAndIncrement();
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index 9c3b54f..8b0af3e 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -1497,17 +1497,19 @@ public class Hive {
* @param isSrcLocal
* @param isAcid
* @param hasFollowingStatsTask
+ * @param writeId
+ * @param stmtId
* @return
* @throws HiveException
*/
public void loadPartition(Path loadPath, String tableName,
Map<String, String> partSpec, LoadFileType loadFileType, boolean inheritTableSpecs,
boolean isSkewedStoreAsSubdir, boolean isSrcLocal, boolean isAcid,
- boolean hasFollowingStatsTask, Long txnId, int stmtId)
+ boolean hasFollowingStatsTask, Long writeId, int stmtId)
throws HiveException {
Table tbl = getTable(tableName);
loadPartition(loadPath, tbl, partSpec, loadFileType, inheritTableSpecs,
- isSkewedStoreAsSubdir, isSrcLocal, isAcid, hasFollowingStatsTask, txnId, stmtId);
+ isSkewedStoreAsSubdir, isSrcLocal, isAcid, hasFollowingStatsTask, writeId, stmtId);
}
/**
@@ -1533,11 +1535,13 @@ public class Hive {
* true if this is an ACID operation Insert/Update/Delete operation
* @param hasFollowingStatsTask
* true if there is a following task which updates the stats, so, this method need not update.
+ * @param writeId write ID allocated for the current load operation
+ * @param stmtId statement ID of the current load statement
* @return Partition object being loaded with data
*/
public Partition loadPartition(Path loadPath, Table tbl, Map<String, String> partSpec,
LoadFileType loadFileType, boolean inheritTableSpecs, boolean isSkewedStoreAsSubdir,
- boolean isSrcLocal, boolean isAcidIUDoperation, boolean hasFollowingStatsTask, Long txnId, int stmtId)
+ boolean isSrcLocal, boolean isAcidIUDoperation, boolean hasFollowingStatsTask, Long writeId, int stmtId)
throws HiveException {
Path tblDataLocationPath = tbl.getDataLocation();
boolean isMmTableWrite = AcidUtils.isInsertOnlyTable(tbl.getParameters());
@@ -1596,7 +1600,7 @@ public class Hive {
}
assert !isAcidIUDoperation;
if (areEventsForDmlNeeded(tbl, oldPart)) {
- newFiles = listFilesCreatedByQuery(loadPath, txnId, stmtId);
+ newFiles = listFilesCreatedByQuery(loadPath, writeId, stmtId);
}
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("maybe deleting stuff from " + oldPartPath
@@ -1608,12 +1612,12 @@ public class Hive {
Path destPath = newPartPath;
if (isMmTableWrite) {
// We will load into MM directory, and delete from the parent if needed.
- destPath = new Path(destPath, AcidUtils.deltaSubdir(txnId, txnId, stmtId));
+ destPath = new Path(destPath, AcidUtils.deltaSubdir(writeId, writeId, stmtId));
filter = (loadFileType == LoadFileType.REPLACE_ALL)
- ? new JavaUtils.IdPathFilter(txnId, stmtId, false, true) : filter;
+ ? new JavaUtils.IdPathFilter(writeId, stmtId, false, true) : filter;
}
else if(!isAcidIUDoperation && isFullAcidTable) {
- destPath = fixFullAcidPathForLoadData(loadFileType, destPath, txnId, stmtId, tbl);
+ destPath = fixFullAcidPathForLoadData(loadFileType, destPath, writeId, stmtId, tbl);
}
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("moving " + loadPath + " to " + destPath);
@@ -1723,7 +1727,7 @@ public class Hive {
* delta_x_x directory - same as any other Acid write. This method modifies the destPath to add
* this path component.
* @param txnId - id of current transaction (in which this operation is running)
- * @param stmtId - see {@link DbTxnManager#getWriteIdAndIncrement()}
+ * @param stmtId - see {@link DbTxnManager#getStmtIdAndIncrement()}
* @return appropriately modified path
*/
private Path fixFullAcidPathForLoadData(LoadFileType loadFileType, Path destPath, long txnId, int stmtId, Table tbl) throws HiveException {
@@ -1987,13 +1991,13 @@ private void constructOneLBLocationMap(FileStatus fSta,
* @param loadFileType
* @param numDP number of dynamic partitions
* @param isAcid true if this is an ACID operation
- * @param txnId txnId, can be 0 unless isAcid == true
+ * @param writeId writeId, can be 0 unless isAcid == true
* @return partition map details (PartitionSpec and Partition)
* @throws HiveException
*/
public Map<Map<String, String>, Partition> loadDynamicPartitions(final Path loadPath,
final String tableName, final Map<String, String> partSpec, final LoadFileType loadFileType,
- final int numDP, final int numLB, final boolean isAcid, final long txnId, final int stmtId,
+ final int numDP, final int numLB, final boolean isAcid, final long writeId, final int stmtId,
final boolean hasFollowingStatsTask, final AcidUtils.Operation operation, boolean isInsertOverwrite)
throws HiveException {
@@ -2009,7 +2013,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
// Get all valid partition paths and existing partitions for them (if any)
final Table tbl = getTable(tableName);
- final Set<Path> validPartitions = getValidPartitionsInPath(numDP, numLB, loadPath, txnId, stmtId,
+ final Set<Path> validPartitions = getValidPartitionsInPath(numDP, numLB, loadPath, writeId, stmtId,
AcidUtils.isInsertOnlyTable(tbl.getParameters()), isInsertOverwrite);
final int partsToLoad = validPartitions.size();
@@ -2044,7 +2048,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
// load the partition
Partition newPartition = loadPartition(partPath, tbl, fullPartSpec,
loadFileType, true, numLB > 0,
- false, isAcid, hasFollowingStatsTask, txnId, stmtId);
+ false, isAcid, hasFollowingStatsTask, writeId, stmtId);
partitionsMap.put(fullPartSpec, newPartition);
if (inPlaceEligible) {
@@ -2103,8 +2107,9 @@ private void constructOneLBLocationMap(FileStatus fSta,
for (Partition p : partitionsMap.values()) {
partNames.add(p.getName());
}
- getMSC().addDynamicPartitions(txnId, tbl.getDbName(), tbl.getTableName(),
- partNames, AcidUtils.toDataOperationType(operation));
+ getMSC().addDynamicPartitions(parentSession.getTxnMgr().getCurrentTxnId(), writeId,
+ tbl.getDbName(), tbl.getTableName(), partNames,
+ AcidUtils.toDataOperationType(operation));
}
LOG.info("Loaded " + partitionsMap.size() + " partitions");
return partitionsMap;
@@ -2134,10 +2139,12 @@ private void constructOneLBLocationMap(FileStatus fSta,
* @param hasFollowingStatsTask
* if there is any following stats task
* @param isAcidIUDoperation true if this is an ACID based Insert [overwrite]/update/delete
+ * @param writeId write ID allocated for the current load operation
+ * @param stmtId statement ID of the current load statement
*/
public void loadTable(Path loadPath, String tableName, LoadFileType loadFileType, boolean isSrcLocal,
boolean isSkewedStoreAsSubdir, boolean isAcidIUDoperation, boolean hasFollowingStatsTask,
- Long txnId, int stmtId) throws HiveException {
+ Long writeId, int stmtId) throws HiveException {
List<Path> newFiles = null;
Table tbl = getTable(tableName);
assert tbl.getPath() != null : "null==getPath() for " + tbl.getTableName();
@@ -2150,7 +2157,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
// Note: this assumes both paths are qualified; which they are, currently.
if (isMmTable && loadPath.equals(tbl.getPath())) {
Utilities.FILE_OP_LOGGER.debug("not moving " + loadPath + " to " + tbl.getPath());
- newFiles = listFilesCreatedByQuery(loadPath, txnId, stmtId);
+ newFiles = listFilesCreatedByQuery(loadPath, writeId, stmtId);
} else {
// Either a non-MM query, or a load into MM table from an external source.
Path tblPath = tbl.getPath();
@@ -2159,12 +2166,12 @@ private void constructOneLBLocationMap(FileStatus fSta,
if (isMmTable) {
assert !isAcidIUDoperation;
// We will load into MM directory, and delete from the parent if needed.
- destPath = new Path(destPath, AcidUtils.deltaSubdir(txnId, txnId, stmtId));
+ destPath = new Path(destPath, AcidUtils.deltaSubdir(writeId, writeId, stmtId));
filter = loadFileType == LoadFileType.REPLACE_ALL
- ? new JavaUtils.IdPathFilter(txnId, stmtId, false, true) : filter;
+ ? new JavaUtils.IdPathFilter(writeId, stmtId, false, true) : filter;
}
else if(!isAcidIUDoperation && isFullAcidTable) {
- destPath = fixFullAcidPathForLoadData(loadFileType, destPath, txnId, stmtId, tbl);
+ destPath = fixFullAcidPathForLoadData(loadFileType, destPath, writeId, stmtId, tbl);
}
Utilities.FILE_OP_LOGGER.debug("moving " + loadPath + " to " + tblPath
+ " (replace = " + loadFileType + ")");
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java
index 3023144..4f396a0 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java
@@ -1270,8 +1270,8 @@ public final class GenMapRedUtils {
FileSinkDesc fsInputDesc = fsInput.getConf();
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("Creating merge work from " + System.identityHashCode(fsInput)
- + " with write ID " + (fsInputDesc.isMmTable() ? fsInputDesc.getTransactionId() : null)
- + " into " + finalName);
+ + " with write ID " + (fsInputDesc.isMmTable() ? fsInputDesc.getTableWriteId() : null)
+ + " into " + finalName);
}
boolean isBlockMerge = (conf.getBoolVar(ConfVars.HIVEMERGERCFILEBLOCKLEVEL) &&
@@ -1280,7 +1280,7 @@ public final class GenMapRedUtils {
fsInputDesc.getTableInfo().getInputFileFormatClass().equals(OrcInputFormat.class));
RowSchema inputRS = fsInput.getSchema();
- Long srcMmWriteId = fsInputDesc.isMmTable() ? fsInputDesc.getTransactionId() : null;
+ Long srcMmWriteId = fsInputDesc.isMmTable() ? fsInputDesc.getTableWriteId() : null;
FileSinkDesc fsOutputDesc = null;
TableScanOperator tsMerge = null;
if (!isBlockMerge) {
@@ -1665,7 +1665,7 @@ public final class GenMapRedUtils {
fmd = new OrcFileMergeDesc();
}
fmd.setIsMmTable(fsInputDesc.isMmTable());
- fmd.setTxnId(fsInputDesc.getTransactionId());
+ fmd.setWriteId(fsInputDesc.getTableWriteId());
int stmtId = fsInputDesc.getStatementId();
fmd.setStmtId(stmtId == -1 ? 0 : stmtId);
fmd.setDpCtx(fsInputDesc.getDynPartCtx());
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
index 718faff..e926b63 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
@@ -1563,7 +1563,7 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
Path queryTmpdir = ctx.getExternalTmpPath(newTblPartLoc);
truncateTblDesc.setOutputDir(queryTmpdir);
LoadTableDesc ltd = new LoadTableDesc(queryTmpdir, tblDesc,
- partSpec == null ? new HashMap<>() : partSpec, null);
+ partSpec == null ? new HashMap<>() : partSpec);
ltd.setLbCtx(lbCtx);
@SuppressWarnings("unchecked")
Task<MoveWork> moveTsk =
@@ -2017,7 +2017,7 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
mergeDesc.setOutputDir(queryTmpdir);
// No need to handle MM tables - unsupported path.
LoadTableDesc ltd = new LoadTableDesc(queryTmpdir, tblDesc,
- partSpec == null ? new HashMap<>() : partSpec, null);
+ partSpec == null ? new HashMap<>() : partSpec);
ltd.setLbCtx(lbCtx);
Task<MoveWork> moveTsk =
TaskFactory.get(new MoveWork(null, null, ltd, null, false), conf);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java
index 5520bc2..67d05e6 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java
@@ -318,31 +318,39 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
Table table = tableIfExists(tblDesc, x.getHive());
boolean tableExists = false;
- if (table != null){
+ if (table != null) {
checkTable(table, tblDesc,replicationSpec, x.getConf());
x.getLOG().debug("table " + tblDesc.getTableName() + " exists: metadata checked");
tableExists = true;
}
- Long txnId = SessionState.get().getTxnMgr().getCurrentTxnId();
+ Long writeId = 0L; // Initialize with 0 for non-ACID and non-MM tables.
+ if (((table != null) && AcidUtils.isTransactionalTable(table))
+ || AcidUtils.isTablePropertyTransactional(tblDesc.getTblProps())) {
+ // Explain plan doesn't open a txn and hence no need to allocate write id.
+ if (x.getCtx().getExplainConfig() == null) {
+ writeId = SessionState.get().getTxnMgr().getTableWriteId(tblDesc.getDatabaseName(), tblDesc.getTableName());
+ }
+ }
int stmtId = 0;
+
// TODO [MM gap?]: bad merge; tblDesc is no longer CreateTableDesc, but ImportTableDesc.
// We need to verify the tests to see if this works correctly.
/*
- if (isAcid(txnId)) {
- tblDesc.setInitialMmWriteId(txnId);
+ if (isAcid(writeId)) {
+ tblDesc.setInitialMmWriteId(writeId);
}
*/
if (!replicationSpec.isInReplicationScope()) {
createRegularImportTasks(
tblDesc, partitionDescs,
isPartSpecSet, replicationSpec, table,
- fromURI, fs, wh, x, txnId, stmtId, isSourceMm);
+ fromURI, fs, wh, x, writeId, stmtId, isSourceMm);
} else {
createReplImportTasks(
tblDesc, partitionDescs,
replicationSpec, waitOnPrecursor, table,
- fromURI, fs, wh, x, txnId, stmtId, isSourceMm, updatedMetadata);
+ fromURI, fs, wh, x, writeId, stmtId, isSourceMm, updatedMetadata);
}
return tableExists;
}
@@ -377,13 +385,13 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
private static Task<?> loadTable(URI fromURI, Table table, boolean replace, Path tgtPath,
ReplicationSpec replicationSpec, EximUtil.SemanticAnalyzerWrapperContext x,
- Long txnId, int stmtId, boolean isSourceMm) {
+ Long writeId, int stmtId, boolean isSourceMm) {
Path dataPath = new Path(fromURI.toString(), EximUtil.DATA_PATH_NAME);
Path destPath = null, loadPath = null;
LoadFileType lft;
if (AcidUtils.isInsertOnlyTable(table)) {
- String mmSubdir = replace ? AcidUtils.baseDir(txnId)
- : AcidUtils.deltaSubdir(txnId, txnId, stmtId);
+ String mmSubdir = replace ? AcidUtils.baseDir(writeId)
+ : AcidUtils.deltaSubdir(writeId, writeId, stmtId);
destPath = new Path(tgtPath, mmSubdir);
loadPath = tgtPath;
lft = LoadFileType.KEEP_EXISTING;
@@ -395,13 +403,13 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("adding import work for table with source location: " +
- dataPath + "; table: " + tgtPath + "; copy destination " + destPath + "; mm " + txnId +
+ dataPath + "; table: " + tgtPath + "; copy destination " + destPath + "; mm " + writeId +
" (src " + isSourceMm + ") for " + (table == null ? "a new table" : table.getTableName()));
}
Task<?> copyTask = null;
if (replicationSpec.isInReplicationScope()) {
- if (isSourceMm || isAcid(txnId)) {
+ if (isSourceMm || isAcid(writeId)) {
// Note: this is replication gap, not MM gap... Repl V2 is not ready yet.
throw new RuntimeException("Replicating MM and ACID tables is not supported");
}
@@ -413,7 +421,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
}
LoadTableDesc loadTableWork = new LoadTableDesc(
- loadPath, Utilities.getTableDesc(table), new TreeMap<>(), lft, txnId);
+ loadPath, Utilities.getTableDesc(table), new TreeMap<>(), lft, writeId);
loadTableWork.setStmtId(stmtId);
MoveWork mv = new MoveWork(x.getInputs(), x.getOutputs(), loadTableWork, null, false);
Task<?> loadTableTask = TaskFactory.get(mv, x.getConf());
@@ -423,11 +431,11 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
}
/**
- * todo: this is odd: transactions are opened for all statements. what is this supposed to check?
+ * todo: this is odd: write id allocated for all write operations on ACID tables. what is this supposed to check?
*/
@Deprecated
- private static boolean isAcid(Long txnId) {
- return (txnId != null) && (txnId != 0);
+ private static boolean isAcid(Long writeId) {
+ return (writeId != null) && (writeId != 0);
}
private static Task<?> createTableTask(ImportTableDesc tableDesc, EximUtil.SemanticAnalyzerWrapperContext x){
@@ -467,7 +475,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
private static Task<?> addSinglePartition(URI fromURI, FileSystem fs, ImportTableDesc tblDesc,
Table table, Warehouse wh, AddPartitionDesc addPartitionDesc, ReplicationSpec replicationSpec,
- EximUtil.SemanticAnalyzerWrapperContext x, Long txnId, int stmtId, boolean isSourceMm,
+ EximUtil.SemanticAnalyzerWrapperContext x, Long writeId, int stmtId, boolean isSourceMm,
Task<?> commitTask)
throws MetaException, IOException, HiveException {
AddPartitionDesc.OnePartitionDesc partSpec = addPartitionDesc.getPartition(0);
@@ -487,18 +495,18 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
+ " with source location: " + srcLocation);
Path tgtLocation = new Path(partSpec.getLocation());
Path destPath = !AcidUtils.isInsertOnlyTable(table.getParameters()) ? x.getCtx().getExternalTmpPath(tgtLocation)
- : new Path(tgtLocation, AcidUtils.deltaSubdir(txnId, txnId, stmtId));
+ : new Path(tgtLocation, AcidUtils.deltaSubdir(writeId, writeId, stmtId));
Path moveTaskSrc = !AcidUtils.isInsertOnlyTable(table.getParameters()) ? destPath : tgtLocation;
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("adding import work for partition with source location: "
+ srcLocation + "; target: " + tgtLocation + "; copy dest " + destPath + "; mm "
- + txnId + " (src " + isSourceMm + ") for " + partSpecToString(partSpec.getPartSpec()));
+ + writeId + " (src " + isSourceMm + ") for " + partSpecToString(partSpec.getPartSpec()));
}
Task<?> copyTask = null;
if (replicationSpec.isInReplicationScope()) {
- if (isSourceMm || isAcid(txnId)) {
+ if (isSourceMm || isAcid(writeId)) {
// Note: this is replication gap, not MM gap... Repl V2 is not ready yet.
throw new RuntimeException("Replicating MM and ACID tables is not supported");
}
@@ -515,7 +523,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
LoadTableDesc loadTableWork = new LoadTableDesc(moveTaskSrc, Utilities.getTableDesc(table),
partSpec.getPartSpec(),
replicationSpec.isReplace() ? LoadFileType.REPLACE_ALL : LoadFileType.OVERWRITE_EXISTING,
- txnId);
+ writeId);
loadTableWork.setStmtId(stmtId);
loadTableWork.setInheritTableSpecs(false);
Task<?> loadPartTask = TaskFactory.get(new MoveWork(
@@ -814,14 +822,14 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
private static void createRegularImportTasks(
ImportTableDesc tblDesc, List<AddPartitionDesc> partitionDescs, boolean isPartSpecSet,
ReplicationSpec replicationSpec, Table table, URI fromURI, FileSystem fs, Warehouse wh,
- EximUtil.SemanticAnalyzerWrapperContext x, Long txnId, int stmtId, boolean isSourceMm)
+ EximUtil.SemanticAnalyzerWrapperContext x, Long writeId, int stmtId, boolean isSourceMm)
throws HiveException, URISyntaxException, IOException, MetaException {
if (table != null) {
if (table.isPartitioned()) {
x.getLOG().debug("table partitioned");
Task<?> ict = createImportCommitTask(
- table.getDbName(), table.getTableName(), txnId, stmtId, x.getConf(),
+ table.getDbName(), table.getTableName(), writeId, stmtId, x.getConf(),
AcidUtils.isInsertOnlyTable(table.getParameters()));
for (AddPartitionDesc addPartitionDesc : partitionDescs) {
@@ -829,7 +837,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
org.apache.hadoop.hive.ql.metadata.Partition ptn = null;
if ((ptn = x.getHive().getPartition(table, partSpec, false)) == null) {
x.getTasks().add(addSinglePartition(
- fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, x, txnId, stmtId, isSourceMm, ict));
+ fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, x, writeId, stmtId, isSourceMm, ict));
} else {
throw new SemanticException(
ErrorMsg.PARTITION_EXISTS.getMsg(partSpecToString(partSpec)));
@@ -841,7 +849,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
Path tgtPath = new Path(table.getDataLocation().toString());
FileSystem tgtFs = FileSystem.get(tgtPath.toUri(), x.getConf());
checkTargetLocationEmpty(tgtFs, tgtPath, replicationSpec, x.getLOG());
- loadTable(fromURI, table, false, tgtPath, replicationSpec, x, txnId, stmtId, isSourceMm);
+ loadTable(fromURI, table, false, tgtPath, replicationSpec, x, writeId, stmtId, isSourceMm);
}
// Set this to read because we can't overwrite any existing partitions
x.getOutputs().add(new WriteEntity(table, WriteEntity.WriteType.DDL_NO_LOCK));
@@ -858,11 +866,11 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
if (isPartitioned(tblDesc)) {
Task<?> ict = createImportCommitTask(
- tblDesc.getDatabaseName(), tblDesc.getTableName(), txnId, stmtId, x.getConf(),
+ tblDesc.getDatabaseName(), tblDesc.getTableName(), writeId, stmtId, x.getConf(),
AcidUtils.isInsertOnlyTable(tblDesc.getTblProps()));
for (AddPartitionDesc addPartitionDesc : partitionDescs) {
t.addDependentTask(addSinglePartition(fromURI, fs, tblDesc, table, wh, addPartitionDesc,
- replicationSpec, x, txnId, stmtId, isSourceMm, ict));
+ replicationSpec, x, writeId, stmtId, isSourceMm, ict));
}
} else {
x.getLOG().debug("adding dependent CopyWork/MoveWork for table");
@@ -885,7 +893,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
tblproperties.put("transactional_properties", "insert_only");
table.setParameters(tblproperties);
}
- t.addDependentTask(loadTable(fromURI, table, false, tablePath, replicationSpec, x, txnId, stmtId, isSourceMm));
+ t.addDependentTask(loadTable(fromURI, table, false, tablePath, replicationSpec, x, writeId, stmtId, isSourceMm));
}
}
x.getTasks().add(t);
@@ -893,11 +901,11 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
}
private static Task<?> createImportCommitTask(
- String dbName, String tblName, Long txnId, int stmtId, HiveConf conf, boolean isMmTable) {
+ String dbName, String tblName, Long writeId, int stmtId, HiveConf conf, boolean isMmTable) {
// TODO: noop, remove?
@SuppressWarnings("unchecked")
Task<ImportCommitWork> ict = (!isMmTable) ? null : TaskFactory.get(
- new ImportCommitWork(dbName, tblName, txnId, stmtId), conf);
+ new ImportCommitWork(dbName, tblName, writeId, stmtId), conf);
return ict;
}
@@ -909,7 +917,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
List<AddPartitionDesc> partitionDescs,
ReplicationSpec replicationSpec, boolean waitOnPrecursor,
Table table, URI fromURI, FileSystem fs, Warehouse wh,
- EximUtil.SemanticAnalyzerWrapperContext x, Long txnId, int stmtId, boolean isSourceMm,
+ EximUtil.SemanticAnalyzerWrapperContext x, Long writeId, int stmtId, boolean isSourceMm,
UpdatedMetaDataTracker updatedMetadata)
throws HiveException, URISyntaxException, IOException, MetaException {
@@ -986,19 +994,19 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
if (!replicationSpec.isMetadataOnly()) {
if (isPartitioned(tblDesc)) {
Task<?> ict = createImportCommitTask(
- tblDesc.getDatabaseName(), tblDesc.getTableName(), txnId, stmtId, x.getConf(),
+ tblDesc.getDatabaseName(), tblDesc.getTableName(), writeId, stmtId, x.getConf(),
AcidUtils.isInsertOnlyTable(tblDesc.getTblProps()));
for (AddPartitionDesc addPartitionDesc : partitionDescs) {
addPartitionDesc.setReplicationSpec(replicationSpec);
t.addDependentTask(
- addSinglePartition(fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, x, txnId, stmtId, isSourceMm, ict));
+ addSinglePartition(fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, x, writeId, stmtId, isSourceMm, ict));
if (updatedMetadata != null) {
updatedMetadata.addPartition(addPartitionDesc.getPartition(0).getPartSpec());
}
}
} else {
x.getLOG().debug("adding dependent CopyWork/MoveWork for table");
- t.addDependentTask(loadTable(fromURI, table, true, new Path(tblDesc.getLocation()), replicationSpec, x, txnId, stmtId, isSourceMm));
+ t.addDependentTask(loadTable(fromURI, table, true, new Path(tblDesc.getLocation()), replicationSpec, x, writeId, stmtId, isSourceMm));
}
}
// Simply create
@@ -1012,12 +1020,12 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
Map<String, String> partSpec = addPartitionDesc.getPartition(0).getPartSpec();
org.apache.hadoop.hive.ql.metadata.Partition ptn = null;
Task<?> ict = replicationSpec.isMetadataOnly() ? null : createImportCommitTask(
- tblDesc.getDatabaseName(), tblDesc.getTableName(), txnId, stmtId, x.getConf(),
+ tblDesc.getDatabaseName(), tblDesc.getTableName(), writeId, stmtId, x.getConf(),
AcidUtils.isInsertOnlyTable(tblDesc.getTblProps()));
if ((ptn = x.getHive().getPartition(table, partSpec, false)) == null) {
if (!replicationSpec.isMetadataOnly()){
x.getTasks().add(addSinglePartition(
- fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, x, txnId, stmtId, isSourceMm, ict));
+ fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, x, writeId, stmtId, isSourceMm, ict));
if (updatedMetadata != null) {
updatedMetadata.addPartition(addPartitionDesc.getPartition(0).getPartSpec());
}
@@ -1034,7 +1042,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
if (replicationSpec.allowReplacementInto(ptn.getParameters())){
if (!replicationSpec.isMetadataOnly()){
x.getTasks().add(addSinglePartition(
- fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, x, txnId, stmtId, isSourceMm, ict));
+ fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, x, writeId, stmtId, isSourceMm, ict));
} else {
x.getTasks().add(alterSinglePartition(
fromURI, fs, tblDesc, table, wh, addPartitionDesc, replicationSpec, ptn, x));
@@ -1060,7 +1068,7 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer {
if (!replicationSpec.isMetadataOnly()) {
// repl-imports are replace-into unless the event is insert-into
loadTable(fromURI, table, replicationSpec.isReplace(), new Path(fromURI),
- replicationSpec, x, txnId, stmtId, isSourceMm);
+ replicationSpec, x, writeId, stmtId, isSourceMm);
} else {
x.getTasks().add(alterTableTask(tblDesc, x, replicationSpec));
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
index cc66936..7d2de75 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
@@ -46,6 +46,7 @@ import org.apache.hadoop.hive.ql.exec.Utilities;
import org.apache.hadoop.hive.ql.hooks.WriteEntity;
import org.apache.hadoop.hive.ql.io.AcidUtils;
import org.apache.hadoop.hive.ql.io.HiveFileFormatUtils;
+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.hive.ql.metadata.Partition;
@@ -316,17 +317,22 @@ public class LoadSemanticAnalyzer extends BaseSemanticAnalyzer {
}
}
- Long txnId = null;
+ Long writeId = null;
int stmtId = -1;
if (AcidUtils.isTransactionalTable(ts.tableHandle)) {
- txnId = SessionState.get().getTxnMgr().getCurrentTxnId();
- stmtId = SessionState.get().getTxnMgr().getWriteIdAndIncrement();
+ try {
+ writeId = SessionState.get().getTxnMgr().getTableWriteId(ts.tableHandle.getDbName(),
+ ts.tableHandle.getTableName());
+ } catch (LockException ex) {
+ throw new SemanticException("Failed to allocate the write id", ex);
+ }
+ stmtId = SessionState.get().getTxnMgr().getStmtIdAndIncrement();
}
LoadTableDesc loadTableWork;
loadTableWork = new LoadTableDesc(new Path(fromURI),
Utilities.getTableDesc(ts.tableHandle), partSpec,
- isOverWrite ? LoadFileType.REPLACE_ALL : LoadFileType.KEEP_EXISTING, txnId);
+ isOverWrite ? LoadFileType.REPLACE_ALL : LoadFileType.KEEP_EXISTING, writeId);
loadTableWork.setStmtId(stmtId);
if (preservePartitionSpecs){
// Note : preservePartitionSpecs=true implies inheritTableSpecs=false but
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 19fc6a9..cd6f1ee 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -131,6 +131,8 @@ import org.apache.hadoop.hive.ql.lib.Dispatcher;
import org.apache.hadoop.hive.ql.lib.GraphWalker;
import org.apache.hadoop.hive.ql.lib.Node;
import org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+import org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager;
+import org.apache.hadoop.hive.ql.lockmgr.LockException;
import org.apache.hadoop.hive.ql.metadata.DummyPartition;
import org.apache.hadoop.hive.ql.metadata.Hive;
import org.apache.hadoop.hive.ql.metadata.HiveException;
@@ -6801,7 +6803,8 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
ListBucketingCtx lbCtx = null;
Map<String, String> partSpec = null;
boolean isMmTable = false, isMmCtas = false;
- Long txnId = null;
+ Long writeId = null;
+ HiveTxnManager txnMgr = SessionState.get().getTxnMgr();
switch (dest_type.intValue()) {
case QBMetaData.DEST_TABLE: {
@@ -6884,15 +6887,23 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
//todo: should this be done for MM? is it ok to use CombineHiveInputFormat with MM
checkAcidConstraints(qb, table_desc, dest_tab);
}
- if (isMmTable) {
- txnId = SessionState.get().getTxnMgr().getCurrentTxnId();
- } else {
- txnId = acidOp == Operation.NOT_ACID ? null :
- SessionState.get().getTxnMgr().getCurrentTxnId();
+ try {
+ if (ctx.getExplainConfig() != null) {
+ writeId = 0L; // For explain plan, txn won't be opened and doesn't make sense to allocate write id
+ } else {
+ if (isMmTable) {
+ writeId = txnMgr.getTableWriteId(dest_tab.getDbName(), dest_tab.getTableName());
+ } else {
+ writeId = acidOp == Operation.NOT_ACID ? null :
+ txnMgr.getTableWriteId(dest_tab.getDbName(), dest_tab.getTableName());
+ }
+ }
+ } catch (LockException ex) {
+ throw new SemanticException("Failed to allocate write Id", ex);
}
boolean isReplace = !qb.getParseInfo().isInsertIntoTable(
dest_tab.getDbName(), dest_tab.getTableName());
- ltd = new LoadTableDesc(queryTmpdir, table_desc, dpCtx, acidOp, isReplace, txnId);
+ ltd = new LoadTableDesc(queryTmpdir, table_desc, dpCtx, acidOp, isReplace, writeId);
// For Acid table, Insert Overwrite shouldn't replace the table content. We keep the old
// deltas and base and leave them up to the cleaner to clean up
LoadFileType loadType = (!qb.getParseInfo().isInsertIntoTable(dest_tab.getDbName(),
@@ -6967,13 +6978,21 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
//todo: should this be done for MM? is it ok to use CombineHiveInputFormat with MM?
checkAcidConstraints(qb, table_desc, dest_tab);
}
- if (isMmTable) {
- txnId = SessionState.get().getTxnMgr().getCurrentTxnId();
- } else {
- txnId = (acidOp == Operation.NOT_ACID) ? null :
- SessionState.get().getTxnMgr().getCurrentTxnId();
+ try {
+ if (ctx.getExplainConfig() != null) {
+ writeId = 0L; // For explain plan, txn won't be opened and doesn't make sense to allocate write id
+ } else {
+ if (isMmTable) {
+ writeId = txnMgr.getTableWriteId(dest_tab.getDbName(), dest_tab.getTableName());
+ } else {
+ writeId = (acidOp == Operation.NOT_ACID) ? null :
+ txnMgr.getTableWriteId(dest_tab.getDbName(), dest_tab.getTableName());
+ }
+ }
+ } catch (LockException ex) {
+ throw new SemanticException("Failed to allocate write Id", ex);
}
- ltd = new LoadTableDesc(queryTmpdir, table_desc, dest_part.getSpec(), acidOp, txnId);
+ ltd = new LoadTableDesc(queryTmpdir, table_desc, dest_part.getSpec(), acidOp, writeId);
// For Acid table, Insert Overwrite shouldn't replace the table content. We keep the old
// deltas and base and leave them up to the cleaner to clean up
LoadFileType loadType = (!qb.getParseInfo().isInsertIntoTable(dest_tab.getDbName(),
@@ -7011,8 +7030,16 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
destTableIsMaterialization = tblDesc.isMaterialization();
if (AcidUtils.isInsertOnlyTable(tblDesc.getTblProps(), true)) {
isMmTable = isMmCtas = true;
- txnId = SessionState.get().getTxnMgr().getCurrentTxnId();
- tblDesc.setInitialMmWriteId(txnId);
+ try {
+ if (ctx.getExplainConfig() != null) {
+ writeId = 0L; // For explain plan, txn won't be opened and doesn't make sense to allocate write id
+ } else {
+ writeId = txnMgr.getTableWriteId(tblDesc.getDatabaseName(), tblDesc.getTableName());
+ }
+ } catch (LockException ex) {
+ throw new SemanticException("Failed to allocate write Id", ex);
+ }
+ tblDesc.setInitialMmWriteId(writeId);
}
} else if (viewDesc != null) {
field_schemas = new ArrayList<FieldSchema>();
@@ -7156,7 +7183,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
FileSinkDesc fileSinkDesc = createFileSinkDesc(dest, table_desc, dest_part,
dest_path, currentTableId, destTableIsFullAcid, destTableIsTemporary,//this was 1/4 acid
destTableIsMaterialization, queryTmpdir, rsCtx, dpCtx, lbCtx, fsRS,
- canBeMerged, dest_tab, txnId, isMmCtas, dest_type, qb);
+ canBeMerged, dest_tab, writeId, isMmCtas, dest_type, qb);
if (isMmCtas) {
// Add FSD so that the LoadTask compilation could fix up its path to avoid the move.
tableDesc.setWriter(fileSinkDesc);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/plan/FileMergeDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/FileMergeDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/FileMergeDesc.java
index 4da868c..6bd0053 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/FileMergeDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/FileMergeDesc.java
@@ -28,7 +28,7 @@ public class FileMergeDesc extends AbstractOperatorDesc {
private int listBucketingDepth;
private boolean hasDynamicPartitions;
private boolean isListBucketingAlterTableConcatenate;
- private Long txnId;
+ private Long writeId;
private int stmtId;
private boolean isMmTable;
@@ -77,12 +77,12 @@ public class FileMergeDesc extends AbstractOperatorDesc {
this.isListBucketingAlterTableConcatenate = isListBucketingAlterTableConcatenate;
}
- public Long getTxnId() {
- return txnId;
+ public Long getWriteId() {
+ return writeId;
}
- public void setTxnId(Long txnId) {
- this.txnId = txnId;
+ public void setWriteId(Long writeId) {
+ this.writeId = writeId;
}
public int getStmtId() {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java
index 92b8031..ce61fc5 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java
@@ -90,7 +90,7 @@ public class FileSinkDesc extends AbstractOperatorDesc implements IStatsGatherDe
// Record what type of write this is. Default is non-ACID (ie old style).
private AcidUtils.Operation writeType = AcidUtils.Operation.NOT_ACID;
- private long txnId = 0; // transaction id for this operation
+ private long tableWriteId = 0; // table write id for this operation
private int statementId = -1;
private transient Table table;
@@ -167,7 +167,7 @@ public class FileSinkDesc extends AbstractOperatorDesc implements IStatsGatherDe
ret.setStatsReliable(statsReliable);
ret.setDpSortState(dpSortState);
ret.setWriteType(writeType);
- ret.setTransactionId(txnId);
+ ret.setTableWriteId(tableWriteId);
ret.setStatementId(statementId);
ret.setStatsTmpDir(statsTmpDir);
ret.setIsMerge(isMerge);
@@ -207,7 +207,7 @@ public class FileSinkDesc extends AbstractOperatorDesc implements IStatsGatherDe
public Path getMergeInputDirName() {
Path root = getFinalDirName();
if (isMmTable()) {
- return new Path(root, AcidUtils.deltaSubdir(txnId, txnId, statementId));
+ return new Path(root, AcidUtils.deltaSubdir(tableWriteId, tableWriteId, statementId));
} else {
return root;
}
@@ -483,11 +483,11 @@ public class FileSinkDesc extends AbstractOperatorDesc implements IStatsGatherDe
public String getWriteTypeString() {
return getWriteType() == AcidUtils.Operation.NOT_ACID ? null : getWriteType().toString();
}
- public void setTransactionId(long id) {
- txnId = id;
+ public void setTableWriteId(long id) {
+ tableWriteId = id;
}
- public long getTransactionId() {
- return txnId;
+ public long getTableWriteId() {
+ return tableWriteId;
}
public void setStatementId(int id) {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/plan/LoadTableDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/LoadTableDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/LoadTableDesc.java
index a40c486..f15b3c3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/LoadTableDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/LoadTableDesc.java
@@ -39,7 +39,7 @@ public class LoadTableDesc extends LoadDesc implements Serializable {
private boolean inheritTableSpecs = true; //For partitions, flag controlling whether the current
//table specs are to be used
private int stmtId;
- private Long currentTransactionId;
+ private Long currentWriteId;
private boolean isInsertOverwrite;
// TODO: the below seem like they should just be combined into partitionDesc
@@ -71,7 +71,7 @@ public class LoadTableDesc extends LoadDesc implements Serializable {
this.dpCtx = o.dpCtx;
this.lbCtx = o.lbCtx;
this.inheritTableSpecs = o.inheritTableSpecs;
- this.currentTransactionId = o.currentTransactionId;
+ this.currentWriteId = o.currentWriteId;
this.table = o.table;
this.partitionSpec = o.partitionSpec;
}
@@ -80,13 +80,13 @@ public class LoadTableDesc extends LoadDesc implements Serializable {
final TableDesc table,
final Map<String, String> partitionSpec,
final LoadFileType loadFileType,
- final AcidUtils.Operation writeType, Long currentTransactionId) {
+ final AcidUtils.Operation writeType, Long currentWriteId) {
super(sourcePath, writeType);
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("creating part LTD from " + sourcePath + " to "
+ ((table.getProperties() == null) ? "null" : table.getTableName()));
}
- init(table, partitionSpec, loadFileType, currentTransactionId);
+ init(table, partitionSpec, loadFileType, currentWriteId);
}
/**
@@ -95,21 +95,22 @@ public class LoadTableDesc extends LoadDesc implements Serializable {
* @param table
* @param partitionSpec
* @param loadFileType
+ * @param writeId
*/
public LoadTableDesc(final Path sourcePath,
final TableDesc table,
final Map<String, String> partitionSpec,
final LoadFileType loadFileType,
- final Long txnId) {
- this(sourcePath, table, partitionSpec, loadFileType, AcidUtils.Operation.NOT_ACID, txnId);
+ final Long writeId) {
+ this(sourcePath, table, partitionSpec, loadFileType, AcidUtils.Operation.NOT_ACID, writeId);
}
public LoadTableDesc(final Path sourcePath,
final TableDesc table,
final Map<String, String> partitionSpec,
- final AcidUtils.Operation writeType, Long currentTransactionId) {
+ final AcidUtils.Operation writeType, Long currentWriteId) {
this(sourcePath, table, partitionSpec, LoadFileType.REPLACE_ALL,
- writeType, currentTransactionId);
+ writeType, currentWriteId);
}
/**
@@ -120,16 +121,16 @@ public class LoadTableDesc extends LoadDesc implements Serializable {
*/
public LoadTableDesc(final Path sourcePath,
final org.apache.hadoop.hive.ql.plan.TableDesc table,
- final Map<String, String> partitionSpec, Long txnId) {
+ final Map<String, String> partitionSpec) {
this(sourcePath, table, partitionSpec, LoadFileType.REPLACE_ALL,
- AcidUtils.Operation.NOT_ACID, txnId);
+ AcidUtils.Operation.NOT_ACID, null);
}
public LoadTableDesc(final Path sourcePath,
final TableDesc table,
final DynamicPartitionCtx dpCtx,
final AcidUtils.Operation writeType,
- boolean isReplace, Long txnId) {
+ boolean isReplace, Long writeId) {
super(sourcePath, writeType);
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("creating LTD from " + sourcePath + " to " + table.getTableName());
@@ -137,9 +138,9 @@ public class LoadTableDesc extends LoadDesc implements Serializable {
this.dpCtx = dpCtx;
LoadFileType lft = isReplace ? LoadFileType.REPLACE_ALL : LoadFileType.OVERWRITE_EXISTING;
if (dpCtx != null && dpCtx.getPartSpec() != null && partitionSpec == null) {
- init(table, dpCtx.getPartSpec(), lft, txnId);
+ init(table, dpCtx.getPartSpec(), lft, writeId);
} else {
- init(table, new LinkedHashMap<String, String>(), lft, txnId);
+ init(table, new LinkedHashMap<String, String>(), lft, writeId);
}
}
@@ -147,11 +148,11 @@ public class LoadTableDesc extends LoadDesc implements Serializable {
final org.apache.hadoop.hive.ql.plan.TableDesc table,
final Map<String, String> partitionSpec,
final LoadFileType loadFileType,
- Long txnId) {
+ Long writeId) {
this.table = table;
this.partitionSpec = partitionSpec;
this.loadFileType = loadFileType;
- this.currentTransactionId = txnId;
+ this.currentWriteId = writeId;
}
@Explain(displayName = "table", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED })
@@ -232,8 +233,8 @@ public class LoadTableDesc extends LoadDesc implements Serializable {
this.lbCtx = lbCtx;
}
- public long getTxnId() {
- return currentTransactionId == null ? 0 : currentTransactionId;
+ public long getWriteId() {
+ return currentWriteId == null ? 0 : currentWriteId;
}
public int getStmtId() {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java
index 50ceba5..59968fa 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java
@@ -102,6 +102,9 @@ public class TableScanDesc extends AbstractOperatorDesc implements IStatsGatherD
// input file name (big) to bucket number
private Map<String, Integer> bucketFileNameMapping;
+ private String dbName = null;
+ private String tableName = null;
+
private boolean isMetadataOnly = false;
private boolean isTranscationalTable;
@@ -135,6 +138,11 @@ public class TableScanDesc extends AbstractOperatorDesc implements IStatsGatherD
this.alias = alias;
this.virtualCols = vcs;
this.tableMetadata = tblMetadata;
+
+ if (tblMetadata != null) {
+ dbName = tblMetadata.getDbName();
+ tableName = tblMetadata.getTableName();
+ }
isTranscationalTable = AcidUtils.isTransactionalTable(this.tableMetadata);
if (isTranscationalTable) {
acidOperationalProperties = AcidUtils.getAcidOperationalProperties(this.tableMetadata);
@@ -154,12 +162,12 @@ public class TableScanDesc extends AbstractOperatorDesc implements IStatsGatherD
@Explain(displayName = "table", jsonOnly = true)
public String getTableName() {
- return this.tableMetadata.getTableName();
+ return this.tableName;
}
@Explain(displayName = "database", jsonOnly = true)
public String getDatabaseName() {
- return this.tableMetadata.getDbName();
+ return this.dbName;
}
@Explain(displayName = "columns", jsonOnly = true)
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/stats/ColStatsProcessor.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/stats/ColStatsProcessor.java b/ql/src/java/org/apache/hadoop/hive/ql/stats/ColStatsProcessor.java
index 85917e4..7591c06 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/stats/ColStatsProcessor.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/stats/ColStatsProcessor.java
@@ -40,7 +40,6 @@ import org.apache.hadoop.hive.ql.metadata.Partition;
import org.apache.hadoop.hive.ql.metadata.Table;
import org.apache.hadoop.hive.ql.plan.ColumnStatsDesc;
import org.apache.hadoop.hive.ql.plan.FetchWork;
-import org.apache.hadoop.hive.ql.stats.ColumnStatisticsObjTranslator;
import org.apache.hadoop.hive.serde2.objectinspector.InspectableObject;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
index 02097c8..31f50fa 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
@@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidTxnList;
-import org.apache.hadoop.hive.common.ValidReadTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
+import org.apache.hadoop.hive.common.ValidReaderWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.metastore.api.Partition;
@@ -243,10 +243,10 @@ public class Cleaner extends CompactorThread {
/**
* Each Compaction only compacts as far as the highest txn id such that all txns below it
- * are resolved (i.e. not opened). This is what "highestTxnId" tracks. This is only tracked
- * since Hive 1.3.0/2.0 - thus may be 0. See ValidCompactorTxnList and uses for more info.
+ * are resolved (i.e. not opened). This is what "highestWriteId" tracks. This is only tracked
+ * since Hive 1.3.0/2.0 - thus may be 0. See ValidCompactorWriteIdList and uses for more info.
*
- * We only want to clean up to the highestTxnId - otherwise we risk deleteing deltas from
+ * We only want to clean up to the highestWriteId - otherwise we risk deleteing deltas from
* under an active reader.
*
* Suppose we have deltas D2 D3 for table T, i.e. the last compaction created D3 so now there is a
@@ -255,10 +255,11 @@ public class Cleaner extends CompactorThread {
* Between that check and removeFiles() a query starts (it will be reading D3) and another compaction
* completes which creates D4.
* Now removeFiles() (more specifically AcidUtils.getAcidState()) will declare D3 to be obsolete
- * unless ValidTxnList is "capped" at highestTxnId.
+ * unless ValidTxnList is "capped" at highestWriteId.
*/
- final ValidTxnList txnList = ci.highestTxnId > 0 ?
- new ValidReadTxnList(new long[0], new BitSet(), ci.highestTxnId) : new ValidReadTxnList();
+ final ValidWriteIdList txnList = (ci.highestWriteId > 0)
+ ? new ValidReaderWriteIdList(ci.getFullTableName(), new long[0], new BitSet(), ci.highestWriteId)
+ : new ValidReaderWriteIdList();
if (runJobAsSelf(ci.runAs)) {
removeFiles(location, txnList);
@@ -288,8 +289,8 @@ public class Cleaner extends CompactorThread {
}
}
- private void removeFiles(String location, ValidTxnList txnList) throws IOException {
- AcidUtils.Directory dir = AcidUtils.getAcidState(new Path(location), conf, txnList);
+ private void removeFiles(String location, ValidWriteIdList writeIdList) throws IOException {
+ AcidUtils.Directory dir = AcidUtils.getAcidState(new Path(location), conf, writeIdList);
List<FileStatus> obsoleteDirs = dir.getObsolete();
List<Path> filesToDelete = new ArrayList<Path>(obsoleteDirs.size());
for (FileStatus stat : obsoleteDirs) {
[17/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
index 236e585..5c13781 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
@@ -34,8 +34,8 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.common.JavaUtils;
import org.apache.hadoop.hive.common.StringableMap;
-import org.apache.hadoop.hive.common.ValidCompactorTxnList;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidCompactorWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.CompactionType;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
@@ -110,7 +110,7 @@ public class CompactorMR {
}
private JobConf createBaseJobConf(HiveConf conf, String jobName, Table t, StorageDescriptor sd,
- ValidTxnList txns, CompactionInfo ci) {
+ ValidWriteIdList writeIds, CompactionInfo ci) {
JobConf job = new JobConf(conf);
job.setJobName(jobName);
job.setOutputKeyClass(NullWritable.class);
@@ -135,7 +135,7 @@ public class CompactorMR {
job.setBoolean(IS_COMPRESSED, sd.isCompressed());
job.set(TABLE_PROPS, new StringableMap(t.getParameters()).toString());
job.setInt(NUM_BUCKETS, sd.getNumBuckets());
- job.set(ValidTxnList.VALID_TXNS_KEY, txns.toString());
+ job.set(ValidWriteIdList.VALID_WRITEIDS_KEY, writeIds.toString());
overrideMRProps(job, t.getParameters()); // override MR properties from tblproperties if applicable
if (ci.properties != null) {
overrideTblProps(job, t.getParameters(), ci.properties);
@@ -197,12 +197,12 @@ public class CompactorMR {
* @param jobName name to run this job with
* @param t metastore table
* @param sd metastore storage descriptor
- * @param txns list of valid transactions
+ * @param writeIds list of valid write ids
* @param ci CompactionInfo
* @throws java.io.IOException if the job fails
*/
- void run(HiveConf conf, String jobName, Table t, StorageDescriptor sd,
- ValidTxnList txns, CompactionInfo ci, Worker.StatsUpdater su, TxnStore txnHandler) throws IOException {
+ void run(HiveConf conf, String jobName, Table t, StorageDescriptor sd, ValidWriteIdList writeIds,
+ CompactionInfo ci, Worker.StatsUpdater su, TxnStore txnHandler) throws IOException {
if(conf.getBoolVar(HiveConf.ConfVars.HIVE_IN_TEST) && conf.getBoolVar(HiveConf.ConfVars.HIVETESTMODEFAILCOMPACTION)) {
throw new RuntimeException(HiveConf.ConfVars.HIVETESTMODEFAILCOMPACTION.name() + "=true");
@@ -213,18 +213,18 @@ public class CompactorMR {
if (AcidUtils.isInsertOnlyTable(t.getParameters())) {
LOG.debug("Going to delete directories for aborted transactions for MM table "
+ t.getDbName() + "." + t.getTableName());
- removeFiles(conf, sd.getLocation(), txns, t);
+ removeFiles(conf, sd.getLocation(), writeIds, t);
return;
}
- JobConf job = createBaseJobConf(conf, jobName, t, sd, txns, ci);
+ JobConf job = createBaseJobConf(conf, jobName, t, sd, writeIds, ci);
// Figure out and encode what files we need to read. We do this here (rather than in
// getSplits below) because as part of this we discover our minimum and maximum transactions,
// and discovering that in getSplits is too late as we then have no way to pass it to our
// mapper.
- AcidUtils.Directory dir = AcidUtils.getAcidState(new Path(sd.getLocation()), conf, txns, false, true);
+ AcidUtils.Directory dir = AcidUtils.getAcidState(new Path(sd.getLocation()), conf, writeIds, false, true);
List<AcidUtils.ParsedDelta> parsedDeltas = dir.getCurrentDirectories();
int maxDeltastoHandle = conf.getIntVar(HiveConf.ConfVars.COMPACTOR_MAX_NUM_DELTA);
if(parsedDeltas.size() > maxDeltastoHandle) {
@@ -242,14 +242,14 @@ public class CompactorMR {
"runaway/mis-configured process writing to ACID tables, especially using Streaming Ingest API.");
int numMinorCompactions = parsedDeltas.size() / maxDeltastoHandle;
for(int jobSubId = 0; jobSubId < numMinorCompactions; jobSubId++) {
- JobConf jobMinorCompact = createBaseJobConf(conf, jobName + "_" + jobSubId, t, sd, txns, ci);
+ JobConf jobMinorCompact = createBaseJobConf(conf, jobName + "_" + jobSubId, t, sd, writeIds, ci);
launchCompactionJob(jobMinorCompact,
null, CompactionType.MINOR, null,
parsedDeltas.subList(jobSubId * maxDeltastoHandle, (jobSubId + 1) * maxDeltastoHandle),
maxDeltastoHandle, -1, conf, txnHandler, 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, txns);
+ dir = AcidUtils.getAcidState(new Path(sd.getLocation()), conf, writeIds);
}
StringableList dirsToSearch = new StringableList();
@@ -280,8 +280,8 @@ public class CompactorMR {
if (parsedDeltas.size() == 0 && dir.getOriginalFiles().size() == 0) {
// Skip compaction if there's no delta files AND there's no original files
String minOpenInfo = ".";
- if(txns.getMinOpenTxn() != null) {
- minOpenInfo = " with min Open " + JavaUtils.txnIdToString(txns.getMinOpenTxn()) +
+ if(writeIds.getMinOpenWriteId() != null) {
+ minOpenInfo = " with min Open " + JavaUtils.writeIdToString(writeIds.getMinOpenWriteId()) +
". Compaction cannot compact above this txnid";
}
LOG.error("No delta files or original files found to compact in " + sd.getLocation() +
@@ -316,8 +316,8 @@ public class CompactorMR {
LOG.debug("Adding delta " + delta.getPath() + " to directories to search");
dirsToSearch.add(delta.getPath());
deltaDirs.add(delta.getPath());
- minTxn = Math.min(minTxn, delta.getMinTransaction());
- maxTxn = Math.max(maxTxn, delta.getMaxTransaction());
+ minTxn = Math.min(minTxn, delta.getMinWriteId());
+ maxTxn = Math.max(maxTxn, delta.getMaxWriteId());
}
if (baseDir != null) job.set(BASE_DIR, baseDir.toString());
@@ -379,9 +379,9 @@ public class CompactorMR {
}
// Remove the directories for aborted transactions only
- private void removeFiles(HiveConf conf, String location, ValidTxnList txnList, Table t)
+ private void removeFiles(HiveConf conf, String location, ValidWriteIdList writeIdList, Table t)
throws IOException {
- AcidUtils.Directory dir = AcidUtils.getAcidState(new Path(location), conf, txnList,
+ AcidUtils.Directory dir = AcidUtils.getAcidState(new Path(location), conf, writeIdList,
Ref.from(false), false, t.getParameters());
// For MM table, we only want to delete delta dirs for aborted txns.
List<FileStatus> abortedDirs = dir.getAbortedDirectories();
@@ -718,13 +718,13 @@ public class CompactorMR {
@SuppressWarnings("unchecked")//since there is no way to parametrize instance of Class
AcidInputFormat<WritableComparable, V> aif =
instantiate(AcidInputFormat.class, jobConf.get(INPUT_FORMAT_CLASS_NAME));
- ValidTxnList txnList =
- new ValidCompactorTxnList(jobConf.get(ValidTxnList.VALID_TXNS_KEY));
+ ValidWriteIdList writeIdList =
+ new ValidCompactorWriteIdList(jobConf.get(ValidWriteIdList.VALID_WRITEIDS_KEY));
boolean isMajor = jobConf.getBoolean(IS_MAJOR, false);
AcidInputFormat.RawReader<V> reader =
aif.getRawReader(jobConf, isMajor, split.getBucket(),
- txnList, split.getBaseDir(), split.getDeltaDirs());
+ writeIdList, split.getBaseDir(), split.getDeltaDirs());
RecordIdentifier identifier = reader.createKey();
V value = reader.createValue();
getWriter(reporter, reader.getObjectInspector(), split.getBucket());
@@ -779,8 +779,8 @@ public class CompactorMR {
.isCompressed(jobConf.getBoolean(IS_COMPRESSED, false))
.tableProperties(new StringableMap(jobConf.get(TABLE_PROPS)).toProperties())
.reporter(reporter)
- .minimumTransactionId(jobConf.getLong(MIN_TXN, Long.MAX_VALUE))
- .maximumTransactionId(jobConf.getLong(MAX_TXN, Long.MIN_VALUE))
+ .minimumWriteId(jobConf.getLong(MIN_TXN, Long.MAX_VALUE))
+ .maximumWriteId(jobConf.getLong(MAX_TXN, Long.MIN_VALUE))
.bucket(bucket)
.statementId(-1);//setting statementId == -1 makes compacted delta files use
//delta_xxxx_yyyy format
@@ -804,8 +804,8 @@ public class CompactorMR {
.isCompressed(jobConf.getBoolean(IS_COMPRESSED, false))
.tableProperties(new StringableMap(jobConf.get(TABLE_PROPS)).toProperties())
.reporter(reporter)
- .minimumTransactionId(jobConf.getLong(MIN_TXN, Long.MAX_VALUE))
- .maximumTransactionId(jobConf.getLong(MAX_TXN, Long.MIN_VALUE))
+ .minimumWriteId(jobConf.getLong(MIN_TXN, Long.MAX_VALUE))
+ .maximumWriteId(jobConf.getLong(MAX_TXN, Long.MIN_VALUE))
.bucket(bucket)
.statementId(-1);//setting statementId == -1 makes compacted delta files use
//delta_xxxx_yyyy format
@@ -926,8 +926,8 @@ public class CompactorMR {
AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf)
.writingBase(conf.getBoolean(IS_MAJOR, false))
.isCompressed(conf.getBoolean(IS_COMPRESSED, false))
- .minimumTransactionId(conf.getLong(MIN_TXN, Long.MAX_VALUE))
- .maximumTransactionId(conf.getLong(MAX_TXN, Long.MIN_VALUE))
+ .minimumWriteId(conf.getLong(MIN_TXN, Long.MAX_VALUE))
+ .maximumWriteId(conf.getLong(MAX_TXN, Long.MIN_VALUE))
.bucket(0)
.statementId(-1);
Path newDeltaDir = AcidUtils.createFilename(finalLocation, options).getParent();
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java
index a52e023..7eda7fb 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java
@@ -21,11 +21,12 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.common.FileUtils;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.CompactionRequest;
import org.apache.hadoop.hive.metastore.api.CompactionResponse;
import org.apache.hadoop.hive.metastore.api.CompactionType;
+import org.apache.hadoop.hive.metastore.api.GetValidWriteIdsRequest;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.metastore.api.Partition;
import org.apache.hadoop.hive.metastore.api.ShowCompactRequest;
@@ -46,6 +47,7 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.security.PrivilegedExceptionAction;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -88,8 +90,6 @@ public class Initiator extends CompactorThread {
startedAt = System.currentTimeMillis();
//todo: add method to only get current i.e. skip history - more efficient
ShowCompactResponse currentCompactions = txnHandler.showCompact(new ShowCompactRequest());
- ValidTxnList txns =
- TxnUtils.createValidCompactTxnList(txnHandler.getOpenTxnsInfo());
Set<CompactionInfo> potentials = txnHandler.findPotentialCompactions(abortedThreshold);
LOG.debug("Found " + potentials.size() + " potential compactions, " +
"checking to see if we should compact any of them");
@@ -143,12 +143,21 @@ public class Initiator extends CompactorThread {
", assuming it has been dropped and moving on.");
continue;
}
+
+ // Compaction doesn't work under a transaction and hence pass null for validTxnList
+ // The response will have one entry per table and hence we get only one ValidWriteIdList
+ String fullTableName = TxnUtils.getFullTableName(t.getDbName(), t.getTableName());
+ GetValidWriteIdsRequest rqst
+ = new GetValidWriteIdsRequest(Collections.singletonList(fullTableName), null);
+ ValidWriteIdList tblValidWriteIds = TxnUtils.createValidCompactWriteIdList(
+ txnHandler.getValidWriteIds(rqst).getTblValidWriteIds().get(0));
+
StorageDescriptor sd = resolveStorageDescriptor(t, p);
String runAs = findUserToRunAs(sd.getLocation(), t);
/*Future thought: checkForCompaction will check a lot of file metadata and may be expensive.
* Long term we should consider having a thread pool here and running checkForCompactionS
* in parallel*/
- CompactionType compactionNeeded = checkForCompaction(ci, txns, sd, t.getParameters(), runAs);
+ CompactionType compactionNeeded = checkForCompaction(ci, tblValidWriteIds, sd, t.getParameters(), runAs);
if (compactionNeeded != null) requestCompaction(ci, runAs, compactionNeeded);
} catch (Throwable t) {
LOG.error("Caught exception while trying to determine if we should compact " +
@@ -215,7 +224,7 @@ public class Initiator extends CompactorThread {
}
private CompactionType checkForCompaction(final CompactionInfo ci,
- final ValidTxnList txns,
+ final ValidWriteIdList writeIds,
final StorageDescriptor sd,
final Map<String, String> tblproperties,
final String runAs)
@@ -227,7 +236,7 @@ public class Initiator extends CompactorThread {
return CompactionType.MAJOR;
}
if (runJobAsSelf(runAs)) {
- return determineCompactionType(ci, txns, sd, tblproperties);
+ return determineCompactionType(ci, writeIds, sd, tblproperties);
} else {
LOG.info("Going to initiate as user " + runAs);
UserGroupInformation ugi = UserGroupInformation.createProxyUser(runAs,
@@ -235,7 +244,7 @@ public class Initiator extends CompactorThread {
CompactionType compactionType = ugi.doAs(new PrivilegedExceptionAction<CompactionType>() {
@Override
public CompactionType run() throws Exception {
- return determineCompactionType(ci, txns, sd, tblproperties);
+ return determineCompactionType(ci, writeIds, sd, tblproperties);
}
});
try {
@@ -248,7 +257,7 @@ public class Initiator extends CompactorThread {
}
}
- private CompactionType determineCompactionType(CompactionInfo ci, ValidTxnList txns,
+ private CompactionType determineCompactionType(CompactionInfo ci, ValidWriteIdList writeIds,
StorageDescriptor sd, Map<String, String> tblproperties)
throws IOException, InterruptedException {
@@ -259,7 +268,7 @@ public class Initiator extends CompactorThread {
boolean noBase = false;
Path location = new Path(sd.getLocation());
FileSystem fs = location.getFileSystem(conf);
- AcidUtils.Directory dir = AcidUtils.getAcidState(location, conf, txns, false, false);
+ AcidUtils.Directory dir = AcidUtils.getAcidState(location, conf, writeIds, false, false);
Path base = dir.getBaseDirectory();
long baseSize = 0;
FileStatus stat = null;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
index e5ebf9a..c47e78e 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
@@ -18,16 +18,17 @@
package org.apache.hadoop.hive.ql.txn.compactor;
import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.hive.metastore.api.GetValidWriteIdsRequest;
+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.mapred.JobConf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
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.txn.CompactionInfo;
import org.apache.hadoop.hive.metastore.txn.TxnUtils;
import org.apache.hadoop.hive.ql.Driver;
@@ -138,10 +139,15 @@ public class Worker extends CompactorThread {
}
final boolean isMajor = ci.isMajorCompaction();
- final ValidTxnList txns =
- TxnUtils.createValidCompactTxnList(txnHandler.getOpenTxnsInfo());
- LOG.debug("ValidCompactTxnList: " + txns.writeToString());
- txnHandler.setCompactionHighestTxnId(ci, txns.getHighWatermark());
+
+ // Compaction doesn't work under a transaction and hence pass 0 for current txn Id
+ // The response will have one entry per table and hence we get only one OpenWriteIds
+ String fullTableName = TxnUtils.getFullTableName(t.getDbName(), t.getTableName());
+ GetValidWriteIdsRequest rqst = new GetValidWriteIdsRequest(Collections.singletonList(fullTableName), null);
+ final ValidWriteIdList tblValidWriteIds =
+ TxnUtils.createValidCompactWriteIdList(txnHandler.getValidWriteIds(rqst).getTblValidWriteIds().get(0));
+ LOG.debug("ValidCompactWriteIdList: " + tblValidWriteIds.writeToString());
+ txnHandler.setCompactionHighestWriteId(ci, tblValidWriteIds.getHighWatermark());
final StringBuilder jobName = new StringBuilder(name);
jobName.append("-compactor-");
jobName.append(ci.getFullPartitionName());
@@ -164,14 +170,14 @@ public class Worker extends CompactorThread {
launchedJob = true;
try {
if (runJobAsSelf(runAs)) {
- mr.run(conf, jobName.toString(), t, sd, txns, ci, su, txnHandler);
+ mr.run(conf, jobName.toString(), t, sd, tblValidWriteIds, ci, su, txnHandler);
} else {
UserGroupInformation ugi = UserGroupInformation.createProxyUser(t.getOwner(),
UserGroupInformation.getLoginUser());
ugi.doAs(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
- mr.run(conf, jobName.toString(), t, sd, txns, ci, su, txnHandler);
+ mr.run(conf, jobName.toString(), t, sd, tblValidWriteIds, ci, su, txnHandler);
return null;
}
});
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java b/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
index 2663061..45890ed 100644
--- a/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
+++ b/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
@@ -20,6 +20,8 @@ package org.apache.hadoop.hive.metastore.txn;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.AbortTxnRequest;
import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsRequest;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsResponse;
import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
import org.apache.hadoop.hive.metastore.api.CompactionRequest;
import org.apache.hadoop.hive.metastore.api.CompactionType;
@@ -56,7 +58,7 @@ import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
/**
- * Tests for TxnHandler.
+ * Tests for CompactionTxnHandler.
*/
public class TestCompactionTxnHandler {
@@ -478,6 +480,13 @@ public class TestCompactionTxnHandler {
String tableName = "adp_table";
OpenTxnsResponse openTxns = txnHandler.openTxns(new OpenTxnRequest(1, "me", "localhost"));
long txnId = openTxns.getTxn_ids().get(0);
+
+ AllocateTableWriteIdsResponse writeIds
+ = txnHandler.allocateTableWriteIds(new AllocateTableWriteIdsRequest(openTxns.getTxn_ids(), dbName, tableName));
+ long writeId = writeIds.getTxnToWriteIds().get(0).getWriteId();
+ assertEquals(txnId, writeIds.getTxnToWriteIds().get(0).getTxnId());
+ assertEquals(1, writeId);
+
// lock a table, as in dynamic partitions
LockComponent lc = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, dbName);
lc.setIsDynamicPartitionWrite(true);
@@ -489,7 +498,7 @@ public class TestCompactionTxnHandler {
LockResponse lock = txnHandler.lock(lr);
assertEquals(LockState.ACQUIRED, lock.getState());
- AddDynamicPartitions adp = new AddDynamicPartitions(txnId, dbName, tableName,
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnId, writeId, dbName, tableName,
Arrays.asList("ds=yesterday", "ds=today"));
adp.setOperationType(dop);
txnHandler.addDynamicPartitions(adp);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java b/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
index 9eaf039..7b510dd 100644
--- a/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
+++ b/ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
@@ -21,6 +21,8 @@ import org.apache.hadoop.hive.common.JavaUtils;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.AbortTxnRequest;
import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsRequest;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsResponse;
import org.apache.hadoop.hive.metastore.api.CheckLockRequest;
import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
import org.apache.hadoop.hive.metastore.api.CompactionRequest;
@@ -71,6 +73,7 @@ import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -149,7 +152,14 @@ public class TestTxnHandler {
txnHandler.abortTxn(new AbortTxnRequest(1));
List<String> parts = new ArrayList<String>();
parts.add("p=1");
- AddDynamicPartitions adp = new AddDynamicPartitions(3, "default", "T", parts);
+
+ AllocateTableWriteIdsResponse writeIds
+ = txnHandler.allocateTableWriteIds(new AllocateTableWriteIdsRequest(Collections.singletonList(3L), "default", "T"));
+ long writeId = writeIds.getTxnToWriteIds().get(0).getWriteId();
+ assertEquals(3, writeIds.getTxnToWriteIds().get(0).getTxnId());
+ assertEquals(1, writeId);
+
+ AddDynamicPartitions adp = new AddDynamicPartitions(3, writeId, "default", "T", parts);
adp.setOperationType(DataOperationType.INSERT);
txnHandler.addDynamicPartitions(adp);
GetOpenTxnsInfoResponse txnsInfo = txnHandler.getOpenTxnsInfo();
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java
index 2a1545f..470856b 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java
@@ -760,14 +760,18 @@ public class TestTxnCommands extends TxnCommandsBaseForTests {
Assert.assertEquals(536936448,
BucketCodec.V1.encode(new AcidOutputFormat.Options(hiveConf).bucket(1)));
Assert.assertEquals("", 4, rs.size());
- Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t12"));
+ Assert.assertTrue(rs.get(0),
+ rs.get(0).startsWith("{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t12"));
Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nonacidorctbl/000000_0_copy_1"));
- Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":0}\t1\t2"));
+ Assert.assertTrue(rs.get(1),
+ rs.get(1).startsWith("{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":0}\t1\t2"));
Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nonacidorctbl/000001_0"));
- Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t5"));
+ Assert.assertTrue(rs.get(2),
+ rs.get(2).startsWith("{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t5"));
Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nonacidorctbl/000001_0_copy_1"));
- Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":16,\"bucketid\":536936448,\"rowid\":0}\t1\t17"));
- Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nonacidorctbl/delta_0000016_0000016_0000/bucket_00001"));
+ Assert.assertTrue(rs.get(3),
+ rs.get(3).startsWith("{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t17"));
+ Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nonacidorctbl/delta_0000001_0000001_0000/bucket_00001"));
//run Compaction
runStatementOnDriver("alter table "+ TestTxnCommands2.Table.NONACIDORCTBL +" compact 'major'");
TestTxnCommands2.runWorker(hiveConf);
@@ -777,14 +781,18 @@ public class TestTxnCommands extends TxnCommandsBaseForTests {
LOG.warn(s);
}
Assert.assertEquals("", 4, rs.size());
- Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t12"));
- Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nonacidorctbl/base_0000016/bucket_00000"));
- Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":0}\t1\t2"));
- Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nonacidorctbl/base_0000016/bucket_00001"));
- Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t5"));
- Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nonacidorctbl/base_0000016/bucket_00001"));
- Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":16,\"bucketid\":536936448,\"rowid\":0}\t1\t17"));
- Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nonacidorctbl/base_0000016/bucket_00001"));
+ Assert.assertTrue(rs.get(0),
+ rs.get(0).startsWith("{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t12"));
+ Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nonacidorctbl/base_0000001/bucket_00000"));
+ Assert.assertTrue(rs.get(1),
+ rs.get(1).startsWith("{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":0}\t1\t2"));
+ Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nonacidorctbl/base_0000001/bucket_00001"));
+ Assert.assertTrue(rs.get(2),
+ rs.get(2).startsWith("{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t5"));
+ Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nonacidorctbl/base_0000001/bucket_00001"));
+ Assert.assertTrue(rs.get(3),
+ rs.get(3).startsWith("{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t17"));
+ Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nonacidorctbl/base_0000001/bucket_00001"));
//make sure they are the same before and after compaction
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
index bab6d5e..2eead9e 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
@@ -34,7 +34,7 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.common.FileUtils;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
import org.apache.hadoop.hive.metastore.api.CompactionRequest;
@@ -366,15 +366,15 @@ public class TestTxnCommands2 {
* Note: order of rows in a file ends up being the reverse of order in values clause (why?!)
*/
String[][] expected = {
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t13", "bucket_00000"},
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":0}\t0\t15", "bucket_00000"},
- {"{\"transactionid\":22,\"bucketid\":536870912,\"rowid\":0}\t0\t17", "bucket_00000"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t0\t120", "bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t2", "bucket_00001"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":3}\t1\t4", "bucket_00001"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":2}\t1\t5", "bucket_00001"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":4}\t1\t6", "bucket_00001"},
- {"{\"transactionid\":20,\"bucketid\":536936448,\"rowid\":0}\t1\t16", "bucket_00001"}
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t13", "bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t15", "bucket_00000"},
+ {"{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":0}\t0\t17", "bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t0\t120", "bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t2", "bucket_00001"},
+ {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":3}\t1\t4", "bucket_00001"},
+ {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":2}\t1\t5", "bucket_00001"},
+ {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":4}\t1\t6", "bucket_00001"},
+ {"{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t16", "bucket_00001"}
};
Assert.assertEquals("Unexpected row count before compaction", expected.length, rs.size());
for(int i = 0; i < expected.length; i++) {
@@ -759,11 +759,11 @@ public class TestTxnCommands2 {
FileStatus[] buckets = fs.listStatus(status[i].getPath(), FileUtils.HIDDEN_FILES_PATH_FILTER);
Arrays.sort(buckets);
if (numDelta == 1) {
- Assert.assertEquals("delta_0000024_0000024_0000", status[i].getPath().getName());
+ Assert.assertEquals("delta_0000001_0000001_0000", status[i].getPath().getName());
Assert.assertEquals(BUCKET_COUNT - 1, buckets.length);
Assert.assertEquals("bucket_00001", buckets[0].getPath().getName());
} else if (numDelta == 2) {
- Assert.assertEquals("delta_0000025_0000025_0000", status[i].getPath().getName());
+ Assert.assertEquals("delta_0000002_0000002_0000", status[i].getPath().getName());
Assert.assertEquals(1, buckets.length);
Assert.assertEquals("bucket_00001", buckets[0].getPath().getName());
}
@@ -772,7 +772,7 @@ public class TestTxnCommands2 {
FileStatus[] buckets = fs.listStatus(status[i].getPath(), FileUtils.HIDDEN_FILES_PATH_FILTER);
Arrays.sort(buckets);
if (numDeleteDelta == 1) {
- Assert.assertEquals("delete_delta_0000024_0000024_0000", status[i].getPath().getName());
+ Assert.assertEquals("delete_delta_0000001_0000001_0000", status[i].getPath().getName());
Assert.assertEquals(BUCKET_COUNT - 1, buckets.length);
Assert.assertEquals("bucket_00001", buckets[0].getPath().getName());
}
@@ -819,7 +819,7 @@ public class TestTxnCommands2 {
Assert.assertEquals("bucket_00001", buckets[0].getPath().getName());
} else if (numBase == 2) {
// The new base dir now has two bucket files, since the delta dir has two bucket files
- Assert.assertEquals("base_0000025", status[i].getPath().getName());
+ Assert.assertEquals("base_0000002", status[i].getPath().getName());
Assert.assertEquals(1, buckets.length);
Assert.assertEquals("bucket_00001", buckets[0].getPath().getName());
}
@@ -845,7 +845,7 @@ public class TestTxnCommands2 {
status = fs.listStatus(new Path(TEST_WAREHOUSE_DIR + "/" +
(Table.NONACIDORCTBL).toString().toLowerCase()), FileUtils.HIDDEN_FILES_PATH_FILTER);
Assert.assertEquals(1, status.length);
- Assert.assertEquals("base_0000025", status[0].getPath().getName());
+ Assert.assertEquals("base_0000002", status[0].getPath().getName());
FileStatus[] buckets = fs.listStatus(status[0].getPath(), FileUtils.HIDDEN_FILES_PATH_FILTER);
Arrays.sort(buckets);
Assert.assertEquals(1, buckets.length);
@@ -861,7 +861,7 @@ public class TestTxnCommands2 {
public void testValidTxnsBookkeeping() throws Exception {
// 1. Run a query against a non-ACID table, and we shouldn't have txn logged in conf
runStatementOnDriver("select * from " + Table.NONACIDORCTBL);
- String value = hiveConf.get(ValidTxnList.VALID_TXNS_KEY);
+ String value = hiveConf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY);
Assert.assertNull("The entry should be null for query that doesn't involve ACID tables", value);
}
@@ -874,9 +874,9 @@ public class TestTxnCommands2 {
//this will cause next txn to be marked aborted but the data is still written to disk
hiveConf.setBoolVar(HiveConf.ConfVars.HIVETESTMODEROLLBACKTXN, true);
runStatementOnDriver("insert into " + Table.ACIDTBL + " " + makeValuesClause(tableData2));
- assert hiveConf.get(ValidTxnList.VALID_TXNS_KEY) == null : "previous txn should've cleaned it";
+ assert hiveConf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY) == null : "previous txn should've cleaned it";
//so now if HIVEFETCHTASKCONVERSION were to use a stale value, it would use a
- //ValidTxnList with HWM=MAX_LONG, i.e. include the data for aborted txn
+ //ValidWriteIdList with HWM=MAX_LONG, i.e. include the data for aborted txn
List<String> rs = runStatementOnDriver("select * from " + Table.ACIDTBL);
Assert.assertEquals("Extra data", 2, rs.size());
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnLoadData.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnLoadData.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnLoadData.java
index 3a3272f..0a305a4 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnLoadData.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnLoadData.java
@@ -105,13 +105,13 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
String testQuery = isVectorized ? "select ROW__ID, a, b from T order by ROW__ID" :
"select ROW__ID, a, b, INPUT__FILE__NAME from T order by ROW__ID";
String[][] expected = new String[][]{
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000020_0000020_0000/000000_0"},
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000020_0000020_0000/000000_0"}};
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000001_0000001_0000/000000_0"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000001_0000001_0000/000000_0"}};
checkResult(expected, testQuery, isVectorized, "load data inpath");
runStatementOnDriver("update T set b = 17 where a = 1");
String[][] expected2 = new String[][]{
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000020_0000020_0000/000000_0"},
- {"{\"transactionid\":23,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "t/delta_0000023_0000023_0000/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000001_0000001_0000/000000_0"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "t/delta_0000002_0000002_0000/bucket_00000"}
};
checkResult(expected2, testQuery, isVectorized, "update");
@@ -121,15 +121,15 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
runStatementOnDriver("alter table T compact 'minor'");
TestTxnCommands2.runWorker(hiveConf);
String[][] expected3 = new String[][] {
- {"{\"transactionid\":23,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "t/delta_0000020_0000027/bucket_00000"},
- {"{\"transactionid\":26,\"bucketid\":536870912,\"rowid\":0}\t2\t2", "t/delta_0000020_0000027/bucket_00000"}
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "t/delta_0000001_0000004/bucket_00000"},
+ {"{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":0}\t2\t2", "t/delta_0000001_0000004/bucket_00000"}
};
checkResult(expected3, testQuery, isVectorized, "delete compact minor");
runStatementOnDriver("load data local inpath '" + getWarehouseDir() + "/1/data' overwrite into table T");
String[][] expected4 = new String[][]{
- {"{\"transactionid\":31,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/base_0000031/000000_0"},
- {"{\"transactionid\":31,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/base_0000031/000000_0"}};
+ {"{\"transactionid\":5,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/base_0000005/000000_0"},
+ {"{\"transactionid\":5,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/base_0000005/000000_0"}};
checkResult(expected4, testQuery, isVectorized, "load data inpath overwrite");
//load same data again (additive)
@@ -138,9 +138,9 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
runStatementOnDriver("delete from T where a = 3");//matches 2 rows
runStatementOnDriver("insert into T values(2,2)");
String[][] expected5 = new String[][]{
- {"{\"transactionid\":35,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "t/delta_0000035_0000035_0000/bucket_00000"},
- {"{\"transactionid\":35,\"bucketid\":536870912,\"rowid\":1}\t1\t17", "t/delta_0000035_0000035_0000/bucket_00000"},
- {"{\"transactionid\":37,\"bucketid\":536870912,\"rowid\":0}\t2\t2", "t/delta_0000037_0000037_0000/bucket_00000"}
+ {"{\"transactionid\":7,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "t/delta_0000007_0000007_0000/bucket_00000"},
+ {"{\"transactionid\":7,\"bucketid\":536870912,\"rowid\":1}\t1\t17", "t/delta_0000007_0000007_0000/bucket_00000"},
+ {"{\"transactionid\":9,\"bucketid\":536870912,\"rowid\":0}\t2\t2", "t/delta_0000009_0000009_0000/bucket_00000"}
};
checkResult(expected5, testQuery, isVectorized, "load data inpath overwrite update");
@@ -148,9 +148,9 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
runStatementOnDriver("alter table T compact 'major'");
TestTxnCommands2.runWorker(hiveConf);
String[][] expected6 = new String[][]{
- {"{\"transactionid\":35,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "t/base_0000037/bucket_00000"},
- {"{\"transactionid\":35,\"bucketid\":536870912,\"rowid\":1}\t1\t17", "t/base_0000037/bucket_00000"},
- {"{\"transactionid\":37,\"bucketid\":536870912,\"rowid\":0}\t2\t2", "t/base_0000037/bucket_00000"}
+ {"{\"transactionid\":7,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "t/base_0000009/bucket_00000"},
+ {"{\"transactionid\":7,\"bucketid\":536870912,\"rowid\":1}\t1\t17", "t/base_0000009/bucket_00000"},
+ {"{\"transactionid\":9,\"bucketid\":536870912,\"rowid\":0}\t2\t2", "t/base_0000009/bucket_00000"}
};
checkResult(expected6, testQuery, isVectorized, "load data inpath compact major");
}
@@ -173,22 +173,22 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
String testQuery = isVectorized ? "select ROW__ID, a, b from T order by ROW__ID" :
"select ROW__ID, a, b, INPUT__FILE__NAME from T order by ROW__ID";
String[][] expected = new String[][] {
- //normal insert
- {"{\"transactionid\":16,\"bucketid\":536870912,\"rowid\":0}\t0\t2", "t/delta_0000016_0000016_0000/bucket_00000"},
- {"{\"transactionid\":16,\"bucketid\":536870912,\"rowid\":1}\t0\t4", "t/delta_0000016_0000016_0000/bucket_00000"},
- //Load Data
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000021_0000021_0000/000000_0"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000021_0000021_0000/000000_0"}};
+ //normal insert
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t2", "t/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t0\t4", "t/delta_0000001_0000001_0000/bucket_00000"},
+ //Load Data
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000002_0000002_0000/000000_0"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000002_0000002_0000/000000_0"}};
checkResult(expected, testQuery, isVectorized, "load data inpath");
//test minor compaction
runStatementOnDriver("alter table T compact 'minor'");
TestTxnCommands2.runWorker(hiveConf);
String[][] expected1 = new String[][] {
- {"{\"transactionid\":16,\"bucketid\":536870912,\"rowid\":0}\t0\t2", "t/delta_0000016_0000021/bucket_00000"},
- {"{\"transactionid\":16,\"bucketid\":536870912,\"rowid\":1}\t0\t4", "t/delta_0000016_0000021/bucket_00000"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000016_0000021/bucket_00000"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000016_0000021/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t2", "t/delta_0000001_0000002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t0\t4", "t/delta_0000001_0000002/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000001_0000002/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000001_0000002/bucket_00000"}
};
checkResult(expected1, testQuery, isVectorized, "load data inpath (minor)");
@@ -197,11 +197,11 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
runStatementOnDriver("alter table T compact 'major'");
TestTxnCommands2.runWorker(hiveConf);
String[][] expected2 = new String[][] {
- {"{\"transactionid\":16,\"bucketid\":536870912,\"rowid\":0}\t0\t2", "t/base_0000027/bucket_00000"},
- {"{\"transactionid\":16,\"bucketid\":536870912,\"rowid\":1}\t0\t4", "t/base_0000027/bucket_00000"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/base_0000027/bucket_00000"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/base_0000027/bucket_00000"},
- {"{\"transactionid\":27,\"bucketid\":536870912,\"rowid\":0}\t2\t2", "t/base_0000027/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t2", "t/base_0000003/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t0\t4", "t/base_0000003/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/base_0000003/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/base_0000003/bucket_00000"},
+ {"{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":0}\t2\t2", "t/base_0000003/bucket_00000"}
};
checkResult(expected2, testQuery, isVectorized, "load data inpath (major)");
@@ -210,8 +210,8 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
runStatementOnDriver("export table Tstage to '" + getWarehouseDir() +"/2'");
runStatementOnDriver("load data inpath '" + getWarehouseDir() + "/2/data' overwrite into table T");
String[][] expected3 = new String[][] {
- {"{\"transactionid\":33,\"bucketid\":536870912,\"rowid\":0}\t5\t6", "t/base_0000033/000000_0"},
- {"{\"transactionid\":33,\"bucketid\":536870912,\"rowid\":1}\t7\t8", "t/base_0000033/000000_0"}};
+ {"{\"transactionid\":4,\"bucketid\":536870912,\"rowid\":0}\t5\t6", "t/base_0000004/000000_0"},
+ {"{\"transactionid\":4,\"bucketid\":536870912,\"rowid\":1}\t7\t8", "t/base_0000004/000000_0"}};
checkResult(expected3, testQuery, isVectorized, "load data inpath overwrite");
//one more major compaction
@@ -219,9 +219,9 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
runStatementOnDriver("alter table T compact 'major'");
TestTxnCommands2.runWorker(hiveConf);
String[][] expected4 = new String[][] {
- {"{\"transactionid\":33,\"bucketid\":536870912,\"rowid\":0}\t5\t6", "t/base_0000036/bucket_00000"},
- {"{\"transactionid\":33,\"bucketid\":536870912,\"rowid\":1}\t7\t8", "t/base_0000036/bucket_00000"},
- {"{\"transactionid\":36,\"bucketid\":536870912,\"rowid\":0}\t6\t6", "t/base_0000036/bucket_00000"}};
+ {"{\"transactionid\":4,\"bucketid\":536870912,\"rowid\":0}\t5\t6", "t/base_0000005/bucket_00000"},
+ {"{\"transactionid\":4,\"bucketid\":536870912,\"rowid\":1}\t7\t8", "t/base_0000005/bucket_00000"},
+ {"{\"transactionid\":5,\"bucketid\":536870912,\"rowid\":0}\t6\t6", "t/base_0000005/bucket_00000"}};
checkResult(expected4, testQuery, isVectorized, "load data inpath overwrite (major)");
}
/**
@@ -254,24 +254,23 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
/*
{"transactionid":0,"bucketid":536870912,"rowid":0} 0 2/000000_0
{"transactionid":0,"bucketid":536870912,"rowid":1} 0 4/000000_0
-{"transactionid":24,"bucketid":536870912,"rowid":0} 4 4/delta_0000024_0000024_0000/000000_0
-{"transactionid":24,"bucketid":536870912,"rowid":1} 5 5/delta_0000024_0000024_0000/000000_0
+{"transactionid":1,"bucketid":536870912,"rowid":0} 4 4/delta_0000001_0000001_0000/000000_0
+{"transactionid":1,"bucketid":536870912,"rowid":1} 5 5/delta_0000001_0000001_0000/000000_0
*/
String[][] expected = new String[][] {
- //from pre-acid insert
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t2", "t/000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t0\t4", "t/000000_0"},
- //from Load Data into acid converted table
- {"{\"transactionid\":24,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000024_0000024_0000/000000_0"},
- {"{\"transactionid\":24,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000024_0000024_0000/000000_0"},
- {"{\"transactionid\":24,\"bucketid\":536936448,\"rowid\":0}\t2\t2", "t/delta_0000024_0000024_0000/000001_0"},
- {"{\"transactionid\":24,\"bucketid\":536936448,\"rowid\":1}\t3\t3", "t/delta_0000024_0000024_0000/000001_0"},
- {"{\"transactionid\":24,\"bucketid\":537001984,\"rowid\":0}\t4\t4", "t/delta_0000024_0000024_0000/000002_0"},
- {"{\"transactionid\":24,\"bucketid\":537001984,\"rowid\":1}\t5\t5", "t/delta_0000024_0000024_0000/000002_0"},
+ //from pre-acid insert
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t2", "t/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t0\t4", "t/000000_0"},
+ //from Load Data into acid converted table
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000001_0000001_0000/000000_0"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000001_0000001_0000/000000_0"},
+ {"{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":0}\t2\t2", "t/delta_0000001_0000001_0000/000001_0"},
+ {"{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":1}\t3\t3", "t/delta_0000001_0000001_0000/000001_0"},
+ {"{\"transactionid\":1,\"bucketid\":537001984,\"rowid\":0}\t4\t4", "t/delta_0000001_0000001_0000/000002_0"},
+ {"{\"transactionid\":1,\"bucketid\":537001984,\"rowid\":1}\t5\t5", "t/delta_0000001_0000001_0000/000002_0"},
};
checkResult(expected, testQuery, isVectorized, "load data inpath");
-
//create more staging data with copy_N files and do LD+Overwrite
runStatementOnDriver("insert into Tstage values(5,6),(7,8)");
runStatementOnDriver("insert into Tstage values(8,8)");
@@ -279,9 +278,9 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
runStatementOnDriver("load data local inpath '" + getWarehouseDir() + "/2/data' overwrite into table T");
String[][] expected2 = new String[][] {
- {"{\"transactionid\":30,\"bucketid\":536870912,\"rowid\":0}\t5\t6", "t/base_0000030/000000_0"},
- {"{\"transactionid\":30,\"bucketid\":536870912,\"rowid\":1}\t7\t8", "t/base_0000030/000000_0"},
- {"{\"transactionid\":30,\"bucketid\":536936448,\"rowid\":0}\t8\t8", "t/base_0000030/000001_0"}
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t5\t6", "t/base_0000002/000000_0"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t7\t8", "t/base_0000002/000000_0"},
+ {"{\"transactionid\":2,\"bucketid\":536936448,\"rowid\":0}\t8\t8", "t/base_0000002/000001_0"}
};
checkResult(expected2, testQuery, isVectorized, "load data inpath overwrite");
@@ -291,11 +290,10 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
TestTxnCommands2.runWorker(hiveConf);
String[][] expected3 = new String[][] {
- {"{\"transactionid\":30,\"bucketid\":536870912,\"rowid\":0}\t5\t6", "t/base_0000033/bucket_00000"},
- {"{\"transactionid\":30,\"bucketid\":536870912,\"rowid\":1}\t7\t8", "t/base_0000033/bucket_00000"},
- {"{\"transactionid\":30,\"bucketid\":536936448,\"rowid\":0}\t8\t8", "t/base_0000033/bucket_00001"},
- {"{\"transactionid\":33,\"bucketid\":536870912,\"rowid\":0}\t9\t9", "t/base_0000033/bucket_00000"}
-
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t5\t6", "t/base_0000003/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t7\t8", "t/base_0000003/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536936448,\"rowid\":0}\t8\t8", "t/base_0000003/bucket_00001"},
+ {"{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":0}\t9\t9", "t/base_0000003/bucket_00000"}
};
checkResult(expected3, testQuery, isVectorized, "load data inpath overwrite (major)");
}
@@ -326,12 +324,12 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
List<String> rs = runStatementOnDriver("select ROW__ID, p, a, b, INPUT__FILE__NAME from T order by p, ROW__ID");
String[][] expected = new String[][] {
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t2", "t/p=0/delta_0000020_0000020_0000/000000_0"},
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":1}\t0\t0\t4", "t/p=0/delta_0000020_0000020_0000/000000_0"},
- {"{\"transactionid\":24,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t2", "t/p=1/delta_0000024_0000024_0000/000000_0"},
- {"{\"transactionid\":24,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t4", "t/p=1/delta_0000024_0000024_0000/000000_0"},
- {"{\"transactionid\":28,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t2", "t/p=1/delta_0000028_0000028_0000/000000_0"},
- {"{\"transactionid\":28,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4", "t/p=1/delta_0000028_0000028_0000/000000_0"}};
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t2", "t/p=0/delta_0000001_0000001_0000/000000_0"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t0\t0\t4", "t/p=0/delta_0000001_0000001_0000/000000_0"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t2", "t/p=1/delta_0000002_0000002_0000/000000_0"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t4", "t/p=1/delta_0000002_0000002_0000/000000_0"},
+ {"{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t2", "t/p=1/delta_0000003_0000003_0000/000000_0"},
+ {"{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4", "t/p=1/delta_0000003_0000003_0000/000000_0"}};
checkExpected(rs, expected, "load data inpath partitioned");
@@ -340,10 +338,10 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
runStatementOnDriver("truncate table Tstage");
runStatementOnDriver("load data inpath '" + getWarehouseDir() + "/4/data' overwrite into table T partition(p=1)");
String[][] expected2 = new String[][] {
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t2", "t/p=0/delta_0000020_0000020_0000/000000_0"},
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":1}\t0\t0\t4", "t/p=0/delta_0000020_0000020_0000/000000_0"},
- {"{\"transactionid\":33,\"bucketid\":536870912,\"rowid\":0}\t1\t5\t2", "t/p=1/base_0000033/000000_0"},
- {"{\"transactionid\":33,\"bucketid\":536870912,\"rowid\":1}\t1\t5\t4", "t/p=1/base_0000033/000000_0"}};
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t2", "t/p=0/delta_0000001_0000001_0000/000000_0"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t0\t0\t4", "t/p=0/delta_0000001_0000001_0000/000000_0"},
+ {"{\"transactionid\":4,\"bucketid\":536870912,\"rowid\":0}\t1\t5\t2", "t/p=1/base_0000004/000000_0"},
+ {"{\"transactionid\":4,\"bucketid\":536870912,\"rowid\":1}\t1\t5\t4", "t/p=1/base_0000004/000000_0"}};
rs = runStatementOnDriver("select ROW__ID, p, a, b, INPUT__FILE__NAME from T order by p, ROW__ID");
checkExpected(rs, expected2, "load data inpath partitioned overwrite");
}
@@ -405,20 +403,20 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
String testQuery = isVectorized ? "select ROW__ID, a, b from T order by ROW__ID" :
"select ROW__ID, a, b, INPUT__FILE__NAME from T order by ROW__ID";
String[][] expected = new String[][] {
- {"{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000019_0000019_0000/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000019_0000019_0000/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870913,\"rowid\":0}\t5\t5", "t/delta_0000019_0000019_0001/000000_0"},
- {"{\"transactionid\":19,\"bucketid\":536870913,\"rowid\":1}\t6\t6", "t/delta_0000019_0000019_0001/000000_0"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":0}\t5\t5", "t/delta_0000001_0000001_0001/000000_0"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":1}\t6\t6", "t/delta_0000001_0000001_0001/000000_0"}
};
checkResult(expected, testQuery, isVectorized, "load data inpath");
runStatementOnDriver("alter table T compact 'major'");
TestTxnCommands2.runWorker(hiveConf);
String[][] expected2 = new String[][] {
- {"{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/base_0000019/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/base_0000019/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870913,\"rowid\":0}\t5\t5", "t/base_0000019/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870913,\"rowid\":1}\t6\t6", "t/base_0000019/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/base_0000001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/base_0000001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":0}\t5\t5", "t/base_0000001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":1}\t6\t6", "t/base_0000001/bucket_00000"}
};
checkResult(expected2, testQuery, isVectorized, "load data inpath (major)");
//at lest for now, Load Data w/Overwrite is not allowed in a txn: HIVE-18154
@@ -444,8 +442,8 @@ public class TestTxnLoadData extends TxnCommandsBaseForTests {
String testQuery = isVectorized ? "select ROW__ID, a, b from T order by ROW__ID" :
"select ROW__ID, a, b, INPUT__FILE__NAME from T order by ROW__ID";
String[][] expected = new String[][] {
- {"{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000019_0000019_0000/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000019_0000019_0000/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000001_0000001_0000/bucket_00000"}
};
checkResult(expected, testQuery, isVectorized, "load data inpath");
}
[07/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnToWriteId.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnToWriteId.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnToWriteId.java
new file mode 100644
index 0000000..4d5f435
--- /dev/null
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnToWriteId.java
@@ -0,0 +1,482 @@
+/**
+ * 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 TxnToWriteId implements org.apache.thrift.TBase<TxnToWriteId, TxnToWriteId._Fields>, java.io.Serializable, Cloneable, Comparable<TxnToWriteId> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TxnToWriteId");
+
+ private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)1);
+ private static final org.apache.thrift.protocol.TField WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("writeId", org.apache.thrift.protocol.TType.I64, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TxnToWriteIdStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TxnToWriteIdTupleSchemeFactory());
+ }
+
+ private long txnId; // required
+ private long writeId; // 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 {
+ TXN_ID((short)1, "txnId"),
+ WRITE_ID((short)2, "writeId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TXN_ID
+ return TXN_ID;
+ case 2: // WRITE_ID
+ return WRITE_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
+ private static final int __TXNID_ISSET_ID = 0;
+ private static final int __WRITEID_ISSET_ID = 1;
+ 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.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.WRITE_ID, new org.apache.thrift.meta_data.FieldMetaData("writeId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TxnToWriteId.class, metaDataMap);
+ }
+
+ public TxnToWriteId() {
+ }
+
+ public TxnToWriteId(
+ long txnId,
+ long writeId)
+ {
+ this();
+ this.txnId = txnId;
+ setTxnIdIsSet(true);
+ this.writeId = writeId;
+ setWriteIdIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TxnToWriteId(TxnToWriteId other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.txnId = other.txnId;
+ this.writeId = other.writeId;
+ }
+
+ public TxnToWriteId deepCopy() {
+ return new TxnToWriteId(this);
+ }
+
+ @Override
+ public void clear() {
+ setTxnIdIsSet(false);
+ this.txnId = 0;
+ setWriteIdIsSet(false);
+ this.writeId = 0;
+ }
+
+ public long getTxnId() {
+ return this.txnId;
+ }
+
+ public void setTxnId(long txnId) {
+ this.txnId = txnId;
+ setTxnIdIsSet(true);
+ }
+
+ public void unsetTxnId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID);
+ }
+
+ /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
+ public boolean isSetTxnId() {
+ return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID);
+ }
+
+ public void setTxnIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
+ }
+
+ public long getWriteId() {
+ return this.writeId;
+ }
+
+ public void setWriteId(long writeId) {
+ this.writeId = writeId;
+ setWriteIdIsSet(true);
+ }
+
+ public void unsetWriteId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITEID_ISSET_ID);
+ }
+
+ /** Returns true if field writeId is set (has been assigned a value) and false otherwise */
+ public boolean isSetWriteId() {
+ return EncodingUtils.testBit(__isset_bitfield, __WRITEID_ISSET_ID);
+ }
+
+ public void setWriteIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITEID_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TXN_ID:
+ if (value == null) {
+ unsetTxnId();
+ } else {
+ setTxnId((Long)value);
+ }
+ break;
+
+ case WRITE_ID:
+ if (value == null) {
+ unsetWriteId();
+ } else {
+ setWriteId((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TXN_ID:
+ return getTxnId();
+
+ case WRITE_ID:
+ return getWriteId();
+
+ }
+ 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 TXN_ID:
+ return isSetTxnId();
+ case WRITE_ID:
+ return isSetWriteId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TxnToWriteId)
+ return this.equals((TxnToWriteId)that);
+ return false;
+ }
+
+ public boolean equals(TxnToWriteId that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_txnId = true;
+ boolean that_present_txnId = true;
+ if (this_present_txnId || that_present_txnId) {
+ if (!(this_present_txnId && that_present_txnId))
+ return false;
+ if (this.txnId != that.txnId)
+ return false;
+ }
+
+ boolean this_present_writeId = true;
+ boolean that_present_writeId = true;
+ if (this_present_writeId || that_present_writeId) {
+ if (!(this_present_writeId && that_present_writeId))
+ return false;
+ if (this.writeId != that.writeId)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_txnId = true;
+ list.add(present_txnId);
+ if (present_txnId)
+ list.add(txnId);
+
+ boolean present_writeId = true;
+ list.add(present_writeId);
+ if (present_writeId)
+ list.add(writeId);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(TxnToWriteId other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(other.isSetTxnId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTxnId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, other.txnId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWriteId()).compareTo(other.isSetWriteId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWriteId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeId, other.writeId);
+ 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("TxnToWriteId(");
+ boolean first = true;
+
+ sb.append("txnId:");
+ sb.append(this.txnId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("writeId:");
+ sb.append(this.writeId);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTxnId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetWriteId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'writeId' 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 TxnToWriteIdStandardSchemeFactory implements SchemeFactory {
+ public TxnToWriteIdStandardScheme getScheme() {
+ return new TxnToWriteIdStandardScheme();
+ }
+ }
+
+ private static class TxnToWriteIdStandardScheme extends StandardScheme<TxnToWriteId> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TxnToWriteId 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: // TXN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.txnId = iprot.readI64();
+ struct.setTxnIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // WRITE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.writeId = iprot.readI64();
+ struct.setWriteIdIsSet(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, TxnToWriteId struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
+ oprot.writeI64(struct.txnId);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(WRITE_ID_FIELD_DESC);
+ oprot.writeI64(struct.writeId);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TxnToWriteIdTupleSchemeFactory implements SchemeFactory {
+ public TxnToWriteIdTupleScheme getScheme() {
+ return new TxnToWriteIdTupleScheme();
+ }
+ }
+
+ private static class TxnToWriteIdTupleScheme extends TupleScheme<TxnToWriteId> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TxnToWriteId struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI64(struct.txnId);
+ oprot.writeI64(struct.writeId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TxnToWriteId struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.txnId = iprot.readI64();
+ struct.setTxnIdIsSet(true);
+ struct.writeId = iprot.readI64();
+ struct.setWriteIdIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java
index 01654c7..9c05a18 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java
@@ -755,14 +755,14 @@ import org.slf4j.LoggerFactory;
case 2: // POOLS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list754 = iprot.readListBegin();
- struct.pools = new ArrayList<WMPool>(_list754.size);
- WMPool _elem755;
- for (int _i756 = 0; _i756 < _list754.size; ++_i756)
+ org.apache.thrift.protocol.TList _list794 = iprot.readListBegin();
+ struct.pools = new ArrayList<WMPool>(_list794.size);
+ WMPool _elem795;
+ for (int _i796 = 0; _i796 < _list794.size; ++_i796)
{
- _elem755 = new WMPool();
- _elem755.read(iprot);
- struct.pools.add(_elem755);
+ _elem795 = new WMPool();
+ _elem795.read(iprot);
+ struct.pools.add(_elem795);
}
iprot.readListEnd();
}
@@ -774,14 +774,14 @@ import org.slf4j.LoggerFactory;
case 3: // MAPPINGS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list757 = iprot.readListBegin();
- struct.mappings = new ArrayList<WMMapping>(_list757.size);
- WMMapping _elem758;
- for (int _i759 = 0; _i759 < _list757.size; ++_i759)
+ org.apache.thrift.protocol.TList _list797 = iprot.readListBegin();
+ struct.mappings = new ArrayList<WMMapping>(_list797.size);
+ WMMapping _elem798;
+ for (int _i799 = 0; _i799 < _list797.size; ++_i799)
{
- _elem758 = new WMMapping();
- _elem758.read(iprot);
- struct.mappings.add(_elem758);
+ _elem798 = new WMMapping();
+ _elem798.read(iprot);
+ struct.mappings.add(_elem798);
}
iprot.readListEnd();
}
@@ -793,14 +793,14 @@ import org.slf4j.LoggerFactory;
case 4: // TRIGGERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list760 = iprot.readListBegin();
- struct.triggers = new ArrayList<WMTrigger>(_list760.size);
- WMTrigger _elem761;
- for (int _i762 = 0; _i762 < _list760.size; ++_i762)
+ org.apache.thrift.protocol.TList _list800 = iprot.readListBegin();
+ struct.triggers = new ArrayList<WMTrigger>(_list800.size);
+ WMTrigger _elem801;
+ for (int _i802 = 0; _i802 < _list800.size; ++_i802)
{
- _elem761 = new WMTrigger();
- _elem761.read(iprot);
- struct.triggers.add(_elem761);
+ _elem801 = new WMTrigger();
+ _elem801.read(iprot);
+ struct.triggers.add(_elem801);
}
iprot.readListEnd();
}
@@ -812,14 +812,14 @@ import org.slf4j.LoggerFactory;
case 5: // POOL_TRIGGERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list763 = iprot.readListBegin();
- struct.poolTriggers = new ArrayList<WMPoolTrigger>(_list763.size);
- WMPoolTrigger _elem764;
- for (int _i765 = 0; _i765 < _list763.size; ++_i765)
+ org.apache.thrift.protocol.TList _list803 = iprot.readListBegin();
+ struct.poolTriggers = new ArrayList<WMPoolTrigger>(_list803.size);
+ WMPoolTrigger _elem804;
+ for (int _i805 = 0; _i805 < _list803.size; ++_i805)
{
- _elem764 = new WMPoolTrigger();
- _elem764.read(iprot);
- struct.poolTriggers.add(_elem764);
+ _elem804 = new WMPoolTrigger();
+ _elem804.read(iprot);
+ struct.poolTriggers.add(_elem804);
}
iprot.readListEnd();
}
@@ -850,9 +850,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(POOLS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.pools.size()));
- for (WMPool _iter766 : struct.pools)
+ for (WMPool _iter806 : struct.pools)
{
- _iter766.write(oprot);
+ _iter806.write(oprot);
}
oprot.writeListEnd();
}
@@ -863,9 +863,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(MAPPINGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mappings.size()));
- for (WMMapping _iter767 : struct.mappings)
+ for (WMMapping _iter807 : struct.mappings)
{
- _iter767.write(oprot);
+ _iter807.write(oprot);
}
oprot.writeListEnd();
}
@@ -877,9 +877,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TRIGGERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.triggers.size()));
- for (WMTrigger _iter768 : struct.triggers)
+ for (WMTrigger _iter808 : struct.triggers)
{
- _iter768.write(oprot);
+ _iter808.write(oprot);
}
oprot.writeListEnd();
}
@@ -891,9 +891,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(POOL_TRIGGERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.poolTriggers.size()));
- for (WMPoolTrigger _iter769 : struct.poolTriggers)
+ for (WMPoolTrigger _iter809 : struct.poolTriggers)
{
- _iter769.write(oprot);
+ _iter809.write(oprot);
}
oprot.writeListEnd();
}
@@ -920,9 +920,9 @@ import org.slf4j.LoggerFactory;
struct.plan.write(oprot);
{
oprot.writeI32(struct.pools.size());
- for (WMPool _iter770 : struct.pools)
+ for (WMPool _iter810 : struct.pools)
{
- _iter770.write(oprot);
+ _iter810.write(oprot);
}
}
BitSet optionals = new BitSet();
@@ -939,27 +939,27 @@ import org.slf4j.LoggerFactory;
if (struct.isSetMappings()) {
{
oprot.writeI32(struct.mappings.size());
- for (WMMapping _iter771 : struct.mappings)
+ for (WMMapping _iter811 : struct.mappings)
{
- _iter771.write(oprot);
+ _iter811.write(oprot);
}
}
}
if (struct.isSetTriggers()) {
{
oprot.writeI32(struct.triggers.size());
- for (WMTrigger _iter772 : struct.triggers)
+ for (WMTrigger _iter812 : struct.triggers)
{
- _iter772.write(oprot);
+ _iter812.write(oprot);
}
}
}
if (struct.isSetPoolTriggers()) {
{
oprot.writeI32(struct.poolTriggers.size());
- for (WMPoolTrigger _iter773 : struct.poolTriggers)
+ for (WMPoolTrigger _iter813 : struct.poolTriggers)
{
- _iter773.write(oprot);
+ _iter813.write(oprot);
}
}
}
@@ -972,56 +972,56 @@ import org.slf4j.LoggerFactory;
struct.plan.read(iprot);
struct.setPlanIsSet(true);
{
- org.apache.thrift.protocol.TList _list774 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.pools = new ArrayList<WMPool>(_list774.size);
- WMPool _elem775;
- for (int _i776 = 0; _i776 < _list774.size; ++_i776)
+ org.apache.thrift.protocol.TList _list814 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.pools = new ArrayList<WMPool>(_list814.size);
+ WMPool _elem815;
+ for (int _i816 = 0; _i816 < _list814.size; ++_i816)
{
- _elem775 = new WMPool();
- _elem775.read(iprot);
- struct.pools.add(_elem775);
+ _elem815 = new WMPool();
+ _elem815.read(iprot);
+ struct.pools.add(_elem815);
}
}
struct.setPoolsIsSet(true);
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list777 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.mappings = new ArrayList<WMMapping>(_list777.size);
- WMMapping _elem778;
- for (int _i779 = 0; _i779 < _list777.size; ++_i779)
+ org.apache.thrift.protocol.TList _list817 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.mappings = new ArrayList<WMMapping>(_list817.size);
+ WMMapping _elem818;
+ for (int _i819 = 0; _i819 < _list817.size; ++_i819)
{
- _elem778 = new WMMapping();
- _elem778.read(iprot);
- struct.mappings.add(_elem778);
+ _elem818 = new WMMapping();
+ _elem818.read(iprot);
+ struct.mappings.add(_elem818);
}
}
struct.setMappingsIsSet(true);
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list780 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.triggers = new ArrayList<WMTrigger>(_list780.size);
- WMTrigger _elem781;
- for (int _i782 = 0; _i782 < _list780.size; ++_i782)
+ org.apache.thrift.protocol.TList _list820 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.triggers = new ArrayList<WMTrigger>(_list820.size);
+ WMTrigger _elem821;
+ for (int _i822 = 0; _i822 < _list820.size; ++_i822)
{
- _elem781 = new WMTrigger();
- _elem781.read(iprot);
- struct.triggers.add(_elem781);
+ _elem821 = new WMTrigger();
+ _elem821.read(iprot);
+ struct.triggers.add(_elem821);
}
}
struct.setTriggersIsSet(true);
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list783 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.poolTriggers = new ArrayList<WMPoolTrigger>(_list783.size);
- WMPoolTrigger _elem784;
- for (int _i785 = 0; _i785 < _list783.size; ++_i785)
+ org.apache.thrift.protocol.TList _list823 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.poolTriggers = new ArrayList<WMPoolTrigger>(_list823.size);
+ WMPoolTrigger _elem824;
+ for (int _i825 = 0; _i825 < _list823.size; ++_i825)
{
- _elem784 = new WMPoolTrigger();
- _elem784.read(iprot);
- struct.poolTriggers.add(_elem784);
+ _elem824 = new WMPoolTrigger();
+ _elem824.read(iprot);
+ struct.poolTriggers.add(_elem824);
}
}
struct.setPoolTriggersIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java
index 69ccf53..ba44e3a 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java
@@ -346,14 +346,14 @@ import org.slf4j.LoggerFactory;
case 1: // RESOURCE_PLANS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list786 = iprot.readListBegin();
- struct.resourcePlans = new ArrayList<WMResourcePlan>(_list786.size);
- WMResourcePlan _elem787;
- for (int _i788 = 0; _i788 < _list786.size; ++_i788)
+ org.apache.thrift.protocol.TList _list826 = iprot.readListBegin();
+ struct.resourcePlans = new ArrayList<WMResourcePlan>(_list826.size);
+ WMResourcePlan _elem827;
+ for (int _i828 = 0; _i828 < _list826.size; ++_i828)
{
- _elem787 = new WMResourcePlan();
- _elem787.read(iprot);
- struct.resourcePlans.add(_elem787);
+ _elem827 = new WMResourcePlan();
+ _elem827.read(iprot);
+ struct.resourcePlans.add(_elem827);
}
iprot.readListEnd();
}
@@ -380,9 +380,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(RESOURCE_PLANS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.resourcePlans.size()));
- for (WMResourcePlan _iter789 : struct.resourcePlans)
+ for (WMResourcePlan _iter829 : struct.resourcePlans)
{
- _iter789.write(oprot);
+ _iter829.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetResourcePlans()) {
{
oprot.writeI32(struct.resourcePlans.size());
- for (WMResourcePlan _iter790 : struct.resourcePlans)
+ for (WMResourcePlan _iter830 : struct.resourcePlans)
{
- _iter790.write(oprot);
+ _iter830.write(oprot);
}
}
}
@@ -428,14 +428,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list791 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.resourcePlans = new ArrayList<WMResourcePlan>(_list791.size);
- WMResourcePlan _elem792;
- for (int _i793 = 0; _i793 < _list791.size; ++_i793)
+ org.apache.thrift.protocol.TList _list831 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.resourcePlans = new ArrayList<WMResourcePlan>(_list831.size);
+ WMResourcePlan _elem832;
+ for (int _i833 = 0; _i833 < _list831.size; ++_i833)
{
- _elem792 = new WMResourcePlan();
- _elem792.read(iprot);
- struct.resourcePlans.add(_elem792);
+ _elem832 = new WMResourcePlan();
+ _elem832.read(iprot);
+ struct.resourcePlans.add(_elem832);
}
}
struct.setResourcePlansIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java
index ee30063..edec382 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java
@@ -346,14 +346,14 @@ import org.slf4j.LoggerFactory;
case 1: // TRIGGERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list810 = iprot.readListBegin();
- struct.triggers = new ArrayList<WMTrigger>(_list810.size);
- WMTrigger _elem811;
- for (int _i812 = 0; _i812 < _list810.size; ++_i812)
+ org.apache.thrift.protocol.TList _list850 = iprot.readListBegin();
+ struct.triggers = new ArrayList<WMTrigger>(_list850.size);
+ WMTrigger _elem851;
+ for (int _i852 = 0; _i852 < _list850.size; ++_i852)
{
- _elem811 = new WMTrigger();
- _elem811.read(iprot);
- struct.triggers.add(_elem811);
+ _elem851 = new WMTrigger();
+ _elem851.read(iprot);
+ struct.triggers.add(_elem851);
}
iprot.readListEnd();
}
@@ -380,9 +380,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TRIGGERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.triggers.size()));
- for (WMTrigger _iter813 : struct.triggers)
+ for (WMTrigger _iter853 : struct.triggers)
{
- _iter813.write(oprot);
+ _iter853.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetTriggers()) {
{
oprot.writeI32(struct.triggers.size());
- for (WMTrigger _iter814 : struct.triggers)
+ for (WMTrigger _iter854 : struct.triggers)
{
- _iter814.write(oprot);
+ _iter854.write(oprot);
}
}
}
@@ -428,14 +428,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list815 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.triggers = new ArrayList<WMTrigger>(_list815.size);
- WMTrigger _elem816;
- for (int _i817 = 0; _i817 < _list815.size; ++_i817)
+ org.apache.thrift.protocol.TList _list855 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.triggers = new ArrayList<WMTrigger>(_list855.size);
+ WMTrigger _elem856;
+ for (int _i857 = 0; _i857 < _list855.size; ++_i857)
{
- _elem816 = new WMTrigger();
- _elem816.read(iprot);
- struct.triggers.add(_elem816);
+ _elem856 = new WMTrigger();
+ _elem856.read(iprot);
+ struct.triggers.add(_elem856);
}
}
struct.setTriggersIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java
index 5caf586..228f37f 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java
@@ -441,13 +441,13 @@ import org.slf4j.LoggerFactory;
case 1: // ERRORS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list794 = iprot.readListBegin();
- struct.errors = new ArrayList<String>(_list794.size);
- String _elem795;
- for (int _i796 = 0; _i796 < _list794.size; ++_i796)
+ org.apache.thrift.protocol.TList _list834 = iprot.readListBegin();
+ struct.errors = new ArrayList<String>(_list834.size);
+ String _elem835;
+ for (int _i836 = 0; _i836 < _list834.size; ++_i836)
{
- _elem795 = iprot.readString();
- struct.errors.add(_elem795);
+ _elem835 = iprot.readString();
+ struct.errors.add(_elem835);
}
iprot.readListEnd();
}
@@ -459,13 +459,13 @@ import org.slf4j.LoggerFactory;
case 2: // WARNINGS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list797 = iprot.readListBegin();
- struct.warnings = new ArrayList<String>(_list797.size);
- String _elem798;
- for (int _i799 = 0; _i799 < _list797.size; ++_i799)
+ org.apache.thrift.protocol.TList _list837 = iprot.readListBegin();
+ struct.warnings = new ArrayList<String>(_list837.size);
+ String _elem838;
+ for (int _i839 = 0; _i839 < _list837.size; ++_i839)
{
- _elem798 = iprot.readString();
- struct.warnings.add(_elem798);
+ _elem838 = iprot.readString();
+ struct.warnings.add(_elem838);
}
iprot.readListEnd();
}
@@ -492,9 +492,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(ERRORS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.errors.size()));
- for (String _iter800 : struct.errors)
+ for (String _iter840 : struct.errors)
{
- oprot.writeString(_iter800);
+ oprot.writeString(_iter840);
}
oprot.writeListEnd();
}
@@ -506,9 +506,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(WARNINGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.warnings.size()));
- for (String _iter801 : struct.warnings)
+ for (String _iter841 : struct.warnings)
{
- oprot.writeString(_iter801);
+ oprot.writeString(_iter841);
}
oprot.writeListEnd();
}
@@ -543,18 +543,18 @@ import org.slf4j.LoggerFactory;
if (struct.isSetErrors()) {
{
oprot.writeI32(struct.errors.size());
- for (String _iter802 : struct.errors)
+ for (String _iter842 : struct.errors)
{
- oprot.writeString(_iter802);
+ oprot.writeString(_iter842);
}
}
}
if (struct.isSetWarnings()) {
{
oprot.writeI32(struct.warnings.size());
- for (String _iter803 : struct.warnings)
+ for (String _iter843 : struct.warnings)
{
- oprot.writeString(_iter803);
+ oprot.writeString(_iter843);
}
}
}
@@ -566,26 +566,26 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list804 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.errors = new ArrayList<String>(_list804.size);
- String _elem805;
- for (int _i806 = 0; _i806 < _list804.size; ++_i806)
+ org.apache.thrift.protocol.TList _list844 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.errors = new ArrayList<String>(_list844.size);
+ String _elem845;
+ for (int _i846 = 0; _i846 < _list844.size; ++_i846)
{
- _elem805 = iprot.readString();
- struct.errors.add(_elem805);
+ _elem845 = iprot.readString();
+ struct.errors.add(_elem845);
}
}
struct.setErrorsIsSet(true);
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list807 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.warnings = new ArrayList<String>(_list807.size);
- String _elem808;
- for (int _i809 = 0; _i809 < _list807.size; ++_i809)
+ org.apache.thrift.protocol.TList _list847 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.warnings = new ArrayList<String>(_list847.size);
+ String _elem848;
+ for (int _i849 = 0; _i849 < _list847.size; ++_i849)
{
- _elem808 = iprot.readString();
- struct.warnings.add(_elem808);
+ _elem848 = iprot.readString();
+ struct.warnings.add(_elem848);
}
}
struct.setWarningsIsSet(true);
[10/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
index 5a371c4..62b0768 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
@@ -619,13 +619,13 @@ import org.slf4j.LoggerFactory;
case 1: // FILE_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list664 = iprot.readListBegin();
- struct.fileIds = new ArrayList<Long>(_list664.size);
- long _elem665;
- for (int _i666 = 0; _i666 < _list664.size; ++_i666)
+ org.apache.thrift.protocol.TList _list704 = iprot.readListBegin();
+ struct.fileIds = new ArrayList<Long>(_list704.size);
+ long _elem705;
+ for (int _i706 = 0; _i706 < _list704.size; ++_i706)
{
- _elem665 = iprot.readI64();
- struct.fileIds.add(_elem665);
+ _elem705 = iprot.readI64();
+ struct.fileIds.add(_elem705);
}
iprot.readListEnd();
}
@@ -675,9 +675,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
- for (long _iter667 : struct.fileIds)
+ for (long _iter707 : struct.fileIds)
{
- oprot.writeI64(_iter667);
+ oprot.writeI64(_iter707);
}
oprot.writeListEnd();
}
@@ -719,9 +719,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.fileIds.size());
- for (long _iter668 : struct.fileIds)
+ for (long _iter708 : struct.fileIds)
{
- oprot.writeI64(_iter668);
+ oprot.writeI64(_iter708);
}
}
oprot.writeBinary(struct.expr);
@@ -745,13 +745,13 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list669 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.fileIds = new ArrayList<Long>(_list669.size);
- long _elem670;
- for (int _i671 = 0; _i671 < _list669.size; ++_i671)
+ org.apache.thrift.protocol.TList _list709 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.fileIds = new ArrayList<Long>(_list709.size);
+ long _elem710;
+ for (int _i711 = 0; _i711 < _list709.size; ++_i711)
{
- _elem670 = iprot.readI64();
- struct.fileIds.add(_elem670);
+ _elem710 = iprot.readI64();
+ struct.fileIds.add(_elem710);
}
}
struct.setFileIdsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java
index 6eb6eee..881803f 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java
@@ -444,16 +444,16 @@ import org.slf4j.LoggerFactory;
case 1: // METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map654 = iprot.readMapBegin();
- struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map654.size);
- long _key655;
- MetadataPpdResult _val656;
- for (int _i657 = 0; _i657 < _map654.size; ++_i657)
+ org.apache.thrift.protocol.TMap _map694 = iprot.readMapBegin();
+ struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map694.size);
+ long _key695;
+ MetadataPpdResult _val696;
+ for (int _i697 = 0; _i697 < _map694.size; ++_i697)
{
- _key655 = iprot.readI64();
- _val656 = new MetadataPpdResult();
- _val656.read(iprot);
- struct.metadata.put(_key655, _val656);
+ _key695 = iprot.readI64();
+ _val696 = new MetadataPpdResult();
+ _val696.read(iprot);
+ struct.metadata.put(_key695, _val696);
}
iprot.readMapEnd();
}
@@ -487,10 +487,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(METADATA_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, struct.metadata.size()));
- for (Map.Entry<Long, MetadataPpdResult> _iter658 : struct.metadata.entrySet())
+ for (Map.Entry<Long, MetadataPpdResult> _iter698 : struct.metadata.entrySet())
{
- oprot.writeI64(_iter658.getKey());
- _iter658.getValue().write(oprot);
+ oprot.writeI64(_iter698.getKey());
+ _iter698.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -518,10 +518,10 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.metadata.size());
- for (Map.Entry<Long, MetadataPpdResult> _iter659 : struct.metadata.entrySet())
+ for (Map.Entry<Long, MetadataPpdResult> _iter699 : struct.metadata.entrySet())
{
- oprot.writeI64(_iter659.getKey());
- _iter659.getValue().write(oprot);
+ oprot.writeI64(_iter699.getKey());
+ _iter699.getValue().write(oprot);
}
}
oprot.writeBool(struct.isSupported);
@@ -531,16 +531,16 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TMap _map660 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map660.size);
- long _key661;
- MetadataPpdResult _val662;
- for (int _i663 = 0; _i663 < _map660.size; ++_i663)
+ org.apache.thrift.protocol.TMap _map700 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map700.size);
+ long _key701;
+ MetadataPpdResult _val702;
+ for (int _i703 = 0; _i703 < _map700.size; ++_i703)
{
- _key661 = iprot.readI64();
- _val662 = new MetadataPpdResult();
- _val662.read(iprot);
- struct.metadata.put(_key661, _val662);
+ _key701 = iprot.readI64();
+ _val702 = new MetadataPpdResult();
+ _val702.read(iprot);
+ struct.metadata.put(_key701, _val702);
}
}
struct.setMetadataIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java
index 0404358..a051fb0 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java
@@ -351,13 +351,13 @@ import org.slf4j.LoggerFactory;
case 1: // FILE_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list682 = iprot.readListBegin();
- struct.fileIds = new ArrayList<Long>(_list682.size);
- long _elem683;
- for (int _i684 = 0; _i684 < _list682.size; ++_i684)
+ org.apache.thrift.protocol.TList _list722 = iprot.readListBegin();
+ struct.fileIds = new ArrayList<Long>(_list722.size);
+ long _elem723;
+ for (int _i724 = 0; _i724 < _list722.size; ++_i724)
{
- _elem683 = iprot.readI64();
- struct.fileIds.add(_elem683);
+ _elem723 = iprot.readI64();
+ struct.fileIds.add(_elem723);
}
iprot.readListEnd();
}
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
- for (long _iter685 : struct.fileIds)
+ for (long _iter725 : struct.fileIds)
{
- oprot.writeI64(_iter685);
+ oprot.writeI64(_iter725);
}
oprot.writeListEnd();
}
@@ -410,9 +410,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.fileIds.size());
- for (long _iter686 : struct.fileIds)
+ for (long _iter726 : struct.fileIds)
{
- oprot.writeI64(_iter686);
+ oprot.writeI64(_iter726);
}
}
}
@@ -421,13 +421,13 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list687 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.fileIds = new ArrayList<Long>(_list687.size);
- long _elem688;
- for (int _i689 = 0; _i689 < _list687.size; ++_i689)
+ org.apache.thrift.protocol.TList _list727 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.fileIds = new ArrayList<Long>(_list727.size);
+ long _elem728;
+ for (int _i729 = 0; _i729 < _list727.size; ++_i729)
{
- _elem688 = iprot.readI64();
- struct.fileIds.add(_elem688);
+ _elem728 = iprot.readI64();
+ struct.fileIds.add(_elem728);
}
}
struct.setFileIdsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java
index 3858890..74ca66a 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java
@@ -433,15 +433,15 @@ import org.slf4j.LoggerFactory;
case 1: // METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map672 = iprot.readMapBegin();
- struct.metadata = new HashMap<Long,ByteBuffer>(2*_map672.size);
- long _key673;
- ByteBuffer _val674;
- for (int _i675 = 0; _i675 < _map672.size; ++_i675)
+ org.apache.thrift.protocol.TMap _map712 = iprot.readMapBegin();
+ struct.metadata = new HashMap<Long,ByteBuffer>(2*_map712.size);
+ long _key713;
+ ByteBuffer _val714;
+ for (int _i715 = 0; _i715 < _map712.size; ++_i715)
{
- _key673 = iprot.readI64();
- _val674 = iprot.readBinary();
- struct.metadata.put(_key673, _val674);
+ _key713 = iprot.readI64();
+ _val714 = iprot.readBinary();
+ struct.metadata.put(_key713, _val714);
}
iprot.readMapEnd();
}
@@ -475,10 +475,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(METADATA_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
- for (Map.Entry<Long, ByteBuffer> _iter676 : struct.metadata.entrySet())
+ for (Map.Entry<Long, ByteBuffer> _iter716 : struct.metadata.entrySet())
{
- oprot.writeI64(_iter676.getKey());
- oprot.writeBinary(_iter676.getValue());
+ oprot.writeI64(_iter716.getKey());
+ oprot.writeBinary(_iter716.getValue());
}
oprot.writeMapEnd();
}
@@ -506,10 +506,10 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.metadata.size());
- for (Map.Entry<Long, ByteBuffer> _iter677 : struct.metadata.entrySet())
+ for (Map.Entry<Long, ByteBuffer> _iter717 : struct.metadata.entrySet())
{
- oprot.writeI64(_iter677.getKey());
- oprot.writeBinary(_iter677.getValue());
+ oprot.writeI64(_iter717.getKey());
+ oprot.writeBinary(_iter717.getValue());
}
}
oprot.writeBool(struct.isSupported);
@@ -519,15 +519,15 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataResult struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TMap _map678 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.metadata = new HashMap<Long,ByteBuffer>(2*_map678.size);
- long _key679;
- ByteBuffer _val680;
- for (int _i681 = 0; _i681 < _map678.size; ++_i681)
+ org.apache.thrift.protocol.TMap _map718 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.metadata = new HashMap<Long,ByteBuffer>(2*_map718.size);
+ long _key719;
+ ByteBuffer _val720;
+ for (int _i721 = 0; _i721 < _map718.size; ++_i721)
{
- _key679 = iprot.readI64();
- _val680 = iprot.readBinary();
- struct.metadata.put(_key679, _val680);
+ _key719 = iprot.readI64();
+ _val720 = iprot.readBinary();
+ struct.metadata.put(_key719, _val720);
}
}
struct.setMetadataIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java
index 680ce86..84af22f 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java
@@ -525,13 +525,13 @@ import org.slf4j.LoggerFactory;
case 2: // TBL_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list730 = iprot.readListBegin();
- struct.tblNames = new ArrayList<String>(_list730.size);
- String _elem731;
- for (int _i732 = 0; _i732 < _list730.size; ++_i732)
+ org.apache.thrift.protocol.TList _list770 = iprot.readListBegin();
+ struct.tblNames = new ArrayList<String>(_list770.size);
+ String _elem771;
+ for (int _i772 = 0; _i772 < _list770.size; ++_i772)
{
- _elem731 = iprot.readString();
- struct.tblNames.add(_elem731);
+ _elem771 = iprot.readString();
+ struct.tblNames.add(_elem771);
}
iprot.readListEnd();
}
@@ -572,9 +572,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tblNames.size()));
- for (String _iter733 : struct.tblNames)
+ for (String _iter773 : struct.tblNames)
{
- oprot.writeString(_iter733);
+ oprot.writeString(_iter773);
}
oprot.writeListEnd();
}
@@ -617,9 +617,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetTblNames()) {
{
oprot.writeI32(struct.tblNames.size());
- for (String _iter734 : struct.tblNames)
+ for (String _iter774 : struct.tblNames)
{
- oprot.writeString(_iter734);
+ oprot.writeString(_iter774);
}
}
}
@@ -636,13 +636,13 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list735 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tblNames = new ArrayList<String>(_list735.size);
- String _elem736;
- for (int _i737 = 0; _i737 < _list735.size; ++_i737)
+ org.apache.thrift.protocol.TList _list775 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.tblNames = new ArrayList<String>(_list775.size);
+ String _elem776;
+ for (int _i777 = 0; _i777 < _list775.size; ++_i777)
{
- _elem736 = iprot.readString();
- struct.tblNames.add(_elem736);
+ _elem776 = iprot.readString();
+ struct.tblNames.add(_elem776);
}
}
struct.setTblNamesIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java
index ccd85c4..4aba1d2 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
case 1: // TABLES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list738 = iprot.readListBegin();
- struct.tables = new ArrayList<Table>(_list738.size);
- Table _elem739;
- for (int _i740 = 0; _i740 < _list738.size; ++_i740)
+ org.apache.thrift.protocol.TList _list778 = iprot.readListBegin();
+ struct.tables = new ArrayList<Table>(_list778.size);
+ Table _elem779;
+ for (int _i780 = 0; _i780 < _list778.size; ++_i780)
{
- _elem739 = new Table();
- _elem739.read(iprot);
- struct.tables.add(_elem739);
+ _elem779 = new Table();
+ _elem779.read(iprot);
+ struct.tables.add(_elem779);
}
iprot.readListEnd();
}
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TABLES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tables.size()));
- for (Table _iter741 : struct.tables)
+ for (Table _iter781 : struct.tables)
{
- _iter741.write(oprot);
+ _iter781.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.tables.size());
- for (Table _iter742 : struct.tables)
+ for (Table _iter782 : struct.tables)
{
- _iter742.write(oprot);
+ _iter782.write(oprot);
}
}
}
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, GetTablesResult struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list743 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.tables = new ArrayList<Table>(_list743.size);
- Table _elem744;
- for (int _i745 = 0; _i745 < _list743.size; ++_i745)
+ org.apache.thrift.protocol.TList _list783 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.tables = new ArrayList<Table>(_list783.size);
+ Table _elem784;
+ for (int _i785 = 0; _i785 < _list783.size; ++_i785)
{
- _elem744 = new Table();
- _elem744.read(iprot);
- struct.tables.add(_elem744);
+ _elem784 = new Table();
+ _elem784.read(iprot);
+ struct.tables.add(_elem784);
}
}
struct.setTablesIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java
new file mode 100644
index 0000000..ec738b0
--- /dev/null
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java
@@ -0,0 +1,539 @@
+/**
+ * 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 GetValidWriteIdsRequest implements org.apache.thrift.TBase<GetValidWriteIdsRequest, GetValidWriteIdsRequest._Fields>, java.io.Serializable, Cloneable, Comparable<GetValidWriteIdsRequest> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetValidWriteIdsRequest");
+
+ private static final org.apache.thrift.protocol.TField FULL_TABLE_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("fullTableNames", org.apache.thrift.protocol.TType.LIST, (short)1);
+ private static final org.apache.thrift.protocol.TField VALID_TXN_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validTxnList", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GetValidWriteIdsRequestStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GetValidWriteIdsRequestTupleSchemeFactory());
+ }
+
+ private List<String> fullTableNames; // required
+ private String validTxnList; // 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 {
+ FULL_TABLE_NAMES((short)1, "fullTableNames"),
+ VALID_TXN_LIST((short)2, "validTxnList");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // FULL_TABLE_NAMES
+ return FULL_TABLE_NAMES;
+ case 2: // VALID_TXN_LIST
+ return VALID_TXN_LIST;
+ 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.FULL_TABLE_NAMES, new org.apache.thrift.meta_data.FieldMetaData("fullTableNames", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ 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))));
+ tmpMap.put(_Fields.VALID_TXN_LIST, new org.apache.thrift.meta_data.FieldMetaData("validTxnList", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetValidWriteIdsRequest.class, metaDataMap);
+ }
+
+ public GetValidWriteIdsRequest() {
+ }
+
+ public GetValidWriteIdsRequest(
+ List<String> fullTableNames,
+ String validTxnList)
+ {
+ this();
+ this.fullTableNames = fullTableNames;
+ this.validTxnList = validTxnList;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GetValidWriteIdsRequest(GetValidWriteIdsRequest other) {
+ if (other.isSetFullTableNames()) {
+ List<String> __this__fullTableNames = new ArrayList<String>(other.fullTableNames);
+ this.fullTableNames = __this__fullTableNames;
+ }
+ if (other.isSetValidTxnList()) {
+ this.validTxnList = other.validTxnList;
+ }
+ }
+
+ public GetValidWriteIdsRequest deepCopy() {
+ return new GetValidWriteIdsRequest(this);
+ }
+
+ @Override
+ public void clear() {
+ this.fullTableNames = null;
+ this.validTxnList = null;
+ }
+
+ public int getFullTableNamesSize() {
+ return (this.fullTableNames == null) ? 0 : this.fullTableNames.size();
+ }
+
+ public java.util.Iterator<String> getFullTableNamesIterator() {
+ return (this.fullTableNames == null) ? null : this.fullTableNames.iterator();
+ }
+
+ public void addToFullTableNames(String elem) {
+ if (this.fullTableNames == null) {
+ this.fullTableNames = new ArrayList<String>();
+ }
+ this.fullTableNames.add(elem);
+ }
+
+ public List<String> getFullTableNames() {
+ return this.fullTableNames;
+ }
+
+ public void setFullTableNames(List<String> fullTableNames) {
+ this.fullTableNames = fullTableNames;
+ }
+
+ public void unsetFullTableNames() {
+ this.fullTableNames = null;
+ }
+
+ /** Returns true if field fullTableNames is set (has been assigned a value) and false otherwise */
+ public boolean isSetFullTableNames() {
+ return this.fullTableNames != null;
+ }
+
+ public void setFullTableNamesIsSet(boolean value) {
+ if (!value) {
+ this.fullTableNames = null;
+ }
+ }
+
+ public String getValidTxnList() {
+ return this.validTxnList;
+ }
+
+ public void setValidTxnList(String validTxnList) {
+ this.validTxnList = validTxnList;
+ }
+
+ public void unsetValidTxnList() {
+ this.validTxnList = null;
+ }
+
+ /** Returns true if field validTxnList is set (has been assigned a value) and false otherwise */
+ public boolean isSetValidTxnList() {
+ return this.validTxnList != null;
+ }
+
+ public void setValidTxnListIsSet(boolean value) {
+ if (!value) {
+ this.validTxnList = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case FULL_TABLE_NAMES:
+ if (value == null) {
+ unsetFullTableNames();
+ } else {
+ setFullTableNames((List<String>)value);
+ }
+ break;
+
+ case VALID_TXN_LIST:
+ if (value == null) {
+ unsetValidTxnList();
+ } else {
+ setValidTxnList((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case FULL_TABLE_NAMES:
+ return getFullTableNames();
+
+ case VALID_TXN_LIST:
+ return getValidTxnList();
+
+ }
+ 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 FULL_TABLE_NAMES:
+ return isSetFullTableNames();
+ case VALID_TXN_LIST:
+ return isSetValidTxnList();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GetValidWriteIdsRequest)
+ return this.equals((GetValidWriteIdsRequest)that);
+ return false;
+ }
+
+ public boolean equals(GetValidWriteIdsRequest that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_fullTableNames = true && this.isSetFullTableNames();
+ boolean that_present_fullTableNames = true && that.isSetFullTableNames();
+ if (this_present_fullTableNames || that_present_fullTableNames) {
+ if (!(this_present_fullTableNames && that_present_fullTableNames))
+ return false;
+ if (!this.fullTableNames.equals(that.fullTableNames))
+ return false;
+ }
+
+ boolean this_present_validTxnList = true && this.isSetValidTxnList();
+ boolean that_present_validTxnList = true && that.isSetValidTxnList();
+ if (this_present_validTxnList || that_present_validTxnList) {
+ if (!(this_present_validTxnList && that_present_validTxnList))
+ return false;
+ if (!this.validTxnList.equals(that.validTxnList))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_fullTableNames = true && (isSetFullTableNames());
+ list.add(present_fullTableNames);
+ if (present_fullTableNames)
+ list.add(fullTableNames);
+
+ boolean present_validTxnList = true && (isSetValidTxnList());
+ list.add(present_validTxnList);
+ if (present_validTxnList)
+ list.add(validTxnList);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GetValidWriteIdsRequest other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetFullTableNames()).compareTo(other.isSetFullTableNames());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFullTableNames()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullTableNames, other.fullTableNames);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetValidTxnList()).compareTo(other.isSetValidTxnList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValidTxnList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validTxnList, other.validTxnList);
+ 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("GetValidWriteIdsRequest(");
+ boolean first = true;
+
+ sb.append("fullTableNames:");
+ if (this.fullTableNames == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.fullTableNames);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("validTxnList:");
+ if (this.validTxnList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.validTxnList);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetFullTableNames()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'fullTableNames' is unset! Struct:" + toString());
+ }
+
+ if (!isSetValidTxnList()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'validTxnList' 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 {
+ 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 GetValidWriteIdsRequestStandardSchemeFactory implements SchemeFactory {
+ public GetValidWriteIdsRequestStandardScheme getScheme() {
+ return new GetValidWriteIdsRequestStandardScheme();
+ }
+ }
+
+ private static class GetValidWriteIdsRequestStandardScheme extends StandardScheme<GetValidWriteIdsRequest> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GetValidWriteIdsRequest 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: // FULL_TABLE_NAMES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list556 = iprot.readListBegin();
+ struct.fullTableNames = new ArrayList<String>(_list556.size);
+ String _elem557;
+ for (int _i558 = 0; _i558 < _list556.size; ++_i558)
+ {
+ _elem557 = iprot.readString();
+ struct.fullTableNames.add(_elem557);
+ }
+ iprot.readListEnd();
+ }
+ struct.setFullTableNamesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // VALID_TXN_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.validTxnList = iprot.readString();
+ struct.setValidTxnListIsSet(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, GetValidWriteIdsRequest struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.fullTableNames != null) {
+ oprot.writeFieldBegin(FULL_TABLE_NAMES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.fullTableNames.size()));
+ for (String _iter559 : struct.fullTableNames)
+ {
+ oprot.writeString(_iter559);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.validTxnList != null) {
+ oprot.writeFieldBegin(VALID_TXN_LIST_FIELD_DESC);
+ oprot.writeString(struct.validTxnList);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GetValidWriteIdsRequestTupleSchemeFactory implements SchemeFactory {
+ public GetValidWriteIdsRequestTupleScheme getScheme() {
+ return new GetValidWriteIdsRequestTupleScheme();
+ }
+ }
+
+ private static class GetValidWriteIdsRequestTupleScheme extends TupleScheme<GetValidWriteIdsRequest> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GetValidWriteIdsRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.fullTableNames.size());
+ for (String _iter560 : struct.fullTableNames)
+ {
+ oprot.writeString(_iter560);
+ }
+ }
+ oprot.writeString(struct.validTxnList);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GetValidWriteIdsRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TList _list561 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.fullTableNames = new ArrayList<String>(_list561.size);
+ String _elem562;
+ for (int _i563 = 0; _i563 < _list561.size; ++_i563)
+ {
+ _elem562 = iprot.readString();
+ struct.fullTableNames.add(_elem562);
+ }
+ }
+ struct.setFullTableNamesIsSet(true);
+ struct.validTxnList = iprot.readString();
+ struct.setValidTxnListIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java
new file mode 100644
index 0000000..50eba33
--- /dev/null
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java
@@ -0,0 +1,443 @@
+/**
+ * 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 GetValidWriteIdsResponse implements org.apache.thrift.TBase<GetValidWriteIdsResponse, GetValidWriteIdsResponse._Fields>, java.io.Serializable, Cloneable, Comparable<GetValidWriteIdsResponse> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetValidWriteIdsResponse");
+
+ private static final org.apache.thrift.protocol.TField TBL_VALID_WRITE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("tblValidWriteIds", org.apache.thrift.protocol.TType.LIST, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GetValidWriteIdsResponseStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GetValidWriteIdsResponseTupleSchemeFactory());
+ }
+
+ private List<TableValidWriteIds> tblValidWriteIds; // 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 {
+ TBL_VALID_WRITE_IDS((short)1, "tblValidWriteIds");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TBL_VALID_WRITE_IDS
+ return TBL_VALID_WRITE_IDS;
+ 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.TBL_VALID_WRITE_IDS, new org.apache.thrift.meta_data.FieldMetaData("tblValidWriteIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TableValidWriteIds.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetValidWriteIdsResponse.class, metaDataMap);
+ }
+
+ public GetValidWriteIdsResponse() {
+ }
+
+ public GetValidWriteIdsResponse(
+ List<TableValidWriteIds> tblValidWriteIds)
+ {
+ this();
+ this.tblValidWriteIds = tblValidWriteIds;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GetValidWriteIdsResponse(GetValidWriteIdsResponse other) {
+ if (other.isSetTblValidWriteIds()) {
+ List<TableValidWriteIds> __this__tblValidWriteIds = new ArrayList<TableValidWriteIds>(other.tblValidWriteIds.size());
+ for (TableValidWriteIds other_element : other.tblValidWriteIds) {
+ __this__tblValidWriteIds.add(new TableValidWriteIds(other_element));
+ }
+ this.tblValidWriteIds = __this__tblValidWriteIds;
+ }
+ }
+
+ public GetValidWriteIdsResponse deepCopy() {
+ return new GetValidWriteIdsResponse(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tblValidWriteIds = null;
+ }
+
+ public int getTblValidWriteIdsSize() {
+ return (this.tblValidWriteIds == null) ? 0 : this.tblValidWriteIds.size();
+ }
+
+ public java.util.Iterator<TableValidWriteIds> getTblValidWriteIdsIterator() {
+ return (this.tblValidWriteIds == null) ? null : this.tblValidWriteIds.iterator();
+ }
+
+ public void addToTblValidWriteIds(TableValidWriteIds elem) {
+ if (this.tblValidWriteIds == null) {
+ this.tblValidWriteIds = new ArrayList<TableValidWriteIds>();
+ }
+ this.tblValidWriteIds.add(elem);
+ }
+
+ public List<TableValidWriteIds> getTblValidWriteIds() {
+ return this.tblValidWriteIds;
+ }
+
+ public void setTblValidWriteIds(List<TableValidWriteIds> tblValidWriteIds) {
+ this.tblValidWriteIds = tblValidWriteIds;
+ }
+
+ public void unsetTblValidWriteIds() {
+ this.tblValidWriteIds = null;
+ }
+
+ /** Returns true if field tblValidWriteIds is set (has been assigned a value) and false otherwise */
+ public boolean isSetTblValidWriteIds() {
+ return this.tblValidWriteIds != null;
+ }
+
+ public void setTblValidWriteIdsIsSet(boolean value) {
+ if (!value) {
+ this.tblValidWriteIds = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TBL_VALID_WRITE_IDS:
+ if (value == null) {
+ unsetTblValidWriteIds();
+ } else {
+ setTblValidWriteIds((List<TableValidWriteIds>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TBL_VALID_WRITE_IDS:
+ return getTblValidWriteIds();
+
+ }
+ 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 TBL_VALID_WRITE_IDS:
+ return isSetTblValidWriteIds();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GetValidWriteIdsResponse)
+ return this.equals((GetValidWriteIdsResponse)that);
+ return false;
+ }
+
+ public boolean equals(GetValidWriteIdsResponse that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_tblValidWriteIds = true && this.isSetTblValidWriteIds();
+ boolean that_present_tblValidWriteIds = true && that.isSetTblValidWriteIds();
+ if (this_present_tblValidWriteIds || that_present_tblValidWriteIds) {
+ if (!(this_present_tblValidWriteIds && that_present_tblValidWriteIds))
+ return false;
+ if (!this.tblValidWriteIds.equals(that.tblValidWriteIds))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_tblValidWriteIds = true && (isSetTblValidWriteIds());
+ list.add(present_tblValidWriteIds);
+ if (present_tblValidWriteIds)
+ list.add(tblValidWriteIds);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GetValidWriteIdsResponse other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTblValidWriteIds()).compareTo(other.isSetTblValidWriteIds());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTblValidWriteIds()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblValidWriteIds, other.tblValidWriteIds);
+ 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("GetValidWriteIdsResponse(");
+ boolean first = true;
+
+ sb.append("tblValidWriteIds:");
+ if (this.tblValidWriteIds == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tblValidWriteIds);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTblValidWriteIds()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblValidWriteIds' 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 {
+ 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 GetValidWriteIdsResponseStandardSchemeFactory implements SchemeFactory {
+ public GetValidWriteIdsResponseStandardScheme getScheme() {
+ return new GetValidWriteIdsResponseStandardScheme();
+ }
+ }
+
+ private static class GetValidWriteIdsResponseStandardScheme extends StandardScheme<GetValidWriteIdsResponse> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GetValidWriteIdsResponse 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: // TBL_VALID_WRITE_IDS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list572 = iprot.readListBegin();
+ struct.tblValidWriteIds = new ArrayList<TableValidWriteIds>(_list572.size);
+ TableValidWriteIds _elem573;
+ for (int _i574 = 0; _i574 < _list572.size; ++_i574)
+ {
+ _elem573 = new TableValidWriteIds();
+ _elem573.read(iprot);
+ struct.tblValidWriteIds.add(_elem573);
+ }
+ iprot.readListEnd();
+ }
+ struct.setTblValidWriteIdsIsSet(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, GetValidWriteIdsResponse struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tblValidWriteIds != null) {
+ oprot.writeFieldBegin(TBL_VALID_WRITE_IDS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tblValidWriteIds.size()));
+ for (TableValidWriteIds _iter575 : struct.tblValidWriteIds)
+ {
+ _iter575.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GetValidWriteIdsResponseTupleSchemeFactory implements SchemeFactory {
+ public GetValidWriteIdsResponseTupleScheme getScheme() {
+ return new GetValidWriteIdsResponseTupleScheme();
+ }
+ }
+
+ private static class GetValidWriteIdsResponseTupleScheme extends TupleScheme<GetValidWriteIdsResponse> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GetValidWriteIdsResponse struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.tblValidWriteIds.size());
+ for (TableValidWriteIds _iter576 : struct.tblValidWriteIds)
+ {
+ _iter576.write(oprot);
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GetValidWriteIdsResponse struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TList _list577 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.tblValidWriteIds = new ArrayList<TableValidWriteIds>(_list577.size);
+ TableValidWriteIds _elem578;
+ for (int _i579 = 0; _i579 < _list577.size; ++_i579)
+ {
+ _elem578 = new TableValidWriteIds();
+ _elem578.read(iprot);
+ struct.tblValidWriteIds.add(_elem578);
+ }
+ }
+ struct.setTblValidWriteIdsIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java
index 762f465..0bcd837 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java
@@ -453,13 +453,13 @@ import org.slf4j.LoggerFactory;
case 1: // ABORTED
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
- org.apache.thrift.protocol.TSet _set572 = iprot.readSetBegin();
- struct.aborted = new HashSet<Long>(2*_set572.size);
- long _elem573;
- for (int _i574 = 0; _i574 < _set572.size; ++_i574)
+ org.apache.thrift.protocol.TSet _set612 = iprot.readSetBegin();
+ struct.aborted = new HashSet<Long>(2*_set612.size);
+ long _elem613;
+ for (int _i614 = 0; _i614 < _set612.size; ++_i614)
{
- _elem573 = iprot.readI64();
- struct.aborted.add(_elem573);
+ _elem613 = iprot.readI64();
+ struct.aborted.add(_elem613);
}
iprot.readSetEnd();
}
@@ -471,13 +471,13 @@ import org.slf4j.LoggerFactory;
case 2: // NOSUCH
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
- org.apache.thrift.protocol.TSet _set575 = iprot.readSetBegin();
- struct.nosuch = new HashSet<Long>(2*_set575.size);
- long _elem576;
- for (int _i577 = 0; _i577 < _set575.size; ++_i577)
+ org.apache.thrift.protocol.TSet _set615 = iprot.readSetBegin();
+ struct.nosuch = new HashSet<Long>(2*_set615.size);
+ long _elem616;
+ for (int _i617 = 0; _i617 < _set615.size; ++_i617)
{
- _elem576 = iprot.readI64();
- struct.nosuch.add(_elem576);
+ _elem616 = iprot.readI64();
+ struct.nosuch.add(_elem616);
}
iprot.readSetEnd();
}
@@ -503,9 +503,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(ABORTED_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.aborted.size()));
- for (long _iter578 : struct.aborted)
+ for (long _iter618 : struct.aborted)
{
- oprot.writeI64(_iter578);
+ oprot.writeI64(_iter618);
}
oprot.writeSetEnd();
}
@@ -515,9 +515,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(NOSUCH_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.nosuch.size()));
- for (long _iter579 : struct.nosuch)
+ for (long _iter619 : struct.nosuch)
{
- oprot.writeI64(_iter579);
+ oprot.writeI64(_iter619);
}
oprot.writeSetEnd();
}
@@ -542,16 +542,16 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.aborted.size());
- for (long _iter580 : struct.aborted)
+ for (long _iter620 : struct.aborted)
{
- oprot.writeI64(_iter580);
+ oprot.writeI64(_iter620);
}
}
{
oprot.writeI32(struct.nosuch.size());
- for (long _iter581 : struct.nosuch)
+ for (long _iter621 : struct.nosuch)
{
- oprot.writeI64(_iter581);
+ oprot.writeI64(_iter621);
}
}
}
@@ -560,24 +560,24 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TSet _set582 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.aborted = new HashSet<Long>(2*_set582.size);
- long _elem583;
- for (int _i584 = 0; _i584 < _set582.size; ++_i584)
+ org.apache.thrift.protocol.TSet _set622 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.aborted = new HashSet<Long>(2*_set622.size);
+ long _elem623;
+ for (int _i624 = 0; _i624 < _set622.size; ++_i624)
{
- _elem583 = iprot.readI64();
- struct.aborted.add(_elem583);
+ _elem623 = iprot.readI64();
+ struct.aborted.add(_elem623);
}
}
struct.setAbortedIsSet(true);
{
- org.apache.thrift.protocol.TSet _set585 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.nosuch = new HashSet<Long>(2*_set585.size);
- long _elem586;
- for (int _i587 = 0; _i587 < _set585.size; ++_i587)
+ org.apache.thrift.protocol.TSet _set625 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.nosuch = new HashSet<Long>(2*_set625.size);
+ long _elem626;
+ for (int _i627 = 0; _i627 < _set625.size; ++_i627)
{
- _elem586 = iprot.readI64();
- struct.nosuch.add(_elem586);
+ _elem626 = iprot.readI64();
+ struct.nosuch.add(_elem626);
}
}
struct.setNosuchIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java
index e23bc04..85272dd 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java
@@ -538,13 +538,13 @@ import org.slf4j.LoggerFactory;
case 2: // FILES_ADDED
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list630 = iprot.readListBegin();
- struct.filesAdded = new ArrayList<String>(_list630.size);
- String _elem631;
- for (int _i632 = 0; _i632 < _list630.size; ++_i632)
+ org.apache.thrift.protocol.TList _list670 = iprot.readListBegin();
+ struct.filesAdded = new ArrayList<String>(_list670.size);
+ String _elem671;
+ for (int _i672 = 0; _i672 < _list670.size; ++_i672)
{
- _elem631 = iprot.readString();
- struct.filesAdded.add(_elem631);
+ _elem671 = iprot.readString();
+ struct.filesAdded.add(_elem671);
}
iprot.readListEnd();
}
@@ -556,13 +556,13 @@ import org.slf4j.LoggerFactory;
case 3: // FILES_ADDED_CHECKSUM
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list633 = iprot.readListBegin();
- struct.filesAddedChecksum = new ArrayList<String>(_list633.size);
- String _elem634;
- for (int _i635 = 0; _i635 < _list633.size; ++_i635)
+ org.apache.thrift.protocol.TList _list673 = iprot.readListBegin();
+ struct.filesAddedChecksum = new ArrayList<String>(_list673.size);
+ String _elem674;
+ for (int _i675 = 0; _i675 < _list673.size; ++_i675)
{
- _elem634 = iprot.readString();
- struct.filesAddedChecksum.add(_elem634);
+ _elem674 = iprot.readString();
+ struct.filesAddedChecksum.add(_elem674);
}
iprot.readListEnd();
}
@@ -593,9 +593,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(FILES_ADDED_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filesAdded.size()));
- for (String _iter636 : struct.filesAdded)
+ for (String _iter676 : struct.filesAdded)
{
- oprot.writeString(_iter636);
+ oprot.writeString(_iter676);
}
oprot.writeListEnd();
}
@@ -606,9 +606,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(FILES_ADDED_CHECKSUM_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filesAddedChecksum.size()));
- for (String _iter637 : struct.filesAddedChecksum)
+ for (String _iter677 : struct.filesAddedChecksum)
{
- oprot.writeString(_iter637);
+ oprot.writeString(_iter677);
}
oprot.writeListEnd();
}
@@ -634,9 +634,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.filesAdded.size());
- for (String _iter638 : struct.filesAdded)
+ for (String _iter678 : struct.filesAdded)
{
- oprot.writeString(_iter638);
+ oprot.writeString(_iter678);
}
}
BitSet optionals = new BitSet();
@@ -653,9 +653,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetFilesAddedChecksum()) {
{
oprot.writeI32(struct.filesAddedChecksum.size());
- for (String _iter639 : struct.filesAddedChecksum)
+ for (String _iter679 : struct.filesAddedChecksum)
{
- oprot.writeString(_iter639);
+ oprot.writeString(_iter679);
}
}
}
@@ -665,13 +665,13 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, InsertEventRequestData struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list640 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.filesAdded = new ArrayList<String>(_list640.size);
- String _elem641;
- for (int _i642 = 0; _i642 < _list640.size; ++_i642)
+ org.apache.thrift.protocol.TList _list680 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.filesAdded = new ArrayList<String>(_list680.size);
+ String _elem681;
+ for (int _i682 = 0; _i682 < _list680.size; ++_i682)
{
- _elem641 = iprot.readString();
- struct.filesAdded.add(_elem641);
+ _elem681 = iprot.readString();
+ struct.filesAdded.add(_elem681);
}
}
struct.setFilesAddedIsSet(true);
@@ -682,13 +682,13 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list643 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.filesAddedChecksum = new ArrayList<String>(_list643.size);
- String _elem644;
- for (int _i645 = 0; _i645 < _list643.size; ++_i645)
+ org.apache.thrift.protocol.TList _list683 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.filesAddedChecksum = new ArrayList<String>(_list683.size);
+ String _elem684;
+ for (int _i685 = 0; _i685 < _list683.size; ++_i685)
{
- _elem644 = iprot.readString();
- struct.filesAddedChecksum.add(_elem644);
+ _elem684 = iprot.readString();
+ struct.filesAddedChecksum.add(_elem684);
}
}
struct.setFilesAddedChecksumIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
index 6aaed5c..cfdd0bd 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
@@ -689,14 +689,14 @@ import org.slf4j.LoggerFactory;
case 1: // COMPONENT
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list556 = iprot.readListBegin();
- struct.component = new ArrayList<LockComponent>(_list556.size);
- LockComponent _elem557;
- for (int _i558 = 0; _i558 < _list556.size; ++_i558)
+ org.apache.thrift.protocol.TList _list596 = iprot.readListBegin();
+ struct.component = new ArrayList<LockComponent>(_list596.size);
+ LockComponent _elem597;
+ for (int _i598 = 0; _i598 < _list596.size; ++_i598)
{
- _elem557 = new LockComponent();
- _elem557.read(iprot);
- struct.component.add(_elem557);
+ _elem597 = new LockComponent();
+ _elem597.read(iprot);
+ struct.component.add(_elem597);
}
iprot.readListEnd();
}
@@ -754,9 +754,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(COMPONENT_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.component.size()));
- for (LockComponent _iter559 : struct.component)
+ for (LockComponent _iter599 : struct.component)
{
- _iter559.write(oprot);
+ _iter599.write(oprot);
}
oprot.writeListEnd();
}
@@ -803,9 +803,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.component.size());
- for (LockComponent _iter560 : struct.component)
+ for (LockComponent _iter600 : struct.component)
{
- _iter560.write(oprot);
+ _iter600.write(oprot);
}
}
oprot.writeString(struct.user);
@@ -830,14 +830,14 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list561 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.component = new ArrayList<LockComponent>(_list561.size);
- LockComponent _elem562;
- for (int _i563 = 0; _i563 < _list561.size; ++_i563)
+ org.apache.thrift.protocol.TList _list601 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.component = new ArrayList<LockComponent>(_list601.size);
+ LockComponent _elem602;
+ for (int _i603 = 0; _i603 < _list601.size; ++_i603)
{
- _elem562 = new LockComponent();
- _elem562.read(iprot);
- struct.component.add(_elem562);
+ _elem602 = new LockComponent();
+ _elem602.read(iprot);
+ struct.component.add(_elem602);
}
}
struct.setComponentIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
index ccef024..c91b9cf 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
@@ -518,13 +518,13 @@ import org.slf4j.LoggerFactory;
case 1: // TABLES_USED
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
- org.apache.thrift.protocol.TSet _set746 = iprot.readSetBegin();
- struct.tablesUsed = new HashSet<String>(2*_set746.size);
- String _elem747;
- for (int _i748 = 0; _i748 < _set746.size; ++_i748)
+ org.apache.thrift.protocol.TSet _set786 = iprot.readSetBegin();
+ struct.tablesUsed = new HashSet<String>(2*_set786.size);
+ String _elem787;
+ for (int _i788 = 0; _i788 < _set786.size; ++_i788)
{
- _elem747 = iprot.readString();
- struct.tablesUsed.add(_elem747);
+ _elem787 = iprot.readString();
+ struct.tablesUsed.add(_elem787);
}
iprot.readSetEnd();
}
@@ -566,9 +566,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TABLES_USED_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.tablesUsed.size()));
- for (String _iter749 : struct.tablesUsed)
+ for (String _iter789 : struct.tablesUsed)
{
- oprot.writeString(_iter749);
+ oprot.writeString(_iter789);
}
oprot.writeSetEnd();
}
@@ -603,9 +603,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.tablesUsed.size());
- for (String _iter750 : struct.tablesUsed)
+ for (String _iter790 : struct.tablesUsed)
{
- oprot.writeString(_iter750);
+ oprot.writeString(_iter790);
}
}
oprot.writeI64(struct.invalidationTime);
@@ -623,13 +623,13 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, Materialization struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TSet _set751 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tablesUsed = new HashSet<String>(2*_set751.size);
- String _elem752;
- for (int _i753 = 0; _i753 < _set751.size; ++_i753)
+ org.apache.thrift.protocol.TSet _set791 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.tablesUsed = new HashSet<String>(2*_set791.size);
+ String _elem792;
+ for (int _i793 = 0; _i793 < _set791.size; ++_i793)
{
- _elem752 = iprot.readString();
- struct.tablesUsed.add(_elem752);
+ _elem792 = iprot.readString();
+ struct.tablesUsed.add(_elem792);
}
}
struct.setTablesUsedIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java
index a28350b..549c14b 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
case 1: // EVENTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list622 = iprot.readListBegin();
- struct.events = new ArrayList<NotificationEvent>(_list622.size);
- NotificationEvent _elem623;
- for (int _i624 = 0; _i624 < _list622.size; ++_i624)
+ org.apache.thrift.protocol.TList _list662 = iprot.readListBegin();
+ struct.events = new ArrayList<NotificationEvent>(_list662.size);
+ NotificationEvent _elem663;
+ for (int _i664 = 0; _i664 < _list662.size; ++_i664)
{
- _elem623 = new NotificationEvent();
- _elem623.read(iprot);
- struct.events.add(_elem623);
+ _elem663 = new NotificationEvent();
+ _elem663.read(iprot);
+ struct.events.add(_elem663);
}
iprot.readListEnd();
}
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(EVENTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.events.size()));
- for (NotificationEvent _iter625 : struct.events)
+ for (NotificationEvent _iter665 : struct.events)
{
- _iter625.write(oprot);
+ _iter665.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.events.size());
- for (NotificationEvent _iter626 : struct.events)
+ for (NotificationEvent _iter666 : struct.events)
{
- _iter626.write(oprot);
+ _iter666.write(oprot);
}
}
}
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEventResponse struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list627 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.events = new ArrayList<NotificationEvent>(_list627.size);
- NotificationEvent _elem628;
- for (int _i629 = 0; _i629 < _list627.size; ++_i629)
+ org.apache.thrift.protocol.TList _list667 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.events = new ArrayList<NotificationEvent>(_list667.size);
+ NotificationEvent _elem668;
+ for (int _i669 = 0; _i669 < _list667.size; ++_i669)
{
- _elem628 = new NotificationEvent();
- _elem628.read(iprot);
- struct.events.add(_elem628);
+ _elem668 = new NotificationEvent();
+ _elem668.read(iprot);
+ struct.events.add(_elem668);
}
}
struct.setEventsIsSet(true);
[13/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
index 2466498..f4a9c75 100644
--- a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
+++ b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
@@ -165,6 +165,8 @@ class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookService
virtual void abort_txn(const AbortTxnRequest& rqst) = 0;
virtual void abort_txns(const AbortTxnsRequest& rqst) = 0;
virtual void commit_txn(const CommitTxnRequest& rqst) = 0;
+ virtual void get_valid_write_ids(GetValidWriteIdsResponse& _return, const GetValidWriteIdsRequest& rqst) = 0;
+ virtual void allocate_table_write_ids(AllocateTableWriteIdsResponse& _return, const AllocateTableWriteIdsRequest& rqst) = 0;
virtual void lock(LockResponse& _return, const LockRequest& rqst) = 0;
virtual void check_lock(LockResponse& _return, const CheckLockRequest& rqst) = 0;
virtual void unlock(const UnlockRequest& rqst) = 0;
@@ -690,6 +692,12 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p
void commit_txn(const CommitTxnRequest& /* rqst */) {
return;
}
+ void get_valid_write_ids(GetValidWriteIdsResponse& /* _return */, const GetValidWriteIdsRequest& /* rqst */) {
+ return;
+ }
+ void allocate_table_write_ids(AllocateTableWriteIdsResponse& /* _return */, const AllocateTableWriteIdsRequest& /* rqst */) {
+ return;
+ }
void lock(LockResponse& /* _return */, const LockRequest& /* rqst */) {
return;
}
@@ -18834,6 +18842,254 @@ class ThriftHiveMetastore_commit_txn_presult {
};
+typedef struct _ThriftHiveMetastore_get_valid_write_ids_args__isset {
+ _ThriftHiveMetastore_get_valid_write_ids_args__isset() : rqst(false) {}
+ bool rqst :1;
+} _ThriftHiveMetastore_get_valid_write_ids_args__isset;
+
+class ThriftHiveMetastore_get_valid_write_ids_args {
+ public:
+
+ ThriftHiveMetastore_get_valid_write_ids_args(const ThriftHiveMetastore_get_valid_write_ids_args&);
+ ThriftHiveMetastore_get_valid_write_ids_args& operator=(const ThriftHiveMetastore_get_valid_write_ids_args&);
+ ThriftHiveMetastore_get_valid_write_ids_args() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_valid_write_ids_args() throw();
+ GetValidWriteIdsRequest rqst;
+
+ _ThriftHiveMetastore_get_valid_write_ids_args__isset __isset;
+
+ void __set_rqst(const GetValidWriteIdsRequest& val);
+
+ bool operator == (const ThriftHiveMetastore_get_valid_write_ids_args & rhs) const
+ {
+ if (!(rqst == rhs.rqst))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_valid_write_ids_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_valid_write_ids_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_get_valid_write_ids_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_valid_write_ids_pargs() throw();
+ const GetValidWriteIdsRequest* rqst;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_valid_write_ids_result__isset {
+ _ThriftHiveMetastore_get_valid_write_ids_result__isset() : success(false), o1(false), o2(false) {}
+ bool success :1;
+ bool o1 :1;
+ bool o2 :1;
+} _ThriftHiveMetastore_get_valid_write_ids_result__isset;
+
+class ThriftHiveMetastore_get_valid_write_ids_result {
+ public:
+
+ ThriftHiveMetastore_get_valid_write_ids_result(const ThriftHiveMetastore_get_valid_write_ids_result&);
+ ThriftHiveMetastore_get_valid_write_ids_result& operator=(const ThriftHiveMetastore_get_valid_write_ids_result&);
+ ThriftHiveMetastore_get_valid_write_ids_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_valid_write_ids_result() throw();
+ GetValidWriteIdsResponse success;
+ NoSuchTxnException o1;
+ MetaException o2;
+
+ _ThriftHiveMetastore_get_valid_write_ids_result__isset __isset;
+
+ void __set_success(const GetValidWriteIdsResponse& val);
+
+ void __set_o1(const NoSuchTxnException& val);
+
+ void __set_o2(const MetaException& val);
+
+ bool operator == (const ThriftHiveMetastore_get_valid_write_ids_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ if (!(o2 == rhs.o2))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_valid_write_ids_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_valid_write_ids_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_valid_write_ids_presult__isset {
+ _ThriftHiveMetastore_get_valid_write_ids_presult__isset() : success(false), o1(false), o2(false) {}
+ bool success :1;
+ bool o1 :1;
+ bool o2 :1;
+} _ThriftHiveMetastore_get_valid_write_ids_presult__isset;
+
+class ThriftHiveMetastore_get_valid_write_ids_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_valid_write_ids_presult() throw();
+ GetValidWriteIdsResponse* success;
+ NoSuchTxnException o1;
+ MetaException o2;
+
+ _ThriftHiveMetastore_get_valid_write_ids_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHiveMetastore_allocate_table_write_ids_args__isset {
+ _ThriftHiveMetastore_allocate_table_write_ids_args__isset() : rqst(false) {}
+ bool rqst :1;
+} _ThriftHiveMetastore_allocate_table_write_ids_args__isset;
+
+class ThriftHiveMetastore_allocate_table_write_ids_args {
+ public:
+
+ ThriftHiveMetastore_allocate_table_write_ids_args(const ThriftHiveMetastore_allocate_table_write_ids_args&);
+ ThriftHiveMetastore_allocate_table_write_ids_args& operator=(const ThriftHiveMetastore_allocate_table_write_ids_args&);
+ ThriftHiveMetastore_allocate_table_write_ids_args() {
+ }
+
+ virtual ~ThriftHiveMetastore_allocate_table_write_ids_args() throw();
+ AllocateTableWriteIdsRequest rqst;
+
+ _ThriftHiveMetastore_allocate_table_write_ids_args__isset __isset;
+
+ void __set_rqst(const AllocateTableWriteIdsRequest& val);
+
+ bool operator == (const ThriftHiveMetastore_allocate_table_write_ids_args & rhs) const
+ {
+ if (!(rqst == rhs.rqst))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_allocate_table_write_ids_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_allocate_table_write_ids_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_allocate_table_write_ids_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_allocate_table_write_ids_pargs() throw();
+ const AllocateTableWriteIdsRequest* rqst;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_allocate_table_write_ids_result__isset {
+ _ThriftHiveMetastore_allocate_table_write_ids_result__isset() : success(false), o1(false), o2(false), o3(false) {}
+ bool success :1;
+ bool o1 :1;
+ bool o2 :1;
+ bool o3 :1;
+} _ThriftHiveMetastore_allocate_table_write_ids_result__isset;
+
+class ThriftHiveMetastore_allocate_table_write_ids_result {
+ public:
+
+ ThriftHiveMetastore_allocate_table_write_ids_result(const ThriftHiveMetastore_allocate_table_write_ids_result&);
+ ThriftHiveMetastore_allocate_table_write_ids_result& operator=(const ThriftHiveMetastore_allocate_table_write_ids_result&);
+ ThriftHiveMetastore_allocate_table_write_ids_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_allocate_table_write_ids_result() throw();
+ AllocateTableWriteIdsResponse success;
+ NoSuchTxnException o1;
+ TxnAbortedException o2;
+ MetaException o3;
+
+ _ThriftHiveMetastore_allocate_table_write_ids_result__isset __isset;
+
+ void __set_success(const AllocateTableWriteIdsResponse& val);
+
+ void __set_o1(const NoSuchTxnException& val);
+
+ void __set_o2(const TxnAbortedException& val);
+
+ void __set_o3(const MetaException& val);
+
+ bool operator == (const ThriftHiveMetastore_allocate_table_write_ids_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ if (!(o2 == rhs.o2))
+ return false;
+ if (!(o3 == rhs.o3))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_allocate_table_write_ids_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_allocate_table_write_ids_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_allocate_table_write_ids_presult__isset {
+ _ThriftHiveMetastore_allocate_table_write_ids_presult__isset() : success(false), o1(false), o2(false), o3(false) {}
+ bool success :1;
+ bool o1 :1;
+ bool o2 :1;
+ bool o3 :1;
+} _ThriftHiveMetastore_allocate_table_write_ids_presult__isset;
+
+class ThriftHiveMetastore_allocate_table_write_ids_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_allocate_table_write_ids_presult() throw();
+ AllocateTableWriteIdsResponse* success;
+ NoSuchTxnException o1;
+ TxnAbortedException o2;
+ MetaException o3;
+
+ _ThriftHiveMetastore_allocate_table_write_ids_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
typedef struct _ThriftHiveMetastore_lock_args__isset {
_ThriftHiveMetastore_lock_args__isset() : rqst(false) {}
bool rqst :1;
@@ -23738,6 +23994,12 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public
void commit_txn(const CommitTxnRequest& rqst);
void send_commit_txn(const CommitTxnRequest& rqst);
void recv_commit_txn();
+ void get_valid_write_ids(GetValidWriteIdsResponse& _return, const GetValidWriteIdsRequest& rqst);
+ void send_get_valid_write_ids(const GetValidWriteIdsRequest& rqst);
+ void recv_get_valid_write_ids(GetValidWriteIdsResponse& _return);
+ void allocate_table_write_ids(AllocateTableWriteIdsResponse& _return, const AllocateTableWriteIdsRequest& rqst);
+ void send_allocate_table_write_ids(const AllocateTableWriteIdsRequest& rqst);
+ void recv_allocate_table_write_ids(AllocateTableWriteIdsResponse& _return);
void lock(LockResponse& _return, const LockRequest& rqst);
void send_lock(const LockRequest& rqst);
void recv_lock(LockResponse& _return);
@@ -24008,6 +24270,8 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP
void process_abort_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_abort_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_commit_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_get_valid_write_ids(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_allocate_table_write_ids(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_check_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_unlock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -24194,6 +24458,8 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP
processMap_["abort_txn"] = &ThriftHiveMetastoreProcessor::process_abort_txn;
processMap_["abort_txns"] = &ThriftHiveMetastoreProcessor::process_abort_txns;
processMap_["commit_txn"] = &ThriftHiveMetastoreProcessor::process_commit_txn;
+ processMap_["get_valid_write_ids"] = &ThriftHiveMetastoreProcessor::process_get_valid_write_ids;
+ processMap_["allocate_table_write_ids"] = &ThriftHiveMetastoreProcessor::process_allocate_table_write_ids;
processMap_["lock"] = &ThriftHiveMetastoreProcessor::process_lock;
processMap_["check_lock"] = &ThriftHiveMetastoreProcessor::process_check_lock;
processMap_["unlock"] = &ThriftHiveMetastoreProcessor::process_unlock;
@@ -25634,6 +25900,26 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi
ifaces_[i]->commit_txn(rqst);
}
+ void get_valid_write_ids(GetValidWriteIdsResponse& _return, const GetValidWriteIdsRequest& rqst) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->get_valid_write_ids(_return, rqst);
+ }
+ ifaces_[i]->get_valid_write_ids(_return, rqst);
+ return;
+ }
+
+ void allocate_table_write_ids(AllocateTableWriteIdsResponse& _return, const AllocateTableWriteIdsRequest& rqst) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->allocate_table_write_ids(_return, rqst);
+ }
+ ifaces_[i]->allocate_table_write_ids(_return, rqst);
+ return;
+ }
+
void lock(LockResponse& _return, const LockRequest& rqst) {
size_t sz = ifaces_.size();
size_t i = 0;
@@ -26464,6 +26750,12 @@ class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf
void commit_txn(const CommitTxnRequest& rqst);
int32_t send_commit_txn(const CommitTxnRequest& rqst);
void recv_commit_txn(const int32_t seqid);
+ void get_valid_write_ids(GetValidWriteIdsResponse& _return, const GetValidWriteIdsRequest& rqst);
+ int32_t send_get_valid_write_ids(const GetValidWriteIdsRequest& rqst);
+ void recv_get_valid_write_ids(GetValidWriteIdsResponse& _return, const int32_t seqid);
+ void allocate_table_write_ids(AllocateTableWriteIdsResponse& _return, const AllocateTableWriteIdsRequest& rqst);
+ int32_t send_allocate_table_write_ids(const AllocateTableWriteIdsRequest& rqst);
+ void recv_allocate_table_write_ids(AllocateTableWriteIdsResponse& _return, const int32_t seqid);
void lock(LockResponse& _return, const LockRequest& rqst);
int32_t send_lock(const LockRequest& rqst);
void recv_lock(LockResponse& _return, const int32_t seqid);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
index f5dc9f0..b7326f0 100644
--- a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
+++ b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
@@ -737,6 +737,16 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf {
printf("commit_txn\n");
}
+ void get_valid_write_ids(GetValidWriteIdsResponse& _return, const GetValidWriteIdsRequest& rqst) {
+ // Your implementation goes here
+ printf("get_valid_write_ids\n");
+ }
+
+ void allocate_table_write_ids(AllocateTableWriteIdsResponse& _return, const AllocateTableWriteIdsRequest& rqst) {
+ // Your implementation goes here
+ printf("allocate_table_write_ids\n");
+ }
+
void lock(LockResponse& _return, const LockRequest& rqst) {
// Your implementation goes here
printf("lock\n");
[11/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
index c250893..835cbb3 100644
--- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
+++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
@@ -364,6 +364,18 @@ class AbortTxnsRequest;
class CommitTxnRequest;
+class GetValidWriteIdsRequest;
+
+class TableValidWriteIds;
+
+class GetValidWriteIdsResponse;
+
+class AllocateTableWriteIdsRequest;
+
+class TxnToWriteId;
+
+class AllocateTableWriteIdsResponse;
+
class LockComponent;
class LockRequest;
@@ -5954,6 +5966,294 @@ inline std::ostream& operator<<(std::ostream& out, const CommitTxnRequest& obj)
return out;
}
+
+class GetValidWriteIdsRequest {
+ public:
+
+ GetValidWriteIdsRequest(const GetValidWriteIdsRequest&);
+ GetValidWriteIdsRequest& operator=(const GetValidWriteIdsRequest&);
+ GetValidWriteIdsRequest() : validTxnList() {
+ }
+
+ virtual ~GetValidWriteIdsRequest() throw();
+ std::vector<std::string> fullTableNames;
+ std::string validTxnList;
+
+ void __set_fullTableNames(const std::vector<std::string> & val);
+
+ void __set_validTxnList(const std::string& val);
+
+ bool operator == (const GetValidWriteIdsRequest & rhs) const
+ {
+ if (!(fullTableNames == rhs.fullTableNames))
+ return false;
+ if (!(validTxnList == rhs.validTxnList))
+ return false;
+ return true;
+ }
+ bool operator != (const GetValidWriteIdsRequest &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const GetValidWriteIdsRequest & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ virtual void printTo(std::ostream& out) const;
+};
+
+void swap(GetValidWriteIdsRequest &a, GetValidWriteIdsRequest &b);
+
+inline std::ostream& operator<<(std::ostream& out, const GetValidWriteIdsRequest& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+typedef struct _TableValidWriteIds__isset {
+ _TableValidWriteIds__isset() : minOpenWriteId(false) {}
+ bool minOpenWriteId :1;
+} _TableValidWriteIds__isset;
+
+class TableValidWriteIds {
+ public:
+
+ TableValidWriteIds(const TableValidWriteIds&);
+ TableValidWriteIds& operator=(const TableValidWriteIds&);
+ TableValidWriteIds() : fullTableName(), writeIdHighWaterMark(0), minOpenWriteId(0), abortedBits() {
+ }
+
+ virtual ~TableValidWriteIds() throw();
+ std::string fullTableName;
+ int64_t writeIdHighWaterMark;
+ std::vector<int64_t> invalidWriteIds;
+ int64_t minOpenWriteId;
+ std::string abortedBits;
+
+ _TableValidWriteIds__isset __isset;
+
+ void __set_fullTableName(const std::string& val);
+
+ void __set_writeIdHighWaterMark(const int64_t val);
+
+ void __set_invalidWriteIds(const std::vector<int64_t> & val);
+
+ void __set_minOpenWriteId(const int64_t val);
+
+ void __set_abortedBits(const std::string& val);
+
+ bool operator == (const TableValidWriteIds & rhs) const
+ {
+ if (!(fullTableName == rhs.fullTableName))
+ return false;
+ if (!(writeIdHighWaterMark == rhs.writeIdHighWaterMark))
+ return false;
+ if (!(invalidWriteIds == rhs.invalidWriteIds))
+ return false;
+ if (__isset.minOpenWriteId != rhs.__isset.minOpenWriteId)
+ return false;
+ else if (__isset.minOpenWriteId && !(minOpenWriteId == rhs.minOpenWriteId))
+ return false;
+ if (!(abortedBits == rhs.abortedBits))
+ return false;
+ return true;
+ }
+ bool operator != (const TableValidWriteIds &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const TableValidWriteIds & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ virtual void printTo(std::ostream& out) const;
+};
+
+void swap(TableValidWriteIds &a, TableValidWriteIds &b);
+
+inline std::ostream& operator<<(std::ostream& out, const TableValidWriteIds& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+
+class GetValidWriteIdsResponse {
+ public:
+
+ GetValidWriteIdsResponse(const GetValidWriteIdsResponse&);
+ GetValidWriteIdsResponse& operator=(const GetValidWriteIdsResponse&);
+ GetValidWriteIdsResponse() {
+ }
+
+ virtual ~GetValidWriteIdsResponse() throw();
+ std::vector<TableValidWriteIds> tblValidWriteIds;
+
+ void __set_tblValidWriteIds(const std::vector<TableValidWriteIds> & val);
+
+ bool operator == (const GetValidWriteIdsResponse & rhs) const
+ {
+ if (!(tblValidWriteIds == rhs.tblValidWriteIds))
+ return false;
+ return true;
+ }
+ bool operator != (const GetValidWriteIdsResponse &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const GetValidWriteIdsResponse & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ virtual void printTo(std::ostream& out) const;
+};
+
+void swap(GetValidWriteIdsResponse &a, GetValidWriteIdsResponse &b);
+
+inline std::ostream& operator<<(std::ostream& out, const GetValidWriteIdsResponse& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+
+class AllocateTableWriteIdsRequest {
+ public:
+
+ AllocateTableWriteIdsRequest(const AllocateTableWriteIdsRequest&);
+ AllocateTableWriteIdsRequest& operator=(const AllocateTableWriteIdsRequest&);
+ AllocateTableWriteIdsRequest() : dbName(), tableName() {
+ }
+
+ virtual ~AllocateTableWriteIdsRequest() throw();
+ std::vector<int64_t> txnIds;
+ std::string dbName;
+ std::string tableName;
+
+ void __set_txnIds(const std::vector<int64_t> & val);
+
+ void __set_dbName(const std::string& val);
+
+ void __set_tableName(const std::string& val);
+
+ bool operator == (const AllocateTableWriteIdsRequest & rhs) const
+ {
+ if (!(txnIds == rhs.txnIds))
+ return false;
+ if (!(dbName == rhs.dbName))
+ return false;
+ if (!(tableName == rhs.tableName))
+ return false;
+ return true;
+ }
+ bool operator != (const AllocateTableWriteIdsRequest &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const AllocateTableWriteIdsRequest & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ virtual void printTo(std::ostream& out) const;
+};
+
+void swap(AllocateTableWriteIdsRequest &a, AllocateTableWriteIdsRequest &b);
+
+inline std::ostream& operator<<(std::ostream& out, const AllocateTableWriteIdsRequest& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+
+class TxnToWriteId {
+ public:
+
+ TxnToWriteId(const TxnToWriteId&);
+ TxnToWriteId& operator=(const TxnToWriteId&);
+ TxnToWriteId() : txnId(0), writeId(0) {
+ }
+
+ virtual ~TxnToWriteId() throw();
+ int64_t txnId;
+ int64_t writeId;
+
+ void __set_txnId(const int64_t val);
+
+ void __set_writeId(const int64_t val);
+
+ bool operator == (const TxnToWriteId & rhs) const
+ {
+ if (!(txnId == rhs.txnId))
+ return false;
+ if (!(writeId == rhs.writeId))
+ return false;
+ return true;
+ }
+ bool operator != (const TxnToWriteId &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const TxnToWriteId & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ virtual void printTo(std::ostream& out) const;
+};
+
+void swap(TxnToWriteId &a, TxnToWriteId &b);
+
+inline std::ostream& operator<<(std::ostream& out, const TxnToWriteId& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+
+class AllocateTableWriteIdsResponse {
+ public:
+
+ AllocateTableWriteIdsResponse(const AllocateTableWriteIdsResponse&);
+ AllocateTableWriteIdsResponse& operator=(const AllocateTableWriteIdsResponse&);
+ AllocateTableWriteIdsResponse() {
+ }
+
+ virtual ~AllocateTableWriteIdsResponse() throw();
+ std::vector<TxnToWriteId> txnToWriteIds;
+
+ void __set_txnToWriteIds(const std::vector<TxnToWriteId> & val);
+
+ bool operator == (const AllocateTableWriteIdsResponse & rhs) const
+ {
+ if (!(txnToWriteIds == rhs.txnToWriteIds))
+ return false;
+ return true;
+ }
+ bool operator != (const AllocateTableWriteIdsResponse &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const AllocateTableWriteIdsResponse & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ virtual void printTo(std::ostream& out) const;
+};
+
+void swap(AllocateTableWriteIdsResponse &a, AllocateTableWriteIdsResponse &b);
+
+inline std::ostream& operator<<(std::ostream& out, const AllocateTableWriteIdsResponse& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
typedef struct _LockComponent__isset {
_LockComponent__isset() : tablename(false), partitionname(false), operationType(true), isAcid(true), isDynamicPartitionWrite(true) {}
bool tablename :1;
@@ -7025,13 +7325,14 @@ class AddDynamicPartitions {
AddDynamicPartitions(const AddDynamicPartitions&);
AddDynamicPartitions& operator=(const AddDynamicPartitions&);
- AddDynamicPartitions() : txnid(0), dbname(), tablename(), operationType((DataOperationType::type)5) {
+ AddDynamicPartitions() : txnid(0), writeid(0), dbname(), tablename(), operationType((DataOperationType::type)5) {
operationType = (DataOperationType::type)5;
}
virtual ~AddDynamicPartitions() throw();
int64_t txnid;
+ int64_t writeid;
std::string dbname;
std::string tablename;
std::vector<std::string> partitionnames;
@@ -7041,6 +7342,8 @@ class AddDynamicPartitions {
void __set_txnid(const int64_t val);
+ void __set_writeid(const int64_t val);
+
void __set_dbname(const std::string& val);
void __set_tablename(const std::string& val);
@@ -7053,6 +7356,8 @@ class AddDynamicPartitions {
{
if (!(txnid == rhs.txnid))
return false;
+ if (!(writeid == rhs.writeid))
+ return false;
if (!(dbname == rhs.dbname))
return false;
if (!(tablename == rhs.tablename))
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
index dae233a..a01dc24 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
@@ -39,10 +39,11 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddDynamicPartitions");
private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", 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 PARTITIONNAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionnames", org.apache.thrift.protocol.TType.LIST, (short)4);
- private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField WRITEID_FIELD_DESC = new org.apache.thrift.protocol.TField("writeid", org.apache.thrift.protocol.TType.I64, (short)2);
+ 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)3);
+ 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)4);
+ private static final org.apache.thrift.protocol.TField PARTITIONNAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionnames", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)6);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -51,6 +52,7 @@ import org.slf4j.LoggerFactory;
}
private long txnid; // required
+ private long writeid; // required
private String dbname; // required
private String tablename; // required
private List<String> partitionnames; // required
@@ -59,14 +61,15 @@ import org.slf4j.LoggerFactory;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TXNID((short)1, "txnid"),
- DBNAME((short)2, "dbname"),
- TABLENAME((short)3, "tablename"),
- PARTITIONNAMES((short)4, "partitionnames"),
+ WRITEID((short)2, "writeid"),
+ DBNAME((short)3, "dbname"),
+ TABLENAME((short)4, "tablename"),
+ PARTITIONNAMES((short)5, "partitionnames"),
/**
*
* @see DataOperationType
*/
- OPERATION_TYPE((short)5, "operationType");
+ OPERATION_TYPE((short)6, "operationType");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -83,13 +86,15 @@ import org.slf4j.LoggerFactory;
switch(fieldId) {
case 1: // TXNID
return TXNID;
- case 2: // DBNAME
+ case 2: // WRITEID
+ return WRITEID;
+ case 3: // DBNAME
return DBNAME;
- case 3: // TABLENAME
+ case 4: // TABLENAME
return TABLENAME;
- case 4: // PARTITIONNAMES
+ case 5: // PARTITIONNAMES
return PARTITIONNAMES;
- case 5: // OPERATION_TYPE
+ case 6: // OPERATION_TYPE
return OPERATION_TYPE;
default:
return null;
@@ -132,6 +137,7 @@ import org.slf4j.LoggerFactory;
// isset id assignments
private static final int __TXNID_ISSET_ID = 0;
+ private static final int __WRITEID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.OPERATION_TYPE};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
@@ -139,6 +145,8 @@ import org.slf4j.LoggerFactory;
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.WRITEID, new org.apache.thrift.meta_data.FieldMetaData("writeid", 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,
@@ -159,6 +167,7 @@ import org.slf4j.LoggerFactory;
public AddDynamicPartitions(
long txnid,
+ long writeid,
String dbname,
String tablename,
List<String> partitionnames)
@@ -166,6 +175,8 @@ import org.slf4j.LoggerFactory;
this();
this.txnid = txnid;
setTxnidIsSet(true);
+ this.writeid = writeid;
+ setWriteidIsSet(true);
this.dbname = dbname;
this.tablename = tablename;
this.partitionnames = partitionnames;
@@ -177,6 +188,7 @@ import org.slf4j.LoggerFactory;
public AddDynamicPartitions(AddDynamicPartitions other) {
__isset_bitfield = other.__isset_bitfield;
this.txnid = other.txnid;
+ this.writeid = other.writeid;
if (other.isSetDbname()) {
this.dbname = other.dbname;
}
@@ -200,6 +212,8 @@ import org.slf4j.LoggerFactory;
public void clear() {
setTxnidIsSet(false);
this.txnid = 0;
+ setWriteidIsSet(false);
+ this.writeid = 0;
this.dbname = null;
this.tablename = null;
this.partitionnames = null;
@@ -229,6 +243,28 @@ import org.slf4j.LoggerFactory;
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
}
+ public long getWriteid() {
+ return this.writeid;
+ }
+
+ public void setWriteid(long writeid) {
+ this.writeid = writeid;
+ setWriteidIsSet(true);
+ }
+
+ public void unsetWriteid() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITEID_ISSET_ID);
+ }
+
+ /** Returns true if field writeid is set (has been assigned a value) and false otherwise */
+ public boolean isSetWriteid() {
+ return EncodingUtils.testBit(__isset_bitfield, __WRITEID_ISSET_ID);
+ }
+
+ public void setWriteidIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITEID_ISSET_ID, value);
+ }
+
public String getDbname() {
return this.dbname;
}
@@ -354,6 +390,14 @@ import org.slf4j.LoggerFactory;
}
break;
+ case WRITEID:
+ if (value == null) {
+ unsetWriteid();
+ } else {
+ setWriteid((Long)value);
+ }
+ break;
+
case DBNAME:
if (value == null) {
unsetDbname();
@@ -394,6 +438,9 @@ import org.slf4j.LoggerFactory;
case TXNID:
return getTxnid();
+ case WRITEID:
+ return getWriteid();
+
case DBNAME:
return getDbname();
@@ -419,6 +466,8 @@ import org.slf4j.LoggerFactory;
switch (field) {
case TXNID:
return isSetTxnid();
+ case WRITEID:
+ return isSetWriteid();
case DBNAME:
return isSetDbname();
case TABLENAME:
@@ -453,6 +502,15 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_writeid = true;
+ boolean that_present_writeid = true;
+ if (this_present_writeid || that_present_writeid) {
+ if (!(this_present_writeid && that_present_writeid))
+ return false;
+ if (this.writeid != that.writeid)
+ return false;
+ }
+
boolean this_present_dbname = true && this.isSetDbname();
boolean that_present_dbname = true && that.isSetDbname();
if (this_present_dbname || that_present_dbname) {
@@ -501,6 +559,11 @@ import org.slf4j.LoggerFactory;
if (present_txnid)
list.add(txnid);
+ boolean present_writeid = true;
+ list.add(present_writeid);
+ if (present_writeid)
+ list.add(writeid);
+
boolean present_dbname = true && (isSetDbname());
list.add(present_dbname);
if (present_dbname)
@@ -542,6 +605,16 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetWriteid()).compareTo(other.isSetWriteid());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWriteid()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeid, other.writeid);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname());
if (lastComparison != 0) {
return lastComparison;
@@ -606,6 +679,10 @@ import org.slf4j.LoggerFactory;
sb.append(this.txnid);
first = false;
if (!first) sb.append(", ");
+ sb.append("writeid:");
+ sb.append(this.writeid);
+ first = false;
+ if (!first) sb.append(", ");
sb.append("dbname:");
if (this.dbname == null) {
sb.append("null");
@@ -649,6 +726,10 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString());
}
+ if (!isSetWriteid()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'writeid' is unset! Struct:" + toString());
+ }
+
if (!isSetDbname()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString());
}
@@ -708,7 +789,15 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // DBNAME
+ case 2: // WRITEID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.writeid = iprot.readI64();
+ struct.setWriteidIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // DBNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.dbname = iprot.readString();
struct.setDbnameIsSet(true);
@@ -716,7 +805,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 3: // TABLENAME
+ case 4: // TABLENAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tablename = iprot.readString();
struct.setTablenameIsSet(true);
@@ -724,16 +813,16 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // PARTITIONNAMES
+ case 5: // PARTITIONNAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list606 = iprot.readListBegin();
- struct.partitionnames = new ArrayList<String>(_list606.size);
- String _elem607;
- for (int _i608 = 0; _i608 < _list606.size; ++_i608)
+ org.apache.thrift.protocol.TList _list646 = iprot.readListBegin();
+ struct.partitionnames = new ArrayList<String>(_list646.size);
+ String _elem647;
+ for (int _i648 = 0; _i648 < _list646.size; ++_i648)
{
- _elem607 = iprot.readString();
- struct.partitionnames.add(_elem607);
+ _elem647 = iprot.readString();
+ struct.partitionnames.add(_elem647);
}
iprot.readListEnd();
}
@@ -742,7 +831,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 5: // OPERATION_TYPE
+ case 6: // OPERATION_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
struct.setOperationTypeIsSet(true);
@@ -766,6 +855,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TXNID_FIELD_DESC);
oprot.writeI64(struct.txnid);
oprot.writeFieldEnd();
+ oprot.writeFieldBegin(WRITEID_FIELD_DESC);
+ oprot.writeI64(struct.writeid);
+ oprot.writeFieldEnd();
if (struct.dbname != null) {
oprot.writeFieldBegin(DBNAME_FIELD_DESC);
oprot.writeString(struct.dbname);
@@ -780,9 +872,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(PARTITIONNAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionnames.size()));
- for (String _iter609 : struct.partitionnames)
+ for (String _iter649 : struct.partitionnames)
{
- oprot.writeString(_iter609);
+ oprot.writeString(_iter649);
}
oprot.writeListEnd();
}
@@ -813,13 +905,14 @@ import org.slf4j.LoggerFactory;
public void write(org.apache.thrift.protocol.TProtocol prot, AddDynamicPartitions struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeI64(struct.txnid);
+ oprot.writeI64(struct.writeid);
oprot.writeString(struct.dbname);
oprot.writeString(struct.tablename);
{
oprot.writeI32(struct.partitionnames.size());
- for (String _iter610 : struct.partitionnames)
+ for (String _iter650 : struct.partitionnames)
{
- oprot.writeString(_iter610);
+ oprot.writeString(_iter650);
}
}
BitSet optionals = new BitSet();
@@ -837,18 +930,20 @@ import org.slf4j.LoggerFactory;
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.txnid = iprot.readI64();
struct.setTxnidIsSet(true);
+ struct.writeid = iprot.readI64();
+ struct.setWriteidIsSet(true);
struct.dbname = iprot.readString();
struct.setDbnameIsSet(true);
struct.tablename = iprot.readString();
struct.setTablenameIsSet(true);
{
- org.apache.thrift.protocol.TList _list611 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.partitionnames = new ArrayList<String>(_list611.size);
- String _elem612;
- for (int _i613 = 0; _i613 < _list611.size; ++_i613)
+ org.apache.thrift.protocol.TList _list651 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.partitionnames = new ArrayList<String>(_list651.size);
+ String _elem652;
+ for (int _i653 = 0; _i653 < _list651.size; ++_i653)
{
- _elem612 = iprot.readString();
- struct.partitionnames.add(_elem612);
+ _elem652 = iprot.readString();
+ struct.partitionnames.add(_elem652);
}
}
struct.setPartitionnamesIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java
new file mode 100644
index 0000000..1aec53b
--- /dev/null
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java
@@ -0,0 +1,640 @@
+/**
+ * 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 AllocateTableWriteIdsRequest implements org.apache.thrift.TBase<AllocateTableWriteIdsRequest, AllocateTableWriteIdsRequest._Fields>, java.io.Serializable, Cloneable, Comparable<AllocateTableWriteIdsRequest> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AllocateTableWriteIdsRequest");
+
+ private static final org.apache.thrift.protocol.TField TXN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("txnIds", org.apache.thrift.protocol.TType.LIST, (short)1);
+ private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AllocateTableWriteIdsRequestStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AllocateTableWriteIdsRequestTupleSchemeFactory());
+ }
+
+ private List<Long> txnIds; // required
+ private String dbName; // required
+ private String tableName; // 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 {
+ TXN_IDS((short)1, "txnIds"),
+ DB_NAME((short)2, "dbName"),
+ TABLE_NAME((short)3, "tableName");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TXN_IDS
+ return TXN_IDS;
+ case 2: // DB_NAME
+ return DB_NAME;
+ case 3: // TABLE_NAME
+ return TABLE_NAME;
+ 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.TXN_IDS, new org.apache.thrift.meta_data.FieldMetaData("txnIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ 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.I64))));
+ tmpMap.put(_Fields.DB_NAME, 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.TABLE_NAME, 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AllocateTableWriteIdsRequest.class, metaDataMap);
+ }
+
+ public AllocateTableWriteIdsRequest() {
+ }
+
+ public AllocateTableWriteIdsRequest(
+ List<Long> txnIds,
+ String dbName,
+ String tableName)
+ {
+ this();
+ this.txnIds = txnIds;
+ this.dbName = dbName;
+ this.tableName = tableName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AllocateTableWriteIdsRequest(AllocateTableWriteIdsRequest other) {
+ if (other.isSetTxnIds()) {
+ List<Long> __this__txnIds = new ArrayList<Long>(other.txnIds);
+ this.txnIds = __this__txnIds;
+ }
+ if (other.isSetDbName()) {
+ this.dbName = other.dbName;
+ }
+ if (other.isSetTableName()) {
+ this.tableName = other.tableName;
+ }
+ }
+
+ public AllocateTableWriteIdsRequest deepCopy() {
+ return new AllocateTableWriteIdsRequest(this);
+ }
+
+ @Override
+ public void clear() {
+ this.txnIds = null;
+ this.dbName = null;
+ this.tableName = null;
+ }
+
+ public int getTxnIdsSize() {
+ return (this.txnIds == null) ? 0 : this.txnIds.size();
+ }
+
+ public java.util.Iterator<Long> getTxnIdsIterator() {
+ return (this.txnIds == null) ? null : this.txnIds.iterator();
+ }
+
+ public void addToTxnIds(long elem) {
+ if (this.txnIds == null) {
+ this.txnIds = new ArrayList<Long>();
+ }
+ this.txnIds.add(elem);
+ }
+
+ public List<Long> getTxnIds() {
+ return this.txnIds;
+ }
+
+ public void setTxnIds(List<Long> txnIds) {
+ this.txnIds = txnIds;
+ }
+
+ public void unsetTxnIds() {
+ this.txnIds = null;
+ }
+
+ /** Returns true if field txnIds is set (has been assigned a value) and false otherwise */
+ public boolean isSetTxnIds() {
+ return this.txnIds != null;
+ }
+
+ public void setTxnIdsIsSet(boolean value) {
+ if (!value) {
+ this.txnIds = null;
+ }
+ }
+
+ 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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TXN_IDS:
+ if (value == null) {
+ unsetTxnIds();
+ } else {
+ setTxnIds((List<Long>)value);
+ }
+ break;
+
+ case DB_NAME:
+ if (value == null) {
+ unsetDbName();
+ } else {
+ setDbName((String)value);
+ }
+ break;
+
+ case TABLE_NAME:
+ if (value == null) {
+ unsetTableName();
+ } else {
+ setTableName((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TXN_IDS:
+ return getTxnIds();
+
+ case DB_NAME:
+ return getDbName();
+
+ case TABLE_NAME:
+ return getTableName();
+
+ }
+ 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 TXN_IDS:
+ return isSetTxnIds();
+ case DB_NAME:
+ return isSetDbName();
+ case TABLE_NAME:
+ return isSetTableName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AllocateTableWriteIdsRequest)
+ return this.equals((AllocateTableWriteIdsRequest)that);
+ return false;
+ }
+
+ public boolean equals(AllocateTableWriteIdsRequest that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_txnIds = true && this.isSetTxnIds();
+ boolean that_present_txnIds = true && that.isSetTxnIds();
+ if (this_present_txnIds || that_present_txnIds) {
+ if (!(this_present_txnIds && that_present_txnIds))
+ return false;
+ if (!this.txnIds.equals(that.txnIds))
+ 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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_txnIds = true && (isSetTxnIds());
+ list.add(present_txnIds);
+ if (present_txnIds)
+ list.add(txnIds);
+
+ 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);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(AllocateTableWriteIdsRequest other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTxnIds()).compareTo(other.isSetTxnIds());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTxnIds()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnIds, other.txnIds);
+ 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;
+ }
+ }
+ 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("AllocateTableWriteIdsRequest(");
+ boolean first = true;
+
+ sb.append("txnIds:");
+ if (this.txnIds == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.txnIds);
+ }
+ 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;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTxnIds()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnIds' 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());
+ }
+
+ // 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 AllocateTableWriteIdsRequestStandardSchemeFactory implements SchemeFactory {
+ public AllocateTableWriteIdsRequestStandardScheme getScheme() {
+ return new AllocateTableWriteIdsRequestStandardScheme();
+ }
+ }
+
+ private static class AllocateTableWriteIdsRequestStandardScheme extends StandardScheme<AllocateTableWriteIdsRequest> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AllocateTableWriteIdsRequest 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: // TXN_IDS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list580 = iprot.readListBegin();
+ struct.txnIds = new ArrayList<Long>(_list580.size);
+ long _elem581;
+ for (int _i582 = 0; _i582 < _list580.size; ++_i582)
+ {
+ _elem581 = iprot.readI64();
+ struct.txnIds.add(_elem581);
+ }
+ iprot.readListEnd();
+ }
+ struct.setTxnIdsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DB_NAME
+ 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: // TABLE_NAME
+ 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;
+ 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, AllocateTableWriteIdsRequest struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.txnIds != null) {
+ oprot.writeFieldBegin(TXN_IDS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.txnIds.size()));
+ for (long _iter583 : struct.txnIds)
+ {
+ oprot.writeI64(_iter583);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.dbName != null) {
+ oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+ oprot.writeString(struct.dbName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tableName != null) {
+ oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+ oprot.writeString(struct.tableName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AllocateTableWriteIdsRequestTupleSchemeFactory implements SchemeFactory {
+ public AllocateTableWriteIdsRequestTupleScheme getScheme() {
+ return new AllocateTableWriteIdsRequestTupleScheme();
+ }
+ }
+
+ private static class AllocateTableWriteIdsRequestTupleScheme extends TupleScheme<AllocateTableWriteIdsRequest> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AllocateTableWriteIdsRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.txnIds.size());
+ for (long _iter584 : struct.txnIds)
+ {
+ oprot.writeI64(_iter584);
+ }
+ }
+ oprot.writeString(struct.dbName);
+ oprot.writeString(struct.tableName);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AllocateTableWriteIdsRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TList _list585 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.txnIds = new ArrayList<Long>(_list585.size);
+ long _elem586;
+ for (int _i587 = 0; _i587 < _list585.size; ++_i587)
+ {
+ _elem586 = iprot.readI64();
+ struct.txnIds.add(_elem586);
+ }
+ }
+ struct.setTxnIdsIsSet(true);
+ struct.dbName = iprot.readString();
+ struct.setDbNameIsSet(true);
+ struct.tableName = iprot.readString();
+ struct.setTableNameIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java
new file mode 100644
index 0000000..e29e1db
--- /dev/null
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java
@@ -0,0 +1,443 @@
+/**
+ * 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 AllocateTableWriteIdsResponse implements org.apache.thrift.TBase<AllocateTableWriteIdsResponse, AllocateTableWriteIdsResponse._Fields>, java.io.Serializable, Cloneable, Comparable<AllocateTableWriteIdsResponse> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AllocateTableWriteIdsResponse");
+
+ private static final org.apache.thrift.protocol.TField TXN_TO_WRITE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("txnToWriteIds", org.apache.thrift.protocol.TType.LIST, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new AllocateTableWriteIdsResponseStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new AllocateTableWriteIdsResponseTupleSchemeFactory());
+ }
+
+ private List<TxnToWriteId> txnToWriteIds; // 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 {
+ TXN_TO_WRITE_IDS((short)1, "txnToWriteIds");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TXN_TO_WRITE_IDS
+ return TXN_TO_WRITE_IDS;
+ 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.TXN_TO_WRITE_IDS, new org.apache.thrift.meta_data.FieldMetaData("txnToWriteIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TxnToWriteId.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AllocateTableWriteIdsResponse.class, metaDataMap);
+ }
+
+ public AllocateTableWriteIdsResponse() {
+ }
+
+ public AllocateTableWriteIdsResponse(
+ List<TxnToWriteId> txnToWriteIds)
+ {
+ this();
+ this.txnToWriteIds = txnToWriteIds;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AllocateTableWriteIdsResponse(AllocateTableWriteIdsResponse other) {
+ if (other.isSetTxnToWriteIds()) {
+ List<TxnToWriteId> __this__txnToWriteIds = new ArrayList<TxnToWriteId>(other.txnToWriteIds.size());
+ for (TxnToWriteId other_element : other.txnToWriteIds) {
+ __this__txnToWriteIds.add(new TxnToWriteId(other_element));
+ }
+ this.txnToWriteIds = __this__txnToWriteIds;
+ }
+ }
+
+ public AllocateTableWriteIdsResponse deepCopy() {
+ return new AllocateTableWriteIdsResponse(this);
+ }
+
+ @Override
+ public void clear() {
+ this.txnToWriteIds = null;
+ }
+
+ public int getTxnToWriteIdsSize() {
+ return (this.txnToWriteIds == null) ? 0 : this.txnToWriteIds.size();
+ }
+
+ public java.util.Iterator<TxnToWriteId> getTxnToWriteIdsIterator() {
+ return (this.txnToWriteIds == null) ? null : this.txnToWriteIds.iterator();
+ }
+
+ public void addToTxnToWriteIds(TxnToWriteId elem) {
+ if (this.txnToWriteIds == null) {
+ this.txnToWriteIds = new ArrayList<TxnToWriteId>();
+ }
+ this.txnToWriteIds.add(elem);
+ }
+
+ public List<TxnToWriteId> getTxnToWriteIds() {
+ return this.txnToWriteIds;
+ }
+
+ public void setTxnToWriteIds(List<TxnToWriteId> txnToWriteIds) {
+ this.txnToWriteIds = txnToWriteIds;
+ }
+
+ public void unsetTxnToWriteIds() {
+ this.txnToWriteIds = null;
+ }
+
+ /** Returns true if field txnToWriteIds is set (has been assigned a value) and false otherwise */
+ public boolean isSetTxnToWriteIds() {
+ return this.txnToWriteIds != null;
+ }
+
+ public void setTxnToWriteIdsIsSet(boolean value) {
+ if (!value) {
+ this.txnToWriteIds = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TXN_TO_WRITE_IDS:
+ if (value == null) {
+ unsetTxnToWriteIds();
+ } else {
+ setTxnToWriteIds((List<TxnToWriteId>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TXN_TO_WRITE_IDS:
+ return getTxnToWriteIds();
+
+ }
+ 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 TXN_TO_WRITE_IDS:
+ return isSetTxnToWriteIds();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AllocateTableWriteIdsResponse)
+ return this.equals((AllocateTableWriteIdsResponse)that);
+ return false;
+ }
+
+ public boolean equals(AllocateTableWriteIdsResponse that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_txnToWriteIds = true && this.isSetTxnToWriteIds();
+ boolean that_present_txnToWriteIds = true && that.isSetTxnToWriteIds();
+ if (this_present_txnToWriteIds || that_present_txnToWriteIds) {
+ if (!(this_present_txnToWriteIds && that_present_txnToWriteIds))
+ return false;
+ if (!this.txnToWriteIds.equals(that.txnToWriteIds))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_txnToWriteIds = true && (isSetTxnToWriteIds());
+ list.add(present_txnToWriteIds);
+ if (present_txnToWriteIds)
+ list.add(txnToWriteIds);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(AllocateTableWriteIdsResponse other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTxnToWriteIds()).compareTo(other.isSetTxnToWriteIds());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTxnToWriteIds()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnToWriteIds, other.txnToWriteIds);
+ 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("AllocateTableWriteIdsResponse(");
+ boolean first = true;
+
+ sb.append("txnToWriteIds:");
+ if (this.txnToWriteIds == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.txnToWriteIds);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTxnToWriteIds()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnToWriteIds' 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 {
+ 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 AllocateTableWriteIdsResponseStandardSchemeFactory implements SchemeFactory {
+ public AllocateTableWriteIdsResponseStandardScheme getScheme() {
+ return new AllocateTableWriteIdsResponseStandardScheme();
+ }
+ }
+
+ private static class AllocateTableWriteIdsResponseStandardScheme extends StandardScheme<AllocateTableWriteIdsResponse> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AllocateTableWriteIdsResponse 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: // TXN_TO_WRITE_IDS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list588 = iprot.readListBegin();
+ struct.txnToWriteIds = new ArrayList<TxnToWriteId>(_list588.size);
+ TxnToWriteId _elem589;
+ for (int _i590 = 0; _i590 < _list588.size; ++_i590)
+ {
+ _elem589 = new TxnToWriteId();
+ _elem589.read(iprot);
+ struct.txnToWriteIds.add(_elem589);
+ }
+ iprot.readListEnd();
+ }
+ struct.setTxnToWriteIdsIsSet(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, AllocateTableWriteIdsResponse struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.txnToWriteIds != null) {
+ oprot.writeFieldBegin(TXN_TO_WRITE_IDS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.txnToWriteIds.size()));
+ for (TxnToWriteId _iter591 : struct.txnToWriteIds)
+ {
+ _iter591.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class AllocateTableWriteIdsResponseTupleSchemeFactory implements SchemeFactory {
+ public AllocateTableWriteIdsResponseTupleScheme getScheme() {
+ return new AllocateTableWriteIdsResponseTupleScheme();
+ }
+ }
+
+ private static class AllocateTableWriteIdsResponseTupleScheme extends TupleScheme<AllocateTableWriteIdsResponse> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, AllocateTableWriteIdsResponse struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.txnToWriteIds.size());
+ for (TxnToWriteId _iter592 : struct.txnToWriteIds)
+ {
+ _iter592.write(oprot);
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, AllocateTableWriteIdsResponse struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TList _list593 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.txnToWriteIds = new ArrayList<TxnToWriteId>(_list593.size);
+ TxnToWriteId _elem594;
+ for (int _i595 = 0; _i595 < _list593.size; ++_i595)
+ {
+ _elem594 = new TxnToWriteId();
+ _elem594.read(iprot);
+ struct.txnToWriteIds.add(_elem594);
+ }
+ }
+ struct.setTxnToWriteIdsIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
index 16e85cf..ee9841f 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
@@ -351,13 +351,13 @@ import org.slf4j.LoggerFactory;
case 1: // FILE_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list706 = iprot.readListBegin();
- struct.fileIds = new ArrayList<Long>(_list706.size);
- long _elem707;
- for (int _i708 = 0; _i708 < _list706.size; ++_i708)
+ org.apache.thrift.protocol.TList _list746 = iprot.readListBegin();
+ struct.fileIds = new ArrayList<Long>(_list746.size);
+ long _elem747;
+ for (int _i748 = 0; _i748 < _list746.size; ++_i748)
{
- _elem707 = iprot.readI64();
- struct.fileIds.add(_elem707);
+ _elem747 = iprot.readI64();
+ struct.fileIds.add(_elem747);
}
iprot.readListEnd();
}
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
- for (long _iter709 : struct.fileIds)
+ for (long _iter749 : struct.fileIds)
{
- oprot.writeI64(_iter709);
+ oprot.writeI64(_iter749);
}
oprot.writeListEnd();
}
@@ -410,9 +410,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.fileIds.size());
- for (long _iter710 : struct.fileIds)
+ for (long _iter750 : struct.fileIds)
{
- oprot.writeI64(_iter710);
+ oprot.writeI64(_iter750);
}
}
}
@@ -421,13 +421,13 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list711 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.fileIds = new ArrayList<Long>(_list711.size);
- long _elem712;
- for (int _i713 = 0; _i713 < _list711.size; ++_i713)
+ org.apache.thrift.protocol.TList _list751 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.fileIds = new ArrayList<Long>(_list751.size);
+ long _elem752;
+ for (int _i753 = 0; _i753 < _list751.size; ++_i753)
{
- _elem712 = iprot.readI64();
- struct.fileIds.add(_elem712);
+ _elem752 = iprot.readI64();
+ struct.fileIds.add(_elem752);
}
}
struct.setFileIdsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java
index 816b61b..8dbe4c1 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java
@@ -354,13 +354,13 @@ import org.slf4j.LoggerFactory;
case 1: // VALUES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list722 = iprot.readListBegin();
- struct.values = new ArrayList<ClientCapability>(_list722.size);
- ClientCapability _elem723;
- for (int _i724 = 0; _i724 < _list722.size; ++_i724)
+ org.apache.thrift.protocol.TList _list762 = iprot.readListBegin();
+ struct.values = new ArrayList<ClientCapability>(_list762.size);
+ ClientCapability _elem763;
+ for (int _i764 = 0; _i764 < _list762.size; ++_i764)
{
- _elem723 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32());
- struct.values.add(_elem723);
+ _elem763 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32());
+ struct.values.add(_elem763);
}
iprot.readListEnd();
}
@@ -386,9 +386,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(VALUES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.values.size()));
- for (ClientCapability _iter725 : struct.values)
+ for (ClientCapability _iter765 : struct.values)
{
- oprot.writeI32(_iter725.getValue());
+ oprot.writeI32(_iter765.getValue());
}
oprot.writeListEnd();
}
@@ -413,9 +413,9 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.values.size());
- for (ClientCapability _iter726 : struct.values)
+ for (ClientCapability _iter766 : struct.values)
{
- oprot.writeI32(_iter726.getValue());
+ oprot.writeI32(_iter766.getValue());
}
}
}
@@ -424,13 +424,13 @@ import org.slf4j.LoggerFactory;
public void read(org.apache.thrift.protocol.TProtocol prot, ClientCapabilities struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list727 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.values = new ArrayList<ClientCapability>(_list727.size);
- ClientCapability _elem728;
- for (int _i729 = 0; _i729 < _list727.size; ++_i729)
+ org.apache.thrift.protocol.TList _list767 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
+ struct.values = new ArrayList<ClientCapability>(_list767.size);
+ ClientCapability _elem768;
+ for (int _i769 = 0; _i769 < _list767.size; ++_i769)
{
- _elem728 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32());
- struct.values.add(_elem728);
+ _elem768 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32());
+ struct.values.add(_elem768);
}
}
struct.setValuesIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java
index 6da2b88..1853720 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java
@@ -814,15 +814,15 @@ import org.slf4j.LoggerFactory;
case 6: // PROPERTIES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map588 = iprot.readMapBegin();
- struct.properties = new HashMap<String,String>(2*_map588.size);
- String _key589;
- String _val590;
- for (int _i591 = 0; _i591 < _map588.size; ++_i591)
+ org.apache.thrift.protocol.TMap _map628 = iprot.readMapBegin();
+ struct.properties = new HashMap<String,String>(2*_map628.size);
+ String _key629;
+ String _val630;
+ for (int _i631 = 0; _i631 < _map628.size; ++_i631)
{
- _key589 = iprot.readString();
- _val590 = iprot.readString();
- struct.properties.put(_key589, _val590);
+ _key629 = iprot.readString();
+ _val630 = iprot.readString();
+ struct.properties.put(_key629, _val630);
}
iprot.readMapEnd();
}
@@ -878,10 +878,10 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
- for (Map.Entry<String, String> _iter592 : struct.properties.entrySet())
+ for (Map.Entry<String, String> _iter632 : struct.properties.entrySet())
{
- oprot.writeString(_iter592.getKey());
- oprot.writeString(_iter592.getValue());
+ oprot.writeString(_iter632.getKey());
+ oprot.writeString(_iter632.getValue());
}
oprot.writeMapEnd();
}
@@ -928,10 +928,10 @@ import org.slf4j.LoggerFactory;
if (struct.isSetProperties()) {
{
oprot.writeI32(struct.properties.size());
- for (Map.Entry<String, String> _iter593 : struct.properties.entrySet())
+ for (Map.Entry<String, String> _iter633 : struct.properties.entrySet())
{
- oprot.writeString(_iter593.getKey());
- oprot.writeString(_iter593.getValue());
+ oprot.writeString(_iter633.getKey());
+ oprot.writeString(_iter633.getValue());
}
}
}
@@ -957,15 +957,15 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TMap _map594 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.properties = new HashMap<String,String>(2*_map594.size);
- String _key595;
- String _val596;
- for (int _i597 = 0; _i597 < _map594.size; ++_i597)
+ org.apache.thrift.protocol.TMap _map634 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.properties = new HashMap<String,String>(2*_map634.size);
+ String _key635;
+ String _val636;
+ for (int _i637 = 0; _i637 < _map634.size; ++_i637)
{
- _key595 = iprot.readString();
- _val596 = iprot.readString();
- struct.properties.put(_key595, _val596);
+ _key635 = iprot.readString();
+ _val636 = iprot.readString();
+ struct.properties.put(_key635, _val636);
}
}
struct.setPropertiesIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java
index 74cfce6..717840f 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java
@@ -619,13 +619,13 @@ import org.slf4j.LoggerFactory;
case 3: // TABLES_USED
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
- org.apache.thrift.protocol.TSet _set614 = iprot.readSetBegin();
- struct.tablesUsed = new HashSet<String>(2*_set614.size);
- String _elem615;
- for (int _i616 = 0; _i616 < _set614.size; ++_i616)
+ org.apache.thrift.protocol.TSet _set654 = iprot.readSetBegin();
+ struct.tablesUsed = new HashSet<String>(2*_set654.size);
+ String _elem655;
+ for (int _i656 = 0; _i656 < _set654.size; ++_i656)
{
- _elem615 = iprot.readString();
- struct.tablesUsed.add(_elem615);
+ _elem655 = iprot.readString();
+ struct.tablesUsed.add(_elem655);
}
iprot.readSetEnd();
}
@@ -669,9 +669,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(TABLES_USED_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.tablesUsed.size()));
- for (String _iter617 : struct.tablesUsed)
+ for (String _iter657 : struct.tablesUsed)
{
- oprot.writeString(_iter617);
+ oprot.writeString(_iter657);
}
oprot.writeSetEnd();
}
@@ -705,9 +705,9 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.tblName);
{
oprot.writeI32(struct.tablesUsed.size());
- for (String _iter618 : struct.tablesUsed)
+ for (String _iter658 : struct.tablesUsed)
{
- oprot.writeString(_iter618);
+ oprot.writeString(_iter658);
}
}
BitSet optionals = new BitSet();
@@ -728,13 +728,13 @@ import org.slf4j.LoggerFactory;
struct.tblName = iprot.readString();
struct.setTblNameIsSet(true);
{
- org.apache.thrift.protocol.TSet _set619 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tablesUsed = new HashSet<String>(2*_set619.size);
- String _elem620;
- for (int _i621 = 0; _i621 < _set619.size; ++_i621)
+ org.apache.thrift.protocol.TSet _set659 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.tablesUsed = new HashSet<String>(2*_set659.size);
+ String _elem660;
+ for (int _i661 = 0; _i661 < _set659.size; ++_i661)
{
- _elem620 = iprot.readString();
- struct.tablesUsed.add(_elem620);
+ _elem660 = iprot.readString();
+ struct.tablesUsed.add(_elem660);
}
}
struct.setTablesUsedIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
index 7cc201b..8936410 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
@@ -713,13 +713,13 @@ import org.slf4j.LoggerFactory;
case 5: // PARTITION_VALS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list646 = iprot.readListBegin();
- struct.partitionVals = new ArrayList<String>(_list646.size);
- String _elem647;
- for (int _i648 = 0; _i648 < _list646.size; ++_i648)
+ org.apache.thrift.protocol.TList _list686 = iprot.readListBegin();
+ struct.partitionVals = new ArrayList<String>(_list686.size);
+ String _elem687;
+ for (int _i688 = 0; _i688 < _list686.size; ++_i688)
{
- _elem647 = iprot.readString();
- struct.partitionVals.add(_elem647);
+ _elem687 = iprot.readString();
+ struct.partitionVals.add(_elem687);
}
iprot.readListEnd();
}
@@ -768,9 +768,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(PARTITION_VALS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionVals.size()));
- for (String _iter649 : struct.partitionVals)
+ for (String _iter689 : struct.partitionVals)
{
- oprot.writeString(_iter649);
+ oprot.writeString(_iter689);
}
oprot.writeListEnd();
}
@@ -816,9 +816,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetPartitionVals()) {
{
oprot.writeI32(struct.partitionVals.size());
- for (String _iter650 : struct.partitionVals)
+ for (String _iter690 : struct.partitionVals)
{
- oprot.writeString(_iter650);
+ oprot.writeString(_iter690);
}
}
}
@@ -843,13 +843,13 @@ import org.slf4j.LoggerFactory;
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list651 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.partitionVals = new ArrayList<String>(_list651.size);
- String _elem652;
- for (int _i653 = 0; _i653 < _list651.size; ++_i653)
+ org.apache.thrift.protocol.TList _list691 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.partitionVals = new ArrayList<String>(_list691.size);
+ String _elem692;
+ for (int _i693 = 0; _i693 < _list691.size; ++_i693)
{
- _elem652 = iprot.readString();
- struct.partitionVals.add(_elem652);
+ _elem692 = iprot.readString();
+ struct.partitionVals.add(_elem692);
}
}
struct.setPartitionValsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
index 2b4883d..ba29e90 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
@@ -346,14 +346,14 @@ import org.slf4j.LoggerFactory;
case 1: // FUNCTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list714 = iprot.readListBegin();
- struct.functions = new ArrayList<Function>(_list714.size);
- Function _elem715;
- for (int _i716 = 0; _i716 < _list714.size; ++_i716)
+ org.apache.thrift.protocol.TList _list754 = iprot.readListBegin();
+ struct.functions = new ArrayList<Function>(_list754.size);
+ Function _elem755;
+ for (int _i756 = 0; _i756 < _list754.size; ++_i756)
{
- _elem715 = new Function();
- _elem715.read(iprot);
- struct.functions.add(_elem715);
+ _elem755 = new Function();
+ _elem755.read(iprot);
+ struct.functions.add(_elem755);
}
iprot.readListEnd();
}
@@ -380,9 +380,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(FUNCTIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.functions.size()));
- for (Function _iter717 : struct.functions)
+ for (Function _iter757 : struct.functions)
{
- _iter717.write(oprot);
+ _iter757.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
if (struct.isSetFunctions()) {
{
oprot.writeI32(struct.functions.size());
- for (Function _iter718 : struct.functions)
+ for (Function _iter758 : struct.functions)
{
- _iter718.write(oprot);
+ _iter758.write(oprot);
}
}
}
@@ -428,14 +428,14 @@ import org.slf4j.LoggerFactory;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list719 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.functions = new ArrayList<Function>(_list719.size);
- Function _elem720;
- for (int _i721 = 0; _i721 < _list719.size; ++_i721)
+ org.apache.thrift.protocol.TList _list759 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.functions = new ArrayList<Function>(_list759.size);
+ Function _elem760;
+ for (int _i761 = 0; _i761 < _list759.size; ++_i761)
{
- _elem720 = new Function();
- _elem720.read(iprot);
- struct.functions.add(_elem720);
+ _elem760 = new Function();
+ _elem760.read(iprot);
+ struct.functions.add(_elem760);
}
}
struct.setFunctionsIsSet(true);
[16/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
index ddbbd1a..38358f2 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
@@ -89,14 +89,14 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
/**the insert creates 2 output files (presumably because there are 2 input files)
* The number in the file name is writerId. This is the number encoded in ROW__ID.bucketId -
* see {@link org.apache.hadoop.hive.ql.io.BucketCodec}*/
- Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t0\t"));
- Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nobuckets/delta_0000019_0000019_0000/bucket_00000"));
- Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":1}\t3\t3\t3\t"));
- Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nobuckets/delta_0000019_0000019_0000/bucket_00000"));
- Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":19,\"bucketid\":536936448,\"rowid\":0}\t1\t1\t1\t"));
- Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nobuckets/delta_0000019_0000019_0000/bucket_00001"));
- Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":19,\"bucketid\":536936448,\"rowid\":1}\t2\t2\t2\t"));
- Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nobuckets/delta_0000019_0000019_0000/bucket_00001"));
+ Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t0\t"));
+ Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nobuckets/delta_0000001_0000001_0000/bucket_00000"));
+ Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t3\t3\t"));
+ Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nobuckets/delta_0000001_0000001_0000/bucket_00000"));
+ Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t1\t1\t"));
+ Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nobuckets/delta_0000001_0000001_0000/bucket_00001"));
+ Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":1}\t2\t2\t2\t"));
+ Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nobuckets/delta_0000001_0000001_0000/bucket_00001"));
runStatementOnDriver("update nobuckets set c3 = 17 where c3 in(0,1)");
rs = runStatementOnDriver("select ROW__ID, c1, c2, c3, INPUT__FILE__NAME from nobuckets order by INPUT__FILE__NAME, ROW__ID");
@@ -104,22 +104,22 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
for(String s : rs) {
LOG.warn(s);
}
- Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":1}\t3\t3\t3\t"));
- Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nobuckets/delta_0000019_0000019_0000/bucket_00000"));
- Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":19,\"bucketid\":536936448,\"rowid\":1}\t2\t2\t2\t"));
- Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nobuckets/delta_0000019_0000019_0000/bucket_00001"));
+ Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t3\t3\t"));
+ Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nobuckets/delta_0000001_0000001_0000/bucket_00000"));
+ Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":1}\t2\t2\t2\t"));
+ Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nobuckets/delta_0000001_0000001_0000/bucket_00001"));
//so update has 1 writer which creates bucket0 where both new rows land
- Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t17\t"));
- Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nobuckets/delta_0000021_0000021_0000/bucket_00000"));
- Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t17\t"));
- Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nobuckets/delta_0000021_0000021_0000/bucket_00000"));
+ Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t17\t"));
+ Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nobuckets/delta_0000002_0000002_0000/bucket_00000"));
+ Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t17\t"));
+ Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nobuckets/delta_0000002_0000002_0000/bucket_00000"));
Set<String> expectedFiles = new HashSet<>();
//both delete events land in a single bucket0. Each has a different ROW__ID.bucketId value (even writerId in it is different)
- expectedFiles.add("ts/delete_delta_0000021_0000021_0000/bucket_00000");
- expectedFiles.add("nobuckets/delta_0000019_0000019_0000/bucket_00000");
- expectedFiles.add("nobuckets/delta_0000019_0000019_0000/bucket_00001");
- expectedFiles.add("nobuckets/delta_0000021_0000021_0000/bucket_00000");
+ expectedFiles.add("ts/delete_delta_0000002_0000002_0000/bucket_00000");
+ expectedFiles.add("nobuckets/delta_0000001_0000001_0000/bucket_00000");
+ expectedFiles.add("nobuckets/delta_0000001_0000001_0000/bucket_00001");
+ expectedFiles.add("nobuckets/delta_0000002_0000002_0000/bucket_00000");
//check that we get the right files on disk
assertExpectedFileSet(expectedFiles, getWarehouseDir() + "/nobuckets");
//todo: it would be nice to check the contents of the files... could use orc.FileDump - it has
@@ -133,33 +133,33 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
LOG.warn(s);
}
/*
-├── base_0000021
+├── base_0000002
│  ├── bucket_00000
│  └── bucket_00001
-├── delete_delta_0000021_0000021_0000
+├── delete_delta_0000002_0000002_0000
│  └── bucket_00000
-├── delta_0000019_0000019_0000
+├── delta_0000001_0000001_0000
│  ├── bucket_00000
│  └── bucket_00001
-└── delta_0000021_0000021_0000
+└── delta_0000002_0000002_0000
└── bucket_00000
*/
- Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":1}\t3\t3\t3\t"));
- Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nobuckets/base_0000021/bucket_00000"));
- Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t17\t"));
- Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nobuckets/base_0000021/bucket_00000"));
- Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t17\t"));
- Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nobuckets/base_0000021/bucket_00000"));
- Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":19,\"bucketid\":536936448,\"rowid\":1}\t2\t2\t2\t"));
- Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nobuckets/base_0000021/bucket_00001"));
+ Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t3\t3\t"));
+ Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nobuckets/base_0000002/bucket_00000"));
+ Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t17\t"));
+ Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nobuckets/base_0000002/bucket_00000"));
+ Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t17\t"));
+ Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nobuckets/base_0000002/bucket_00000"));
+ Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":1}\t2\t2\t2\t"));
+ Assert.assertTrue(rs.get(3), rs.get(3).endsWith("nobuckets/base_0000002/bucket_00001"));
expectedFiles.clear();
- expectedFiles.add("delete_delta_0000021_0000021_0000/bucket_00000");
- expectedFiles.add("uckets/delta_0000019_0000019_0000/bucket_00000");
- expectedFiles.add("uckets/delta_0000019_0000019_0000/bucket_00001");
- expectedFiles.add("uckets/delta_0000021_0000021_0000/bucket_00000");
- expectedFiles.add("/warehouse/nobuckets/base_0000021/bucket_00000");
- expectedFiles.add("/warehouse/nobuckets/base_0000021/bucket_00001");
+ expectedFiles.add("delete_delta_0000002_0000002_0000/bucket_00000");
+ expectedFiles.add("uckets/delta_0000001_0000001_0000/bucket_00000");
+ expectedFiles.add("uckets/delta_0000001_0000001_0000/bucket_00001");
+ expectedFiles.add("uckets/delta_0000002_0000002_0000/bucket_00000");
+ expectedFiles.add("/warehouse/nobuckets/base_0000002/bucket_00000");
+ expectedFiles.add("/warehouse/nobuckets/base_0000002/bucket_00001");
assertExpectedFileSet(expectedFiles, getWarehouseDir() + "/nobuckets");
TestTxnCommands2.runCleaner(hiveConf);
@@ -168,8 +168,8 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
Assert.assertEquals("Unexpected result after clean", stringifyValues(result), rs);
expectedFiles.clear();
- expectedFiles.add("nobuckets/base_0000021/bucket_00000");
- expectedFiles.add("nobuckets/base_0000021/bucket_00001");
+ expectedFiles.add("nobuckets/base_0000002/bucket_00000");
+ expectedFiles.add("nobuckets/base_0000002/bucket_00001");
assertExpectedFileSet(expectedFiles, getWarehouseDir() + "/nobuckets");
}
@@ -185,8 +185,8 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
"'='true', 'transactional_properties'='default') as select a, b from " + Table.NONACIDORCTBL);
List<String> rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from myctas order by ROW__ID");
String expected[][] = {
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas/delta_0000015_0000015_0000/bucket_00000"},
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas/delta_0000015_0000015_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas/delta_0000001_0000001_0000/bucket_00000"},
};
checkExpected(rs, expected, "Unexpected row count after ctas from non acid table");
@@ -195,8 +195,8 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
"'='true', 'transactional_properties'='default') as select a, b from " + Table.ACIDTBL);//todo: try this with acid default - it seem makeing table acid in listener is too late
rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from myctas2 order by ROW__ID");
String expected2[][] = {
- {"{\"transactionid\":18,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas2/delta_0000018_0000018_0000/bucket_00000"},
- {"{\"transactionid\":18,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas2/delta_0000018_0000018_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas2/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas2/delta_0000001_0000001_0000/bucket_00000"}
};
checkExpected(rs, expected2, "Unexpected row count after ctas from acid table");
@@ -205,10 +205,10 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
" union all select a, b from " + Table.ACIDTBL);
rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from myctas3 order by ROW__ID");
String expected3[][] = {
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas3/delta_0000020_0000020_0000/bucket_00000"},
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas3/delta_0000020_0000020_0000/bucket_00000"},
- {"{\"transactionid\":20,\"bucketid\":536936448,\"rowid\":0}\t3\t4", "warehouse/myctas3/delta_0000020_0000020_0000/bucket_00001"},
- {"{\"transactionid\":20,\"bucketid\":536936448,\"rowid\":1}\t1\t2", "warehouse/myctas3/delta_0000020_0000020_0000/bucket_00001"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":0}\t3\t4", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00001"},
+ {"{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":1}\t1\t2", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00001"},
};
checkExpected(rs, expected3, "Unexpected row count after ctas from union all query");
@@ -217,8 +217,8 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
" union distinct select a, b from " + Table.ACIDTBL);
rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from myctas4 order by ROW__ID");
String expected4[][] = {
- {"{\"transactionid\":22,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "/delta_0000022_0000022_0000/bucket_00000"},
- {"{\"transactionid\":22,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "/delta_0000022_0000022_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "/delta_0000001_0000001_0000/bucket_00000"},
};
checkExpected(rs, expected4, "Unexpected row count after ctas from union distinct query");
}
@@ -268,11 +268,11 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
List<String> rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from T order by ROW__ID");
String expected[][] = {
- {"{\"transactionid\":16,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "/delta_0000016_0000016_0001/bucket_00000"},
- {"{\"transactionid\":16,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "/delta_0000016_0000016_0001/bucket_00000"},
- {"{\"transactionid\":16,\"bucketid\":536870914,\"rowid\":0}\t7\t8", "/delta_0000016_0000016_0002/bucket_00000"},
- {"{\"transactionid\":16,\"bucketid\":536870914,\"rowid\":1}\t5\t6", "/delta_0000016_0000016_0002/bucket_00000"},
- {"{\"transactionid\":16,\"bucketid\":536870915,\"rowid\":0}\t9\t10", "/delta_0000016_0000016_0003/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870914,\"rowid\":0}\t7\t8", "/delta_0000001_0000001_0002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870914,\"rowid\":1}\t5\t6", "/delta_0000001_0000001_0002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870915,\"rowid\":0}\t9\t10", "/delta_0000001_0000001_0003/bucket_00000"},
};
checkExpected(rs, expected, "Unexpected row count after ctas");
}
@@ -304,12 +304,12 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
//previous insert+union creates 3 data files (0-3)
//insert (12,12) creates 000000_0_copy_1
String expected[][] = {
- {"1\t2", "warehouse/t/000002_0"},
- {"2\t4", "warehouse/t/000002_0"},
- {"5\t6", "warehouse/t/000001_0"},
- {"6\t8", "warehouse/t/000000_0"},
- {"9\t10", "warehouse/t/000001_0"},
- {"12\t12", "warehouse/t/000000_0_copy_1"}
+ {"1\t2", "warehouse/t/000002_0"},
+ {"2\t4", "warehouse/t/000002_0"},
+ {"5\t6", "warehouse/t/000000_0"},
+ {"6\t8", "warehouse/t/000001_0"},
+ {"9\t10", "warehouse/t/000000_0"},
+ {"12\t12", "warehouse/t/000000_0_copy_1"}
};
checkExpected(rs, expected,"before converting to acid");
@@ -323,16 +323,16 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
" where a between 5 and 7");
//now we have a table with data files at multiple different levels.
String expected1[][] = {
- {"1\t2", "warehouse/t/000002_0"},
- {"2\t4", "warehouse/t/000002_0"},
- {"5\t6", "warehouse/t/000001_0"},
- {"6\t8", "warehouse/t/000000_0"},
- {"9\t10", "warehouse/t/000001_0"},
- {"10\t20", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
- {"12\t12", "warehouse/t/000000_0_copy_1"},
- {"20\t40", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
- {"50\t60", "warehouse/t/HIVE_UNION_SUBDIR_16/000000_0"},
- {"60\t80", "warehouse/t/HIVE_UNION_SUBDIR_16/000001_0"}
+ {"1\t2", "warehouse/t/000002_0"},
+ {"2\t4", "warehouse/t/000002_0"},
+ {"5\t6", "warehouse/t/000000_0"},
+ {"6\t8", "warehouse/t/000001_0"},
+ {"9\t10", "warehouse/t/000000_0"},
+ {"10\t20", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
+ {"12\t12", "warehouse/t/000000_0_copy_1"},
+ {"20\t40", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
+ {"50\t60", "warehouse/t/HIVE_UNION_SUBDIR_16/000000_0"},
+ {"60\t80", "warehouse/t/HIVE_UNION_SUBDIR_16/000001_0"}
};
rs = runStatementOnDriver("select a, b, INPUT__FILE__NAME from T order by a, b, INPUT__FILE__NAME");
checkExpected(rs, expected1,"before converting to acid (with multi level data layout)");
@@ -347,16 +347,16 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
logical bucket (tranche)
*/
String expected2[][] = {
- {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":0}\t1\t2", "warehouse/t/000002_0"},
- {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":1}\t2\t4", "warehouse/t/000002_0"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t5\t6", "warehouse/t/000001_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t6\t8", "warehouse/t/000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":0}\t9\t10", "warehouse/t/000001_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}\t10\t20", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t12\t12", "warehouse/t/000000_0_copy_1"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t20\t40", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t50\t60", "warehouse/t/HIVE_UNION_SUBDIR_16/000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":2}\t60\t80", "warehouse/t/HIVE_UNION_SUBDIR_16/000001_0"},
+ {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":0}\t1\t2", "warehouse/t/000002_0"},
+ {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":1}\t2\t4", "warehouse/t/000002_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t5\t6", "warehouse/t/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":0}\t6\t8", "warehouse/t/000001_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t9\t10", "warehouse/t/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t10\t20", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}\t12\t12", "warehouse/t/000000_0_copy_1"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t20\t40", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":5}\t50\t60", "warehouse/t/HIVE_UNION_SUBDIR_16/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t60\t80", "warehouse/t/HIVE_UNION_SUBDIR_16/000001_0"},
};
checkExpected(rs, expected2,"after converting to acid (no compaction)");
Assert.assertEquals(0, BucketCodec.determineVersion(536870912).decodeWriterId(536870912));
@@ -368,15 +368,15 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
assertVectorized(shouldVectorize(), "delete from T where b = 8");
runStatementOnDriver("delete from T where b = 8");
String expected3[][] = {
- {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":0}\t1\t2", "warehouse/t/000002_0"},
- {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":1}\t2\t4", "warehouse/t/000002_0"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t5\t6", "warehouse/t/000001_0"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":0}\t9\t10", "warehouse/t/000001_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}\t10\t20", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t12\t12", "warehouse/t/000000_0_copy_1"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t20\t40", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t50\t60", "warehouse/t/HIVE_UNION_SUBDIR_16/000000_0"},
- {"{\"transactionid\":24,\"bucketid\":536870912,\"rowid\":0}\t60\t88", "warehouse/t/delta_0000024_0000024_0000/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":0}\t1\t2", "warehouse/t/000002_0"},
+ {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":1}\t2\t4", "warehouse/t/000002_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t5\t6", "warehouse/t/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t9\t10", "warehouse/t/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t10\t20", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}\t12\t12", "warehouse/t/000000_0_copy_1"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t20\t40", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":5}\t50\t60", "warehouse/t/HIVE_UNION_SUBDIR_16/000000_0"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t60\t88", "warehouse/t/delta_0000001_0000001_0000/bucket_00000"},
};
rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from T order by a, b, INPUT__FILE__NAME");
checkExpected(rs, expected3,"after converting to acid (no compaction with updates)");
@@ -388,15 +388,15 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
/*Compaction preserves location of rows wrt buckets/tranches (for now)*/
String expected4[][] = {
- {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":0}\t1\t2", "warehouse/t/base_0000026/bucket_00002"},
- {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":1}\t2\t4", "warehouse/t/base_0000026/bucket_00002"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":1}\t5\t6", "warehouse/t/base_0000026/bucket_00001"},
- {"{\"transactionid\":0,\"bucketid\":536936448,\"rowid\":0}\t9\t10", "warehouse/t/base_0000026/bucket_00001"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}\t10\t20", "warehouse/t/base_0000026/bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t12\t12", "warehouse/t/base_0000026/bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t20\t40", "warehouse/t/base_0000026/bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t50\t60", "warehouse/t/base_0000026/bucket_00000"},
- {"{\"transactionid\":24,\"bucketid\":536870912,\"rowid\":0}\t60\t88", "warehouse/t/base_0000026/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":0}\t1\t2", "warehouse/t/base_0000002/bucket_00002"},
+ {"{\"transactionid\":0,\"bucketid\":537001984,\"rowid\":1}\t2\t4", "warehouse/t/base_0000002/bucket_00002"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t5\t6", "warehouse/t/base_0000002/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t9\t10", "warehouse/t/base_0000002/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t10\t20", "warehouse/t/base_0000002/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}\t12\t12", "warehouse/t/base_0000002/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t20\t40", "warehouse/t/base_0000002/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":5}\t50\t60", "warehouse/t/base_0000002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t60\t88", "warehouse/t/base_0000002/bucket_00000"},
};
checkExpected(rs, expected4,"after major compact");
}
@@ -414,14 +414,14 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
}
/*
The number of writers seems to be based on number of MR jobs for the src query. todo check number of FileSinks
- warehouse/t/.hive-staging_hive_2017-09-13_08-59-28_141_6304543600372946004-1/-ext-10000/000000_0/delta_0000016_0000016_0000/bucket_00000 [length: 648]
- {"operation":0,"originalTransaction":16,"bucket":536870912,"rowId":0,"currentTransaction":16,"row":{"_col0":1,"_col1":2}}
- {"operation":0,"originalTransaction":16,"bucket":536870912,"rowId":1,"currentTransaction":16,"row":{"_col0":2,"_col1":4}}
+ warehouse/t/.hive-staging_hive_2017-09-13_08-59-28_141_6304543600372946004-1/-ext-10000/000000_0/delta_0000001_0000001_0000/bucket_00000 [length: 648]
+ {"operation":0,"originalTransaction":1,"bucket":536870912,"rowId":0,"currentTransaction":1,"row":{"_col0":1,"_col1":2}}
+ {"operation":0,"originalTransaction":1,"bucket":536870912,"rowId":1,"currentTransaction":1,"row":{"_col0":2,"_col1":4}}
________________________________________________________________________________________________________________________
- warehouse/t/.hive-staging_hive_2017-09-13_08-59-28_141_6304543600372946004-1/-ext-10000/000001_0/delta_0000016_0000016_0000/bucket_00001 [length: 658]
- {"operation":0,"originalTransaction":16,"bucket":536936448,"rowId":0,"currentTransaction":16,"row":{"_col0":5,"_col1":6}}
- {"operation":0,"originalTransaction":16,"bucket":536936448,"rowId":1,"currentTransaction":16,"row":{"_col0":6,"_col1":8}}
- {"operation":0,"originalTransaction":16,"bucket":536936448,"rowId":2,"currentTransaction":16,"row":{"_col0":9,"_col1":10}}
+ warehouse/t/.hive-staging_hive_2017-09-13_08-59-28_141_6304543600372946004-1/-ext-10000/000001_0/delta_0000001_0000001_0000/bucket_00001 [length: 658]
+ {"operation":0,"originalTransaction":1,"bucket":536936448,"rowId":0,"currentTransaction":1,"row":{"_col0":5,"_col1":6}}
+ {"operation":0,"originalTransaction":1,"bucket":536936448,"rowId":1,"currentTransaction":1,"row":{"_col0":6,"_col1":8}}
+ {"operation":0,"originalTransaction":1,"bucket":536936448,"rowId":2,"currentTransaction":1,"row":{"_col0":9,"_col1":10}}
*/
rs = runStatementOnDriver("select a, b from T order by a, b");
Assert.assertEquals(stringifyValues(values), rs);
@@ -468,15 +468,15 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
* Also check the file name (only) after compaction for completeness
*/
String[][] expected = {
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t0\t13", "bucket_00000", "000000_0_copy_1"},
- {"{\"transactionid\":18,\"bucketid\":536870912,\"rowid\":0}\t0\t15", "bucket_00000", "bucket_00000"},
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":0}\t0\t17", "bucket_00000", "bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":0}\t0\t120", "bucket_00000", "bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "bucket_00000", "000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t1\t4", "bucket_00000", "000000_0_copy_1"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":5}\t1\t5", "bucket_00000", "000000_0_copy_1"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":6}\t1\t6", "bucket_00000", "000000_0_copy_2"},
- {"{\"transactionid\":18,\"bucketid\":536870912,\"rowid\":1}\t1\t16", "bucket_00000", "bucket_00000"}
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t0\t13", "bucket_00000", "000000_0_copy_1"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t15", "bucket_00000", "bucket_00000"},
+ {"{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":0}\t0\t17", "bucket_00000", "bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t0\t120", "bucket_00000", "bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "bucket_00000", "000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t1\t4", "bucket_00000", "000000_0_copy_1"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":5}\t1\t5", "bucket_00000", "000000_0_copy_1"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":6}\t1\t6", "bucket_00000", "000000_0_copy_2"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t16", "bucket_00000", "bucket_00000"}
};
Assert.assertEquals("Unexpected row count before compaction", expected.length, rs.size());
for(int i = 0; i < expected.length; i++) {
@@ -491,17 +491,17 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
├── 000000_0
├── 000000_0_copy_1
├── 000000_0_copy_2
- ├── base_0000021
+ ├── base_0000004
│  └── bucket_00000
- ├── delete_delta_0000019_0000019_0000
+ ├── delete_delta_0000002_0000002_0000
│  └── bucket_00000
- ├── delete_delta_0000021_0000021_0000
+ ├── delete_delta_0000004_0000004_0000
│  └── bucket_00000
- ├── delta_0000018_0000018_0000
+ ├── delta_0000001_0000001_0000
│  └── bucket_00000
- ├── delta_0000019_0000019_0000
+ ├── delta_0000002_0000002_0000
│  └── bucket_00000
- └── delta_0000020_0000020_0000
+ └── delta_0000003_0000003_0000
└── bucket_00000
6 directories, 9 files
@@ -569,8 +569,8 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
query = "select ROW__ID, a from T where b > 6 order by a";
rs = runStatementOnDriver(query);
String[][] expected1 = {
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}", "6"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}", "9"}
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}", "6"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}", "9"}
};
checkExpected(rs, expected1, "After conversion with VC1");
assertVectorized(shouldVectorize(), query);
@@ -579,11 +579,11 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
query = "select ROW__ID, a from T where b > 0 order by a";
rs = runStatementOnDriver(query);
String[][] expected2 = {
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}", "1"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}", "2"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}", "5"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}", "6"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}", "9"}
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}", "1"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}", "2"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}", "5"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}", "6"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}", "9"}
};
checkExpected(rs, expected2, "After conversion with VC2");
assertVectorized(shouldVectorize(), query);
@@ -593,8 +593,8 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
rs = runStatementOnDriver(query);
Assert.assertEquals("", 2, rs.size());
String[][] expected3 = {
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t6", "warehouse/t/000000_0"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t9", "warehouse/t/000000_0"}
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t6", "warehouse/t/000000_0"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t9", "warehouse/t/000000_0"}
};
checkExpected(rs, expected3, "After non-vectorized read");
Assert.assertEquals(0, BucketCodec.determineVersion(536870912).decodeWriterId(536870912));
@@ -606,11 +606,11 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
query = "select ROW__ID, b from T where b > 0 order by a";
rs = runStatementOnDriver(query);
String[][] expected4 = {
- {"{\"transactionid\":25,\"bucketid\":536870912,\"rowid\":0}","17"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}","4"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}","6"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}","8"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}","10"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}","17"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}","4"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}","6"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}","8"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}","10"}
};
checkExpected(rs, expected4, "After conversion with VC4");
assertVectorized(shouldVectorize(), query);
@@ -627,11 +627,11 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
query = "select ROW__ID, a, b, INPUT__FILE__NAME from T where b > 0 order by a, b";
rs = runStatementOnDriver(query);
String[][] expected5 = {//the row__ids are the same after compaction
- {"{\"transactionid\":25,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "warehouse/t/base_0000025/bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t2\t4", "warehouse/t/base_0000025/bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}\t5\t6", "warehouse/t/base_0000025/bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t6\t8", "warehouse/t/base_0000025/bucket_00000"},
- {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t9\t10", "warehouse/t/base_0000025/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t17", "warehouse/t/base_0000001/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t2\t4", "warehouse/t/base_0000001/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":2}\t5\t6", "warehouse/t/base_0000001/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t6\t8", "warehouse/t/base_0000001/bucket_00000"},
+ {"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":4}\t9\t10", "warehouse/t/base_0000001/bucket_00000"}
};
checkExpected(rs, expected5, "After major compaction");
//vectorized because there is INPUT__FILE__NAME
@@ -671,14 +671,14 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
String query = "select ROW__ID, p, q, a, b, INPUT__FILE__NAME from T order by p, q, a, b";
List<String> rs = runStatementOnDriver(query);
String[][] expected = {
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t4\t1", "t/p=1/q=1/delta_0000015_0000015_0000/bucket_00000"},
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t4\t3", "t/p=1/q=1/delta_0000015_0000015_0000/bucket_00000"},
- {"{\"transactionid\":17,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t5\t1", "t/p=1/q=1/delta_0000017_0000017_0000/bucket_00000"},
- {"{\"transactionid\":17,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t5\t3", "t/p=1/q=1/delta_0000017_0000017_0000/bucket_00000"},
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t4\t2", "t/p=1/q=2/delta_0000015_0000015_0000/bucket_00000"},
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4\t4", "t/p=1/q=2/delta_0000015_0000015_0000/bucket_00000"},
- {"{\"transactionid\":17,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t5\t2", "t/p=1/q=2/delta_0000017_0000017_0000/bucket_00000"},
- {"{\"transactionid\":17,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t5\t4", "t/p=1/q=2/delta_0000017_0000017_0000/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t4\t1", "t/p=1/q=1/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t4\t3", "t/p=1/q=1/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t5\t1", "t/p=1/q=1/delta_0000002_0000002_0000/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t5\t3", "t/p=1/q=1/delta_0000002_0000002_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t4\t2", "t/p=1/q=2/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4\t4", "t/p=1/q=2/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t5\t2", "t/p=1/q=2/delta_0000002_0000002_0000/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t5\t4", "t/p=1/q=2/delta_0000002_0000002_0000/bucket_00000"}
};
checkExpected(rs, expected, "insert data");
@@ -689,14 +689,14 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
query = "select ROW__ID, p, q, a, b, INPUT__FILE__NAME from T order by p, q, a, b";
rs = runStatementOnDriver(query);
String[][] expected2 = {
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t4\t1", "t/p=1/q=1/delta_0000015_0000015_0000/bucket_00000"},
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t4\t3", "t/p=1/q=1/delta_0000015_0000015_0000/bucket_00000"},
- {"{\"transactionid\":17,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t5\t1", "t/p=1/q=1/delta_0000017_0000017_0000/bucket_00000"},
- {"{\"transactionid\":17,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t5\t3", "t/p=1/q=1/delta_0000017_0000017_0000/bucket_00000"},
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t4\t2", "t/p=1/q=2/base_0000017/bucket_00000"},
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4\t4", "t/p=1/q=2/base_0000017/bucket_00000"},
- {"{\"transactionid\":17,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t5\t2", "t/p=1/q=2/base_0000017/bucket_00000"},
- {"{\"transactionid\":17,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t5\t4", "t/p=1/q=2/base_0000017/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t4\t1", "t/p=1/q=1/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t4\t3", "t/p=1/q=1/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t5\t1", "t/p=1/q=1/delta_0000002_0000002_0000/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t5\t3", "t/p=1/q=1/delta_0000002_0000002_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t4\t2", "t/p=1/q=2/base_0000002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4\t4", "t/p=1/q=2/base_0000002/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t5\t2", "t/p=1/q=2/base_0000002/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t5\t4", "t/p=1/q=2/base_0000002/bucket_00000"}
};
checkExpected(rs, expected2, "after major compaction");
@@ -720,9 +720,9 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
String query = "select ROW__ID, a, b, INPUT__FILE__NAME from T order by a, b";
List<String> rs = runStatementOnDriver(query);
String[][] expected = {
- //this proves data is written in Acid layout so T was made Acid
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000015_0000015_0000/bucket_00000"},
- {"{\"transactionid\":15,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000015_0000015_0000/bucket_00000"}
+ //this proves data is written in Acid layout so T was made Acid
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000001_0000001_0000/bucket_00000"}
};
checkExpected(rs, expected, "insert data");
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFileSinkOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFileSinkOperator.java b/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFileSinkOperator.java
index 2a520f4..d673be4 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFileSinkOperator.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/TestFileSinkOperator.java
@@ -27,7 +27,7 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.common.StatsSetupConst;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
import org.apache.hadoop.hive.ql.CompilationOpContext;
@@ -292,8 +292,12 @@ public class TestFileSinkOperator {
}
desc.setWriteType(writeType);
desc.setGatherStats(true);
- if (txnId > 0) desc.setTransactionId(txnId);
- if (writeType != AcidUtils.Operation.NOT_ACID) desc.setTransactionId(1L);
+ if (txnId > 0) {
+ desc.setTableWriteId(txnId);
+ }
+ if (writeType != AcidUtils.Operation.NOT_ACID) {
+ desc.setTableWriteId(1L);
+ }
FileSinkOperator op = (FileSinkOperator)OperatorFactory.get(
new CompilationOpContext(), FileSinkDesc.class);
@@ -699,7 +703,7 @@ public class TestFileSinkOperator {
public RawReader<Row> getRawReader(Configuration conf,
boolean collapseEvents,
int bucket,
- ValidTxnList validTxnList,
+ ValidWriteIdList validWriteIdList,
Path baseDirectory,
Path[] deltaDirectory) throws
IOException {
@@ -725,18 +729,18 @@ public class TestFileSinkOperator {
return new RecordUpdater() {
@Override
- public void insert(long currentTransaction, Object row) throws IOException {
+ public void insert(long currentWriteId, Object row) throws IOException {
addRow(row);
numRecordsAdded++;
}
@Override
- public void update(long currentTransaction, Object row) throws IOException {
+ public void update(long currentWriteId, Object row) throws IOException {
addRow(row);
}
@Override
- public void delete(long currentTransaction, Object row) throws IOException {
+ public void delete(long currentWriteId, Object row) throws IOException {
addRow(row);
numRecordsAdded--;
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidInputFormat.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidInputFormat.java b/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidInputFormat.java
index 23dadd0..a1eb39d 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidInputFormat.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidInputFormat.java
@@ -49,8 +49,8 @@ public class TestAcidInputFormat {
deltaMetaData.readFields(mockDataInput);
verify(mockDataInput, times(1)).readInt();
- assertThat(deltaMetaData.getMinTxnId(), is(1L));
- assertThat(deltaMetaData.getMaxTxnId(), is(2L));
+ assertThat(deltaMetaData.getMinWriteId(), is(1L));
+ assertThat(deltaMetaData.getMaxWriteId(), is(2L));
assertThat(deltaMetaData.getStmtIds().isEmpty(), is(true));
}
@@ -63,8 +63,8 @@ public class TestAcidInputFormat {
deltaMetaData.readFields(mockDataInput);
verify(mockDataInput, times(3)).readInt();
- assertThat(deltaMetaData.getMinTxnId(), is(1L));
- assertThat(deltaMetaData.getMaxTxnId(), is(2L));
+ assertThat(deltaMetaData.getMinWriteId(), is(1L));
+ assertThat(deltaMetaData.getMaxWriteId(), is(2L));
assertThat(deltaMetaData.getStmtIds().size(), is(2));
assertThat(deltaMetaData.getStmtIds().get(0), is(100));
assertThat(deltaMetaData.getStmtIds().get(1), is(101));
@@ -74,8 +74,8 @@ public class TestAcidInputFormat {
public void testDeltaMetaConstructWithState() throws Exception {
DeltaMetaData deltaMetaData = new AcidInputFormat.DeltaMetaData(2000L, 2001L, Arrays.asList(97, 98, 99));
- assertThat(deltaMetaData.getMinTxnId(), is(2000L));
- assertThat(deltaMetaData.getMaxTxnId(), is(2001L));
+ assertThat(deltaMetaData.getMinWriteId(), is(2000L));
+ assertThat(deltaMetaData.getMaxWriteId(), is(2001L));
assertThat(deltaMetaData.getStmtIds().size(), is(3));
assertThat(deltaMetaData.getStmtIds().get(0), is(97));
assertThat(deltaMetaData.getStmtIds().get(1), is(98));
@@ -95,8 +95,8 @@ public class TestAcidInputFormat {
deltaMetaData.readFields(mockDataInput);
verify(mockDataInput, times(3)).readInt();
- assertThat(deltaMetaData.getMinTxnId(), is(1L));
- assertThat(deltaMetaData.getMaxTxnId(), is(2L));
+ assertThat(deltaMetaData.getMinWriteId(), is(1L));
+ assertThat(deltaMetaData.getMaxWriteId(), is(2L));
assertThat(deltaMetaData.getStmtIds().size(), is(2));
assertThat(deltaMetaData.getStmtIds().get(0), is(100));
assertThat(deltaMetaData.getStmtIds().get(1), is(101));
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidUtils.java b/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidUtils.java
index 5632350..c51ffa8 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidUtils.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/io/TestAcidUtils.java
@@ -27,13 +27,12 @@ import java.util.Map;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidCompactorTxnList;
-import org.apache.hadoop.hive.common.ValidReadTxnList;
+import org.apache.hadoop.hive.common.ValidCompactorWriteIdList;
+import org.apache.hadoop.hive.common.ValidReaderWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
import org.apache.hadoop.hive.ql.exec.Utilities;
import org.apache.hadoop.hive.ql.io.AcidUtils.AcidOperationalProperties;
-import org.apache.hadoop.hive.ql.io.orc.TestInputOutputFormat;
import org.apache.hadoop.hive.ql.io.orc.TestInputOutputFormat.MockFile;
import org.apache.hadoop.hive.ql.io.orc.TestInputOutputFormat.MockFileSystem;
import org.apache.hadoop.hive.ql.io.orc.TestInputOutputFormat.MockPath;
@@ -56,8 +55,8 @@ public class TestAcidUtils {
assertEquals("/tmp/000123_0",
AcidUtils.createFilename(p, options).toString());
options.bucket(23)
- .minimumTransactionId(100)
- .maximumTransactionId(200)
+ .minimumWriteId(100)
+ .maximumWriteId(200)
.writingBase(true)
.setOldStyle(false);
assertEquals("/tmp/base_0000200/bucket_00023",
@@ -92,8 +91,8 @@ public class TestAcidUtils {
assertEquals("/tmp/123456789_0",
AcidUtils.createFilename(p, options).toString());
options.bucket(23)
- .minimumTransactionId(1234567880)
- .maximumTransactionId(1234567890)
+ .minimumWriteId(1234567880)
+ .maximumWriteId(1234567890)
.writingBase(true)
.setOldStyle(false);
assertEquals("/tmp/base_1234567890/bucket_00023",
@@ -118,29 +117,29 @@ public class TestAcidUtils {
conf);
assertEquals(false, opts.getOldStyle());
assertEquals(true, opts.isWritingBase());
- assertEquals(567, opts.getMaximumTransactionId());
- assertEquals(0, opts.getMinimumTransactionId());
+ assertEquals(567, opts.getMaximumWriteId());
+ assertEquals(0, opts.getMinimumWriteId());
assertEquals(123, opts.getBucketId());
opts = AcidUtils.parseBaseOrDeltaBucketFilename(
new MockPath(fs, dir + "/delta_000005_000006/bucket_00001"), conf);
assertEquals(false, opts.getOldStyle());
assertEquals(false, opts.isWritingBase());
- assertEquals(6, opts.getMaximumTransactionId());
- assertEquals(5, opts.getMinimumTransactionId());
+ assertEquals(6, opts.getMaximumWriteId());
+ assertEquals(5, opts.getMinimumWriteId());
assertEquals(1, opts.getBucketId());
opts = AcidUtils.parseBaseOrDeltaBucketFilename(
new MockPath(fs, dir + "/delete_delta_000005_000006/bucket_00001"), conf);
assertEquals(false, opts.getOldStyle());
assertEquals(false, opts.isWritingBase());
- assertEquals(6, opts.getMaximumTransactionId());
- assertEquals(5, opts.getMinimumTransactionId());
+ assertEquals(6, opts.getMaximumWriteId());
+ assertEquals(5, opts.getMinimumWriteId());
assertEquals(1, opts.getBucketId());
opts = AcidUtils.parseBaseOrDeltaBucketFilename(new Path(dir, "000123_0"), conf);
assertEquals(true, opts.getOldStyle());
assertEquals(true, opts.isWritingBase());
assertEquals(123, opts.getBucketId());
- assertEquals(0, opts.getMinimumTransactionId());
- assertEquals(0, opts.getMaximumTransactionId());
+ assertEquals(0, opts.getMinimumWriteId());
+ assertEquals(0, opts.getMaximumWriteId());
}
@@ -160,7 +159,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/subdir/000000_0", 0, new byte[0]));
AcidUtils.Directory dir =
AcidUtils.getAcidState(new MockPath(fs, "/tbl/part1"), conf,
- new ValidReadTxnList("100:" + Long.MAX_VALUE + ":"));
+ new ValidReaderWriteIdList("tbl:100:" + Long.MAX_VALUE + ":"));
assertEquals(null, dir.getBaseDirectory());
assertEquals(0, dir.getCurrentDirectories().size());
assertEquals(0, dir.getObsolete().size());
@@ -195,7 +194,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_101_101/bucket_0", 0, new byte[0]));
AcidUtils.Directory dir =
AcidUtils.getAcidState(new MockPath(fs,
- "mock:/tbl/part1"), conf, new ValidReadTxnList("100:" + Long.MAX_VALUE + ":"));
+ "mock:/tbl/part1"), conf, new ValidReaderWriteIdList("tbl:100:" + Long.MAX_VALUE + ":"));
assertEquals(null, dir.getBaseDirectory());
List<FileStatus> obsolete = dir.getObsolete();
assertEquals(2, obsolete.size());
@@ -215,12 +214,12 @@ public class TestAcidUtils {
assertEquals(2, deltas.size());
AcidUtils.ParsedDelta delt = deltas.get(0);
assertEquals("mock:/tbl/part1/delta_025_030", delt.getPath().toString());
- assertEquals(25, delt.getMinTransaction());
- assertEquals(30, delt.getMaxTransaction());
+ assertEquals(25, delt.getMinWriteId());
+ assertEquals(30, delt.getMaxWriteId());
delt = deltas.get(1);
assertEquals("mock:/tbl/part1/delta_050_100", delt.getPath().toString());
- assertEquals(50, delt.getMinTransaction());
- assertEquals(100, delt.getMaxTransaction());
+ assertEquals(50, delt.getMinWriteId());
+ assertEquals(100, delt.getMaxWriteId());
}
@Test
@@ -237,7 +236,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_90_120/bucket_0", 0, new byte[0]));
AcidUtils.Directory dir =
AcidUtils.getAcidState(new MockPath(fs,
- "mock:/tbl/part1"), conf, new ValidReadTxnList("100:" + Long.MAX_VALUE + ":"));
+ "mock:/tbl/part1"), conf, new ValidReaderWriteIdList("tbl:100:" + Long.MAX_VALUE + ":"));
assertEquals("mock:/tbl/part1/base_49", dir.getBaseDirectory().toString());
List<FileStatus> obsolete = dir.getObsolete();
assertEquals(5, obsolete.size());
@@ -251,8 +250,8 @@ public class TestAcidUtils {
assertEquals(1, deltas.size());
AcidUtils.ParsedDelta delt = deltas.get(0);
assertEquals("mock:/tbl/part1/delta_050_105", delt.getPath().toString());
- assertEquals(50, delt.getMinTransaction());
- assertEquals(105, delt.getMaxTransaction());
+ assertEquals(50, delt.getMinWriteId());
+ assertEquals(105, delt.getMaxWriteId());
}
@Test
@@ -265,7 +264,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/000001_1", 500, new byte[0]));
Path part = new MockPath(fs, "/tbl/part1");
AcidUtils.Directory dir =
- AcidUtils.getAcidState(part, conf, new ValidReadTxnList("150:" + Long.MAX_VALUE + ":"));
+ AcidUtils.getAcidState(part, conf, new ValidReaderWriteIdList("tbl:150:" + Long.MAX_VALUE + ":"));
// Obsolete list should include the two original bucket files, and the old base dir
List<FileStatus> obsolete = dir.getObsolete();
assertEquals(3, obsolete.size());
@@ -286,7 +285,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/base_50/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
AcidUtils.Directory dir =
- AcidUtils.getAcidState(part, conf, new ValidReadTxnList("100:" + Long.MAX_VALUE + ":"));
+ AcidUtils.getAcidState(part, conf, new ValidReaderWriteIdList("tbl:100:" + Long.MAX_VALUE + ":"));
assertEquals("mock:/tbl/part1/base_50", dir.getBaseDirectory().toString());
List<FileStatus> obsolete = dir.getObsolete();
assertEquals(2, obsolete.size());
@@ -320,8 +319,8 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_058_58/bucket_0", 500, new byte[0]),
new MockFile("mock:/tbl/part1/base_50/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
- AcidUtils.Directory dir =
- AcidUtils.getAcidState(part, conf, new ValidReadTxnList("100:" + Long.MAX_VALUE + ":"));
+ AcidUtils.Directory dir
+ = AcidUtils.getAcidState(part, conf, new ValidReaderWriteIdList("tbl:100:" + Long.MAX_VALUE + ":"));
assertEquals("mock:/tbl/part1/base_50", dir.getBaseDirectory().toString());
List<FileStatus> obsolete = dir.getObsolete();
assertEquals(5, obsolete.size());
@@ -346,7 +345,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_1_1/bucket_0", 500, new byte[0]),
new MockFile("mock:/tbl/part1/delta_2_5/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
- AcidUtils.Directory dir = AcidUtils.getAcidState(part, conf, new ValidReadTxnList("100:4:4"));
+ AcidUtils.Directory dir = AcidUtils.getAcidState(part, conf, new ValidReaderWriteIdList("tbl:100:4:4"));
List<AcidUtils.ParsedDelta> delts = dir.getCurrentDirectories();
assertEquals(2, delts.size());
assertEquals("mock:/tbl/part1/delta_1_1", delts.get(0).getPath().toString());
@@ -367,7 +366,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_4_4_3/bucket_0", 500, new byte[0]),
new MockFile("mock:/tbl/part1/delta_101_101_1/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
- AcidUtils.Directory dir = AcidUtils.getAcidState(part, conf, new ValidReadTxnList("100:4:4"));
+ AcidUtils.Directory dir = AcidUtils.getAcidState(part, conf, new ValidReaderWriteIdList("tbl:100:4:4"));
List<AcidUtils.ParsedDelta> delts = dir.getCurrentDirectories();
assertEquals(2, delts.size());
assertEquals("mock:/tbl/part1/delta_1_1", delts.get(0).getPath().toString());
@@ -382,7 +381,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_2_5/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
AcidUtils.Directory dir =
- AcidUtils.getAcidState(part, conf, new ValidCompactorTxnList("4:" + Long.MAX_VALUE));
+ AcidUtils.getAcidState(part, conf, new ValidCompactorWriteIdList("tbl:4:" + Long.MAX_VALUE));
List<AcidUtils.ParsedDelta> delts = dir.getCurrentDirectories();
assertEquals(1, delts.size());
assertEquals("mock:/tbl/part1/delta_1_1", delts.get(0).getPath().toString());
@@ -399,7 +398,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_6_10/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
AcidUtils.Directory dir =
- AcidUtils.getAcidState(part, conf, new ValidCompactorTxnList("3:" + Long.MAX_VALUE));
+ AcidUtils.getAcidState(part, conf, new ValidCompactorWriteIdList("tbl:3:" + Long.MAX_VALUE));
List<AcidUtils.ParsedDelta> delts = dir.getCurrentDirectories();
assertEquals(1, delts.size());
assertEquals("mock:/tbl/part1/delta_1_1", delts.get(0).getPath().toString());
@@ -424,7 +423,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delete_delta_110_110/bucket_0", 0, new byte[0]));
AcidUtils.Directory dir =
AcidUtils.getAcidState(new MockPath(fs,
- "mock:/tbl/part1"), conf, new ValidReadTxnList("100:" + Long.MAX_VALUE + ":"));
+ "mock:/tbl/part1"), conf, new ValidReaderWriteIdList("tbl:100:" + Long.MAX_VALUE + ":"));
assertEquals("mock:/tbl/part1/base_49", dir.getBaseDirectory().toString());
List<FileStatus> obsolete = dir.getObsolete();
assertEquals(7, obsolete.size());
@@ -461,7 +460,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/base_50/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
AcidUtils.Directory dir =
- AcidUtils.getAcidState(part, conf, new ValidReadTxnList("100:" + Long.MAX_VALUE + ":"));
+ AcidUtils.getAcidState(part, conf, new ValidReaderWriteIdList("tbl:100:" + Long.MAX_VALUE + ":"));
assertEquals("mock:/tbl/part1/base_50", dir.getBaseDirectory().toString());
List<FileStatus> obsolete = dir.getObsolete();
assertEquals(3, obsolete.size());
@@ -490,7 +489,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delete_delta_50_50/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
AcidUtils.Directory dir =
- AcidUtils.getAcidState(part, conf, new ValidReadTxnList("100:" + Long.MAX_VALUE + ":"));
+ AcidUtils.getAcidState(part, conf, new ValidReaderWriteIdList("tbl:100:" + Long.MAX_VALUE + ":"));
List<FileStatus> obsolete = dir.getObsolete();
assertEquals(1, obsolete.size());
assertEquals("mock:/tbl/part1/delete_delta_50_50", obsolete.get(0).getPath().toString());
@@ -517,7 +516,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_6_10/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
AcidUtils.Directory dir =
- AcidUtils.getAcidState(part, conf, new ValidCompactorTxnList("4:" + Long.MAX_VALUE + ":"));
+ AcidUtils.getAcidState(part, conf, new ValidCompactorWriteIdList("tbl:4:" + Long.MAX_VALUE + ":"));
List<AcidUtils.ParsedDelta> delts = dir.getCurrentDirectories();
assertEquals(2, delts.size());
assertEquals("mock:/tbl/part1/delta_1_1", delts.get(0).getPath().toString());
@@ -538,7 +537,7 @@ public class TestAcidUtils {
new MockFile("mock:/tbl/part1/delta_4_4_3/bucket_0", 500, new byte[0]),
new MockFile("mock:/tbl/part1/delta_101_101_1/bucket_0", 500, new byte[0]));
Path part = new MockPath(fs, "mock:/tbl/part1");
- AcidUtils.Directory dir = AcidUtils.getAcidState(part, conf, new ValidReadTxnList("100:4:4"));
+ AcidUtils.Directory dir = AcidUtils.getAcidState(part, conf, new ValidReaderWriteIdList("tbl:100:4:4"));
List<AcidUtils.ParsedDelta> delts = dir.getCurrentDirectories();
assertEquals(3, delts.size());
assertEquals("mock:/tbl/part1/delta_1_1", delts.get(0).getPath().toString());
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java
index 8a6a056..ff76002 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java
@@ -48,7 +48,7 @@ import org.apache.commons.codec.binary.Base64;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.*;
import org.apache.hadoop.fs.permission.FsPermission;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.common.type.HiveDecimal;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
@@ -2267,7 +2267,7 @@ public class TestInputOutputFormat {
// write the orc file to the mock file system
Path partDir = new Path(conf.get("mapred.input.dir"));
OrcRecordUpdater writer = new OrcRecordUpdater(partDir,
- new AcidOutputFormat.Options(conf).maximumTransactionId(10)
+ new AcidOutputFormat.Options(conf).maximumWriteId(10)
.writingBase(true).bucket(0).inspector(inspector).finalDestination(partDir));
for (int i = 0; i < 100; ++i) {
BigRow row = new BigRow(i);
@@ -2424,7 +2424,7 @@ public class TestInputOutputFormat {
// write a base file in partition 0
OrcRecordUpdater writer = new OrcRecordUpdater(partDir[0],
- new AcidOutputFormat.Options(conf).maximumTransactionId(10)
+ new AcidOutputFormat.Options(conf).maximumWriteId(10)
.writingBase(true).bucket(0).inspector(inspector).finalDestination(partDir[0]));
for(int i=0; i < 10; ++i) {
writer.insert(10, new MyRow(i, 2 * i));
@@ -2437,7 +2437,7 @@ public class TestInputOutputFormat {
// write a delta file in partition 0
writer = new OrcRecordUpdater(partDir[0],
- new AcidOutputFormat.Options(conf).maximumTransactionId(10)
+ new AcidOutputFormat.Options(conf).maximumWriteId(10)
.writingBase(true).bucket(1).inspector(inspector).finalDestination(partDir[0]));
for(int i=10; i < 20; ++i) {
writer.insert(10, new MyRow(i, 2*i));
@@ -3558,12 +3558,12 @@ public class TestInputOutputFormat {
}
writer.close();
- AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf).bucket(1).minimumTransactionId(1)
- .maximumTransactionId(1).inspector(inspector).finalDestination(mockPath);
+ AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf).bucket(1).minimumWriteId(1)
+ .maximumWriteId(1).inspector(inspector).finalDestination(mockPath);
OrcOutputFormat of = new OrcOutputFormat();
RecordUpdater ru = of.getRecordUpdater(mockPath, options);
for (int i = 0; i < 10; ++i) {
- ru.insert(options.getMinimumTransactionId(), new MyRow(i, 2 * i));
+ ru.insert(options.getMinimumWriteId(), new MyRow(i, 2 * i));
}
ru.close(false);//this deletes the side file
@@ -3638,12 +3638,12 @@ public class TestInputOutputFormat {
}
writer.close();
- AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf).bucket(1).minimumTransactionId(1)
- .maximumTransactionId(1).inspector(inspector).finalDestination(mockPath);
+ AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf).bucket(1).minimumWriteId(1)
+ .maximumWriteId(1).inspector(inspector).finalDestination(mockPath);
OrcOutputFormat of = new OrcOutputFormat();
RecordUpdater ru = of.getRecordUpdater(mockPath, options);
for (int i = 0; i < 10; ++i) {
- ru.insert(options.getMinimumTransactionId(), new MyRow(i, 2 * i));
+ ru.insert(options.getMinimumWriteId(), new MyRow(i, 2 * i));
}
ru.close(false);//this deletes the side file
@@ -3895,7 +3895,7 @@ public class TestInputOutputFormat {
long fileLength = fs.getFileStatus(testFilePath).getLen();
// test with same schema with include
- conf.set(ValidTxnList.VALID_TXNS_KEY, "100:99:");
+ conf.set(ValidWriteIdList.VALID_WRITEIDS_KEY, "tbl:100:99:");
conf.set(IOConstants.SCHEMA_EVOLUTION_COLUMNS, "a,b,d");
conf.set(IOConstants.SCHEMA_EVOLUTION_COLUMNS_TYPES, "int,struct<c:int>,string");
conf.set(ColumnProjectionUtils.READ_ALL_COLUMNS, "false");
@@ -3912,7 +3912,7 @@ public class TestInputOutputFormat {
while (reader.next(id, struct)) {
assertEquals("id " + record, record, id.getRowId());
assertEquals("bucket " + record, 0, id.getBucketProperty());
- assertEquals("trans " + record, 1, id.getTransactionId());
+ assertEquals("writeid " + record, 1, id.getWriteId());
assertEquals("a " + record,
42 * record, ((IntWritable) struct.getFieldValue(0)).get());
assertEquals(null, struct.getFieldValue(1));
@@ -3939,7 +3939,7 @@ public class TestInputOutputFormat {
while (reader.next(id, struct)) {
assertEquals("id " + record, record, id.getRowId());
assertEquals("bucket " + record, 0, id.getBucketProperty());
- assertEquals("trans " + record, 1, id.getTransactionId());
+ assertEquals("writeid " + record, 1, id.getWriteId());
assertEquals("a " + record,
42 * record, ((IntWritable) struct.getFieldValue(0)).get());
assertEquals(null, struct.getFieldValue(1));
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRawRecordMerger.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRawRecordMerger.java b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRawRecordMerger.java
index bbd040a..a47979b 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRawRecordMerger.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRawRecordMerger.java
@@ -35,8 +35,8 @@ import org.slf4j.LoggerFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidTxnList;
-import org.apache.hadoop.hive.common.ValidReadTxnList;
+import org.apache.hadoop.hive.common.ValidReaderWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.io.AcidOutputFormat;
import org.apache.hadoop.hive.ql.io.AcidUtils;
@@ -121,11 +121,11 @@ public class TestOrcRawRecordMerger {
long currentTransaction,
String value) {
event.setFieldValue(OrcRecordUpdater.OPERATION, new IntWritable(operation));
- event.setFieldValue(OrcRecordUpdater.ORIGINAL_TRANSACTION,
+ event.setFieldValue(OrcRecordUpdater.ORIGINAL_WRITEID,
new LongWritable(originalTransaction));
event.setFieldValue(OrcRecordUpdater.BUCKET, new IntWritable(bucket));
event.setFieldValue(OrcRecordUpdater.ROW_ID, new LongWritable(rowId));
- event.setFieldValue(OrcRecordUpdater.CURRENT_TRANSACTION,
+ event.setFieldValue(OrcRecordUpdater.CURRENT_WRITEID,
new LongWritable(currentTransaction));
OrcStruct row = new OrcStruct(1);
row.setFieldValue(0, new Text(value));
@@ -195,17 +195,17 @@ public class TestOrcRawRecordMerger {
ReaderPair pair = new OrcRawRecordMerger.ReaderPairAcid(key, reader, minKey, maxKey,
new Reader.Options(), 0);
RecordReader recordReader = pair.getRecordReader();
- assertEquals(10, key.getTransactionId());
+ assertEquals(10, key.getWriteId());
assertEquals(20, key.getBucketProperty());
assertEquals(40, key.getRowId());
- assertEquals(120, key.getCurrentTransactionId());
+ assertEquals(120, key.getCurrentWriteId());
assertEquals("third", value(pair.nextRecord()));
pair.next(pair.nextRecord());
- assertEquals(40, key.getTransactionId());
+ assertEquals(40, key.getWriteId());
assertEquals(50, key.getBucketProperty());
assertEquals(60, key.getRowId());
- assertEquals(130, key.getCurrentTransactionId());
+ assertEquals(130, key.getCurrentWriteId());
assertEquals("fourth", value(pair.nextRecord()));
pair.next(pair.nextRecord());
@@ -221,38 +221,38 @@ public class TestOrcRawRecordMerger {
ReaderPair pair = new OrcRawRecordMerger.ReaderPairAcid(key, reader, null, null,
new Reader.Options(), 0);
RecordReader recordReader = pair.getRecordReader();
- assertEquals(10, key.getTransactionId());
+ assertEquals(10, key.getWriteId());
assertEquals(20, key.getBucketProperty());
assertEquals(20, key.getRowId());
- assertEquals(100, key.getCurrentTransactionId());
+ assertEquals(100, key.getCurrentWriteId());
assertEquals("first", value(pair.nextRecord()));
pair.next(pair.nextRecord());
- assertEquals(10, key.getTransactionId());
+ assertEquals(10, key.getWriteId());
assertEquals(20, key.getBucketProperty());
assertEquals(30, key.getRowId());
- assertEquals(110, key.getCurrentTransactionId());
+ assertEquals(110, key.getCurrentWriteId());
assertEquals("second", value(pair.nextRecord()));
pair.next(pair.nextRecord());
- assertEquals(10, key.getTransactionId());
+ assertEquals(10, key.getWriteId());
assertEquals(20, key.getBucketProperty());
assertEquals(40, key.getRowId());
- assertEquals(120, key.getCurrentTransactionId());
+ assertEquals(120, key.getCurrentWriteId());
assertEquals("third", value(pair.nextRecord()));
pair.next(pair.nextRecord());
- assertEquals(40, key.getTransactionId());
+ assertEquals(40, key.getWriteId());
assertEquals(50, key.getBucketProperty());
assertEquals(60, key.getRowId());
- assertEquals(130, key.getCurrentTransactionId());
+ assertEquals(130, key.getCurrentWriteId());
assertEquals("fourth", value(pair.nextRecord()));
pair.next(pair.nextRecord());
- assertEquals(40, key.getTransactionId());
+ assertEquals(40, key.getWriteId());
assertEquals(50, key.getBucketProperty());
assertEquals(61, key.getRowId());
- assertEquals(140, key.getCurrentTransactionId());
+ assertEquals(140, key.getCurrentWriteId());
assertEquals("fifth", value(pair.nextRecord()));
pair.next(pair.nextRecord());
@@ -303,19 +303,20 @@ public class TestOrcRawRecordMerger {
fs.makeQualified(root);
fs.create(root);
ReaderPair pair = new OrcRawRecordMerger.OriginalReaderPairToRead(key, reader, BUCKET, minKey, maxKey,
- new Reader.Options().include(includes), new OrcRawRecordMerger.Options().rootPath(root), conf, new ValidReadTxnList(), 0);
+ new Reader.Options().include(includes), new OrcRawRecordMerger.Options().rootPath(root),
+ conf, new ValidReaderWriteIdList(), 0);
RecordReader recordReader = pair.getRecordReader();
- assertEquals(0, key.getTransactionId());
+ assertEquals(0, key.getWriteId());
assertEquals(bucketProperty, key.getBucketProperty());
assertEquals(2, key.getRowId());
- assertEquals(0, key.getCurrentTransactionId());
+ assertEquals(0, key.getCurrentWriteId());
assertEquals("third", value(pair.nextRecord()));
pair.next(pair.nextRecord());
- assertEquals(0, key.getTransactionId());
+ assertEquals(0, key.getWriteId());
assertEquals(bucketProperty, key.getBucketProperty());
assertEquals(3, key.getRowId());
- assertEquals(0, key.getCurrentTransactionId());
+ assertEquals(0, key.getCurrentWriteId());
assertEquals("fourth", value(pair.nextRecord()));
pair.next(pair.nextRecord());
@@ -323,8 +324,8 @@ public class TestOrcRawRecordMerger {
Mockito.verify(recordReader).close();
}
- private static ValidTxnList createMaximalTxnList() {
- return new ValidReadTxnList();
+ private static ValidWriteIdList createMaximalTxnList() {
+ return new ValidReaderWriteIdList();
}
@Test
@@ -339,40 +340,40 @@ public class TestOrcRawRecordMerger {
fs.makeQualified(root);
fs.create(root);
ReaderPair pair = new OrcRawRecordMerger.OriginalReaderPairToRead(key, reader, BUCKET, null, null,
- new Reader.Options(), new OrcRawRecordMerger.Options().rootPath(root), conf, new ValidReadTxnList(), 0);
+ new Reader.Options(), new OrcRawRecordMerger.Options().rootPath(root), conf, new ValidReaderWriteIdList(), 0);
assertEquals("first", value(pair.nextRecord()));
- assertEquals(0, key.getTransactionId());
+ assertEquals(0, key.getWriteId());
assertEquals(bucketProperty, key.getBucketProperty());
assertEquals(0, key.getRowId());
- assertEquals(0, key.getCurrentTransactionId());
+ assertEquals(0, key.getCurrentWriteId());
pair.next(pair.nextRecord());
assertEquals("second", value(pair.nextRecord()));
- assertEquals(0, key.getTransactionId());
+ assertEquals(0, key.getWriteId());
assertEquals(bucketProperty, key.getBucketProperty());
assertEquals(1, key.getRowId());
- assertEquals(0, key.getCurrentTransactionId());
+ assertEquals(0, key.getCurrentWriteId());
pair.next(pair.nextRecord());
assertEquals("third", value(pair.nextRecord()));
- assertEquals(0, key.getTransactionId());
+ assertEquals(0, key.getWriteId());
assertEquals(bucketProperty, key.getBucketProperty());
assertEquals(2, key.getRowId());
- assertEquals(0, key.getCurrentTransactionId());
+ assertEquals(0, key.getCurrentWriteId());
pair.next(pair.nextRecord());
assertEquals("fourth", value(pair.nextRecord()));
- assertEquals(0, key.getTransactionId());
+ assertEquals(0, key.getWriteId());
assertEquals(bucketProperty, key.getBucketProperty());
assertEquals(3, key.getRowId());
- assertEquals(0, key.getCurrentTransactionId());
+ assertEquals(0, key.getCurrentWriteId());
pair.next(pair.nextRecord());
assertEquals("fifth", value(pair.nextRecord()));
- assertEquals(0, key.getTransactionId());
+ assertEquals(0, key.getWriteId());
assertEquals(bucketProperty, key.getBucketProperty());
assertEquals(4, key.getRowId());
- assertEquals(0, key.getCurrentTransactionId());
+ assertEquals(0, key.getCurrentWriteId());
pair.next(pair.nextRecord());
assertEquals(null, pair.nextRecord());
@@ -452,13 +453,13 @@ public class TestOrcRawRecordMerger {
OrcStruct event = merger.createValue();
assertEquals(true, merger.next(id, event));
- assertEquals(10, id.getTransactionId());
+ assertEquals(10, id.getWriteId());
assertEquals(20, id.getBucketProperty());
assertEquals(40, id.getRowId());
assertEquals("third", getValue(event));
assertEquals(true, merger.next(id, event));
- assertEquals(40, id.getTransactionId());
+ assertEquals(40, id.getWriteId());
assertEquals(50, id.getBucketProperty());
assertEquals(60, id.getRowId());
assertEquals("fourth", getValue(event));
@@ -477,9 +478,9 @@ public class TestOrcRawRecordMerger {
assertEquals("operation",
fields.get(OrcRecordUpdater.OPERATION).getFieldName());
assertEquals("currentTransaction",
- fields.get(OrcRecordUpdater.CURRENT_TRANSACTION).getFieldName());
+ fields.get(OrcRecordUpdater.CURRENT_WRITEID).getFieldName());
assertEquals("originalTransaction",
- fields.get(OrcRecordUpdater.ORIGINAL_TRANSACTION).getFieldName());
+ fields.get(OrcRecordUpdater.ORIGINAL_WRITEID).getFieldName());
assertEquals("bucket",
fields.get(OrcRecordUpdater.BUCKET).getFieldName());
assertEquals("rowId",
@@ -538,15 +539,15 @@ public class TestOrcRawRecordMerger {
}
/*create delta_1_1_0/bucket0 with 1 row and close the file*/
AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf)
- .inspector(inspector).bucket(BUCKET).writingBase(false).minimumTransactionId(1)
- .maximumTransactionId(1).finalDestination(root);
+ .inspector(inspector).bucket(BUCKET).writingBase(false).minimumWriteId(1)
+ .maximumWriteId(1).finalDestination(root);
Path delta1_1_0 = new Path(root, AcidUtils.deltaSubdir(
- options.getMinimumTransactionId(), options.getMaximumTransactionId(), options.getStatementId()));
+ options.getMinimumWriteId(), options.getMaximumWriteId(), options.getStatementId()));
Path bucket0 = AcidUtils.createBucketFile(delta1_1_0, BUCKET);
Path bucket0SideFile = OrcAcidUtils.getSideFile(bucket0);
RecordUpdater ru = of.getRecordUpdater(root, options);
- ru.insert(options.getMaximumTransactionId(), new MyRow("first"));
+ ru.insert(options.getMaximumWriteId(), new MyRow("first"));
ru.close(false);
FileStatus bucket0File = fs.getFileStatus(bucket0);
@@ -581,7 +582,7 @@ public class TestOrcRawRecordMerger {
// write the empty base
AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf)
.inspector(inspector).bucket(BUCKET).writingBase(true)
- .maximumTransactionId(100).finalDestination(root);
+ .maximumWriteId(100).finalDestination(root);
of.getRecordUpdater(root, options).close(false);
{
/*OrcRecordUpdater is inconsistent about when it creates empty files and when it does not.
@@ -593,8 +594,8 @@ public class TestOrcRawRecordMerger {
AcidUtils.baseDir(100)), BUCKET), wo);
w.close();
}
- ValidTxnList txnList = new ValidReadTxnList("200:" + Long.MAX_VALUE);
- AcidUtils.Directory directory = AcidUtils.getAcidState(root, conf, txnList);
+ ValidWriteIdList writeIdList = new ValidReaderWriteIdList("testEmpty:200:" + Long.MAX_VALUE);
+ AcidUtils.Directory directory = AcidUtils.getAcidState(root, conf, writeIdList);
Path basePath = AcidUtils.createBucketFile(directory.getBaseDirectory(),
BUCKET);
@@ -646,7 +647,7 @@ public class TestOrcRawRecordMerger {
options.statementId(-1);
}
RecordUpdater ru = of.getRecordUpdater(root,
- options.writingBase(true).maximumTransactionId(100));
+ options.writingBase(true).maximumWriteId(100));
for(String v: values) {
ru.insert(0, new MyRow(v));
}
@@ -654,7 +655,7 @@ public class TestOrcRawRecordMerger {
// write a delta
ru = of.getRecordUpdater(root, options.writingBase(false)
- .minimumTransactionId(200).maximumTransactionId(200).recordIdColumn(1));
+ .minimumWriteId(200).maximumWriteId(200).recordIdColumn(1));
ru.update(200, new MyRow("update 1", 0, 0, BUCKET_PROPERTY));
ru.update(200, new MyRow("update 2", 2, 0, BUCKET_PROPERTY));
ru.update(200, new MyRow("update 3", 3, 0, BUCKET_PROPERTY));
@@ -662,8 +663,8 @@ public class TestOrcRawRecordMerger {
ru.delete(200, new MyRow("", 8, 0, BUCKET_PROPERTY));
ru.close(false);
- ValidTxnList txnList = new ValidReadTxnList("200:" + Long.MAX_VALUE);
- AcidUtils.Directory directory = AcidUtils.getAcidState(root, conf, txnList);
+ ValidWriteIdList writeIdList = new ValidReaderWriteIdList("testNewBaseAndDelta:200:" + Long.MAX_VALUE);
+ AcidUtils.Directory directory = AcidUtils.getAcidState(root, conf, writeIdList);
assertEquals(new Path(root, "base_0000100"), directory.getBaseDirectory());
assertEquals(new Path(root, use130Format ?
@@ -978,13 +979,13 @@ public class TestOrcRawRecordMerger {
merger.close();
// try ignoring the 200 transaction and make sure it works still
- ValidTxnList txns = new ValidReadTxnList("2000:200:200");
+ ValidWriteIdList writeIds = new ValidReaderWriteIdList("testNewBaseAndDelta:2000:200:200");
//again 1st split is for base/
baseReader = OrcFile.createReader(basePath,
OrcFile.readerOptions(conf));
merger =
new OrcRawRecordMerger(conf, false, baseReader, false, BUCKET,
- txns, new Reader.Options(),
+ writeIds, new Reader.Options(),
new Path[] {deleteDeltaDir}, new OrcRawRecordMerger.Options().isCompacting(false));
assertEquals(null, merger.getMinKey());
@@ -1006,7 +1007,7 @@ public class TestOrcRawRecordMerger {
OrcFile.readerOptions(conf));
merger =
new OrcRawRecordMerger(conf, false, baseReader, false, BUCKET,
- txns, new Reader.Options(),
+ writeIds, new Reader.Options(),
new Path[] {deleteDeltaDir}, new OrcRawRecordMerger.Options().isCompacting(false));
assertEquals(null, merger.getMinKey());
@@ -1101,7 +1102,7 @@ public class TestOrcRawRecordMerger {
// write a delta
AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf)
- .writingBase(false).minimumTransactionId(1).maximumTransactionId(1)
+ .writingBase(false).minimumWriteId(1).maximumWriteId(1)
.bucket(BUCKET).inspector(inspector).filesystem(fs).recordIdColumn(5)
.finalDestination(root);
@@ -1119,7 +1120,7 @@ public class TestOrcRawRecordMerger {
ru.close(false);//this doesn't create a key index presumably because writerOptions are not set on 'options'
// write a delta
- options = options.minimumTransactionId(100).maximumTransactionId(100);
+ options = options.minimumWriteId(100).maximumWriteId(100);
ru = of.getRecordUpdater(root, options);
values = new String[]{null, null, "1.0", null, null, null, null, "3.1"};
for(int i=0; i < values.length - 1; ++i) {
@@ -1222,7 +1223,7 @@ public class TestOrcRawRecordMerger {
// make 5 stripes with 2 rows each
OrcRecordUpdater.OrcOptions options = (OrcRecordUpdater.OrcOptions)
new OrcRecordUpdater.OrcOptions(conf)
- .writingBase(true).minimumTransactionId(0).maximumTransactionId(0)
+ .writingBase(true).minimumWriteId(0).maximumWriteId(0)
.bucket(BUCKET).inspector(inspector).filesystem(fs);
final int BUCKET_PROPERTY = BucketCodec.V1.encode(options);
@@ -1240,7 +1241,7 @@ public class TestOrcRawRecordMerger {
ru.close(false);
// write a delta
- options.writingBase(false).minimumTransactionId(1).maximumTransactionId(1)
+ options.writingBase(false).minimumWriteId(1).maximumWriteId(1)
.recordIdColumn(5);
ru = of.getRecordUpdater(root, options);
values = new String[]{"0.0", null, null, "1.1", null, null, null,
@@ -1254,7 +1255,7 @@ public class TestOrcRawRecordMerger {
ru.close(false);
// write a delta
- options.minimumTransactionId(100).maximumTransactionId(100);
+ options.minimumWriteId(100).maximumWriteId(100);
ru = of.getRecordUpdater(root, options);
values = new String[]{null, null, "1.0", null, null, null, null, "3.1"};
for(int i=0; i < values.length - 1; ++i) {
@@ -1358,7 +1359,7 @@ public class TestOrcRawRecordMerger {
AcidOutputFormat.Options options =
new AcidOutputFormat.Options(conf)
.bucket(BUCKET).inspector(inspector).filesystem(fs)
- .writingBase(false).minimumTransactionId(1).maximumTransactionId(1)
+ .writingBase(false).minimumWriteId(1).maximumWriteId(1)
.finalDestination(root);
RecordUpdater ru = of.getRecordUpdater(root, options);
String[][] values = {new String[]{"a", "b", "c", "d", "e"}, new String[]{"f", "g", "h", "i", "j"}};
@@ -1368,7 +1369,7 @@ public class TestOrcRawRecordMerger {
ru.close(false);
// write a delta
- options.minimumTransactionId(2).maximumTransactionId(2);
+ options.minimumWriteId(2).maximumWriteId(2);
ru = of.getRecordUpdater(root, options);
for(int i=0; i < values[1].length; ++i) {
ru.insert(2, new MyRow(values[1][i]));
@@ -1432,7 +1433,7 @@ public class TestOrcRawRecordMerger {
// write a base
AcidOutputFormat.Options options =
new AcidOutputFormat.Options(conf)
- .writingBase(true).minimumTransactionId(0).maximumTransactionId(0)
+ .writingBase(true).minimumWriteId(0).maximumWriteId(0)
.bucket(BUCKET).inspector(inspector).filesystem(fs).finalDestination(root);
if(!use130Format) {
options.statementId(-1);
@@ -1445,8 +1446,8 @@ public class TestOrcRawRecordMerger {
ru.close(false);
// write a delta
- options.writingBase(false).minimumTransactionId(10)
- .maximumTransactionId(19);
+ options.writingBase(false).minimumWriteId(10)
+ .maximumWriteId(19);
ru = of.getRecordUpdater(root, options);
values = new String[]{"6", "7", "8"};
for(int i=0; i < values.length; ++i) {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java
index 7914f0c..ef6dbbb 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java
@@ -53,9 +53,9 @@ public class TestOrcRecordUpdater {
OrcStruct event = new OrcStruct(OrcRecordUpdater.FIELDS);
event.setFieldValue(OrcRecordUpdater.OPERATION,
new IntWritable(OrcRecordUpdater.INSERT_OPERATION));
- event.setFieldValue(OrcRecordUpdater.CURRENT_TRANSACTION,
+ event.setFieldValue(OrcRecordUpdater.CURRENT_WRITEID,
new LongWritable(100));
- event.setFieldValue(OrcRecordUpdater.ORIGINAL_TRANSACTION,
+ event.setFieldValue(OrcRecordUpdater.ORIGINAL_WRITEID,
new LongWritable(50));
event.setFieldValue(OrcRecordUpdater.BUCKET, new IntWritable(200));
event.setFieldValue(OrcRecordUpdater.ROW_ID, new LongWritable(300));
@@ -101,8 +101,8 @@ public class TestOrcRecordUpdater {
.filesystem(fs)
.bucket(10)
.writingBase(false)
- .minimumTransactionId(10)
- .maximumTransactionId(19)
+ .minimumWriteId(10)
+ .maximumWriteId(19)
.inspector(inspector)
.reporter(Reporter.NULL)
.finalDestination(root);
@@ -210,8 +210,8 @@ public class TestOrcRecordUpdater {
.filesystem(fs)
.bucket(10)
.writingBase(false)
- .minimumTransactionId(10)
- .maximumTransactionId(19)
+ .minimumWriteId(10)
+ .maximumWriteId(19)
.inspector(inspector)
.reporter(Reporter.NULL)
.finalDestination(root)
@@ -252,8 +252,8 @@ public class TestOrcRecordUpdater {
.filesystem(fs)
.bucket(bucket)
.writingBase(false)
- .minimumTransactionId(100)
- .maximumTransactionId(100)
+ .minimumWriteId(100)
+ .maximumWriteId(100)
.inspector(inspector)
.reporter(Reporter.NULL)
.recordIdColumn(1)
[02/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
index a90b7d4..ba006cf 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
@@ -286,8 +286,9 @@ class CompactionTxnHandler extends TxnHandler {
try {
dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
stmt = dbConn.createStatement();
- String s = "select cq_id, cq_database, cq_table, cq_partition, " +
- "cq_type, cq_run_as, cq_highest_txn_id from COMPACTION_QUEUE where cq_state = '" + READY_FOR_CLEANING + "'";
+ String s = "select cq_id, cq_database, cq_table, cq_partition, "
+ + "cq_type, cq_run_as, cq_highest_write_id from COMPACTION_QUEUE where cq_state = '"
+ + READY_FOR_CLEANING + "'";
LOG.debug("Going to execute query <" + s + ">");
rs = stmt.executeQuery(s);
while (rs.next()) {
@@ -302,7 +303,7 @@ class CompactionTxnHandler extends TxnHandler {
default: throw new MetaException("Unexpected compaction type " + rs.getString(5));
}
info.runAs = rs.getString(6);
- info.highestTxnId = rs.getLong(7);
+ info.highestWriteId = rs.getLong(7);
rc.add(info);
}
LOG.debug("Going to rollback");
@@ -338,7 +339,7 @@ class CompactionTxnHandler extends TxnHandler {
ResultSet rs = null;
try {
dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
- pStmt = dbConn.prepareStatement("select CQ_ID, CQ_DATABASE, CQ_TABLE, CQ_PARTITION, CQ_STATE, CQ_TYPE, CQ_TBLPROPERTIES, CQ_WORKER_ID, CQ_START, CQ_RUN_AS, CQ_HIGHEST_TXN_ID, CQ_META_INFO, CQ_HADOOP_JOB_ID from COMPACTION_QUEUE WHERE CQ_ID = ?");
+ pStmt = dbConn.prepareStatement("select CQ_ID, CQ_DATABASE, CQ_TABLE, CQ_PARTITION, CQ_STATE, CQ_TYPE, CQ_TBLPROPERTIES, CQ_WORKER_ID, CQ_START, CQ_RUN_AS, CQ_HIGHEST_WRITE_ID, CQ_META_INFO, CQ_HADOOP_JOB_ID from COMPACTION_QUEUE WHERE CQ_ID = ?");
pStmt.setLong(1, info.id);
rs = pStmt.executeQuery();
if(rs.next()) {
@@ -358,21 +359,21 @@ class CompactionTxnHandler extends TxnHandler {
LOG.debug("Going to rollback");
dbConn.rollback();
}
- pStmt = dbConn.prepareStatement("insert into COMPLETED_COMPACTIONS(CC_ID, CC_DATABASE, CC_TABLE, CC_PARTITION, CC_STATE, CC_TYPE, CC_TBLPROPERTIES, CC_WORKER_ID, CC_START, CC_END, CC_RUN_AS, CC_HIGHEST_TXN_ID, CC_META_INFO, CC_HADOOP_JOB_ID) VALUES(?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)");
+ pStmt = dbConn.prepareStatement("insert into COMPLETED_COMPACTIONS(CC_ID, CC_DATABASE, CC_TABLE, CC_PARTITION, CC_STATE, CC_TYPE, CC_TBLPROPERTIES, CC_WORKER_ID, CC_START, CC_END, CC_RUN_AS, CC_HIGHEST_WRITE_ID, CC_META_INFO, CC_HADOOP_JOB_ID) VALUES(?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)");
info.state = SUCCEEDED_STATE;
CompactionInfo.insertIntoCompletedCompactions(pStmt, info, getDbTime(dbConn));
updCount = pStmt.executeUpdate();
// Remove entries from completed_txn_components as well, so we don't start looking there
- // again but only up to the highest txn ID include in this compaction job.
- //highestTxnId will be NULL in upgrade scenarios
+ // again but only up to the highest write ID include in this compaction job.
+ //highestWriteId will be NULL in upgrade scenarios
s = "delete from COMPLETED_TXN_COMPONENTS where ctc_database = ? and " +
"ctc_table = ?";
if (info.partName != null) {
s += " and ctc_partition = ?";
}
- if(info.highestTxnId != 0) {
- s += " and ctc_txnid <= ?";
+ if(info.highestWriteId != 0) {
+ s += " and ctc_writeid <= ?";
}
pStmt = dbConn.prepareStatement(s);
int paramCount = 1;
@@ -381,8 +382,8 @@ class CompactionTxnHandler extends TxnHandler {
if (info.partName != null) {
pStmt.setString(paramCount++, info.partName);
}
- if(info.highestTxnId != 0) {
- pStmt.setLong(paramCount++, info.highestTxnId);
+ if(info.highestWriteId != 0) {
+ pStmt.setLong(paramCount++, info.highestWriteId);
}
LOG.debug("Going to execute update <" + s + ">");
if (pStmt.executeUpdate() < 1) {
@@ -392,15 +393,15 @@ class CompactionTxnHandler extends TxnHandler {
s = "select distinct txn_id from TXNS, TXN_COMPONENTS where txn_id = tc_txnid and txn_state = '" +
TXN_ABORTED + "' and tc_database = ? and tc_table = ?";
- if (info.highestTxnId != 0) s += " and txn_id <= ?";
+ if (info.highestWriteId != 0) s += " and tc_writeid <= ?";
if (info.partName != null) s += " and tc_partition = ?";
pStmt = dbConn.prepareStatement(s);
paramCount = 1;
pStmt.setString(paramCount++, info.dbname);
pStmt.setString(paramCount++, info.tableName);
- if(info.highestTxnId != 0) {
- pStmt.setLong(paramCount++, info.highestTxnId);
+ if(info.highestWriteId != 0) {
+ pStmt.setLong(paramCount++, info.highestWriteId);
}
if (info.partName != null) {
pStmt.setString(paramCount++, info.partName);
@@ -700,14 +701,14 @@ class CompactionTxnHandler extends TxnHandler {
*/
@Override
@RetrySemantics.Idempotent
- public void setCompactionHighestTxnId(CompactionInfo ci, long highestTxnId) throws MetaException {
+ public void setCompactionHighestWriteId(CompactionInfo ci, long highestWriteId) throws MetaException {
Connection dbConn = null;
Statement stmt = null;
try {
try {
dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
stmt = dbConn.createStatement();
- int updCount = stmt.executeUpdate("UPDATE COMPACTION_QUEUE SET CQ_HIGHEST_TXN_ID = " + highestTxnId +
+ int updCount = stmt.executeUpdate("UPDATE COMPACTION_QUEUE SET CQ_HIGHEST_WRITE_ID = " + highestWriteId +
" WHERE CQ_ID = " + ci.id);
if(updCount != 1) {
throw new IllegalStateException("Could not find record in COMPACTION_QUEUE for " + ci);
@@ -715,14 +716,14 @@ class CompactionTxnHandler extends TxnHandler {
dbConn.commit();
} catch (SQLException e) {
rollbackDBConn(dbConn);
- checkRetryable(dbConn, e, "setCompactionHighestTxnId(" + ci + "," + highestTxnId + ")");
+ checkRetryable(dbConn, e, "setCompactionHighestWriteId(" + ci + "," + highestWriteId + ")");
throw new MetaException("Unable to connect to transaction database " +
StringUtils.stringifyException(e));
} finally {
close(null, stmt, dbConn);
}
} catch (RetryException ex) {
- setCompactionHighestTxnId(ci, highestTxnId);
+ setCompactionHighestWriteId(ci, highestWriteId);
}
}
private static class RetentionCounters {
@@ -932,7 +933,7 @@ class CompactionTxnHandler extends TxnHandler {
try {
dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
stmt = dbConn.createStatement();
- pStmt = dbConn.prepareStatement("select CQ_ID, CQ_DATABASE, CQ_TABLE, CQ_PARTITION, CQ_STATE, CQ_TYPE, CQ_TBLPROPERTIES, CQ_WORKER_ID, CQ_START, CQ_RUN_AS, CQ_HIGHEST_TXN_ID, CQ_META_INFO, CQ_HADOOP_JOB_ID from COMPACTION_QUEUE WHERE CQ_ID = ?");
+ pStmt = dbConn.prepareStatement("select CQ_ID, CQ_DATABASE, CQ_TABLE, CQ_PARTITION, CQ_STATE, CQ_TYPE, CQ_TBLPROPERTIES, CQ_WORKER_ID, CQ_START, CQ_RUN_AS, CQ_HIGHEST_WRITE_ID, CQ_META_INFO, CQ_HADOOP_JOB_ID from COMPACTION_QUEUE WHERE CQ_ID = ?");
pStmt.setLong(1, ci.id);
rs = pStmt.executeQuery();
if(rs.next()) {
@@ -966,7 +967,7 @@ class CompactionTxnHandler extends TxnHandler {
close(rs, stmt, null);
closeStmt(pStmt);
- pStmt = dbConn.prepareStatement("insert into COMPLETED_COMPACTIONS(CC_ID, CC_DATABASE, CC_TABLE, CC_PARTITION, CC_STATE, CC_TYPE, CC_TBLPROPERTIES, CC_WORKER_ID, CC_START, CC_END, CC_RUN_AS, CC_HIGHEST_TXN_ID, CC_META_INFO, CC_HADOOP_JOB_ID) VALUES(?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)");
+ pStmt = dbConn.prepareStatement("insert into COMPLETED_COMPACTIONS(CC_ID, CC_DATABASE, CC_TABLE, CC_PARTITION, CC_STATE, CC_TYPE, CC_TBLPROPERTIES, CC_WORKER_ID, CC_START, CC_END, CC_RUN_AS, CC_HIGHEST_WRITE_ID, CC_META_INFO, CC_HADOOP_JOB_ID) VALUES(?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)");
CompactionInfo.insertIntoCompletedCompactions(pStmt, ci, getDbTime(dbConn));
int updCount = pStmt.executeUpdate();
LOG.debug("Going to commit");
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java
index e724723..88f6346 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java
@@ -86,16 +86,29 @@ public final class TxnDbUtil {
" TC_DATABASE varchar(128) NOT NULL," +
" TC_TABLE varchar(128)," +
" TC_PARTITION varchar(767)," +
- " TC_OPERATION_TYPE char(1) NOT NULL)");
+ " TC_OPERATION_TYPE char(1) NOT NULL," +
+ " TC_WRITEID bigint)");
stmt.execute("CREATE TABLE COMPLETED_TXN_COMPONENTS (" +
" CTC_TXNID bigint," +
" CTC_DATABASE varchar(128) NOT NULL," +
" CTC_TABLE varchar(128)," +
" CTC_PARTITION varchar(767)," +
" CTC_ID bigint GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) NOT NULL," +
- " CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL)");
+ " CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL," +
+ " CTC_WRITEID bigint)");
stmt.execute("CREATE TABLE NEXT_TXN_ID (" + " NTXN_NEXT bigint NOT NULL)");
stmt.execute("INSERT INTO NEXT_TXN_ID VALUES(1)");
+
+ stmt.execute("CREATE TABLE TXN_TO_WRITE_ID (" +
+ " T2W_TXNID bigint NOT NULL," +
+ " T2W_DATABASE varchar(128) NOT NULL," +
+ " T2W_TABLE varchar(256) NOT NULL," +
+ " T2W_WRITEID bigint NOT NULL)");
+ stmt.execute("CREATE TABLE NEXT_WRITE_ID (" +
+ " NWI_DATABASE varchar(128) NOT NULL," +
+ " NWI_TABLE varchar(256) NOT NULL," +
+ " NWI_NEXT bigint NOT NULL)");
+
stmt.execute("CREATE TABLE HIVE_LOCKS (" +
" HL_LOCK_EXT_ID bigint NOT NULL," +
" HL_LOCK_INT_ID bigint NOT NULL," +
@@ -130,7 +143,7 @@ public final class TxnDbUtil {
" CQ_WORKER_ID varchar(128)," +
" CQ_START bigint," +
" CQ_RUN_AS varchar(128)," +
- " CQ_HIGHEST_TXN_ID bigint," +
+ " CQ_HIGHEST_WRITE_ID bigint," +
" CQ_META_INFO varchar(2048) for bit data," +
" CQ_HADOOP_JOB_ID varchar(32))");
@@ -138,20 +151,20 @@ public final class TxnDbUtil {
stmt.execute("INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1)");
stmt.execute("CREATE TABLE COMPLETED_COMPACTIONS (" +
- " CC_ID bigint PRIMARY KEY," +
- " CC_DATABASE varchar(128) NOT NULL," +
- " CC_TABLE varchar(128) NOT NULL," +
- " CC_PARTITION varchar(767)," +
- " CC_STATE char(1) NOT NULL," +
- " CC_TYPE char(1) NOT NULL," +
- " CC_TBLPROPERTIES varchar(2048)," +
- " CC_WORKER_ID varchar(128)," +
- " CC_START bigint," +
- " CC_END bigint," +
- " CC_RUN_AS varchar(128)," +
- " CC_HIGHEST_TXN_ID bigint," +
- " CC_META_INFO varchar(2048) for bit data," +
- " CC_HADOOP_JOB_ID varchar(32))");
+ " CC_ID bigint PRIMARY KEY," +
+ " CC_DATABASE varchar(128) NOT NULL," +
+ " CC_TABLE varchar(128) NOT NULL," +
+ " CC_PARTITION varchar(767)," +
+ " CC_STATE char(1) NOT NULL," +
+ " CC_TYPE char(1) NOT NULL," +
+ " CC_TBLPROPERTIES varchar(2048)," +
+ " CC_WORKER_ID varchar(128)," +
+ " CC_START bigint," +
+ " CC_END bigint," +
+ " CC_RUN_AS varchar(128)," +
+ " CC_HIGHEST_WRITE_ID bigint," +
+ " CC_META_INFO varchar(2048) for bit data," +
+ " CC_HADOOP_JOB_ID varchar(32))");
stmt.execute("CREATE TABLE AUX_TABLE (" +
" MT_KEY1 varchar(128) NOT NULL," +
@@ -219,6 +232,8 @@ public final class TxnDbUtil {
success &= dropTable(stmt, "COMPLETED_TXN_COMPONENTS", retryCount);
success &= dropTable(stmt, "TXNS", retryCount);
success &= dropTable(stmt, "NEXT_TXN_ID", retryCount);
+ success &= dropTable(stmt, "TXN_TO_WRITE_ID", retryCount);
+ success &= dropTable(stmt, "NEXT_WRITE_ID", retryCount);
success &= dropTable(stmt, "HIVE_LOCKS", retryCount);
success &= dropTable(stmt, "NEXT_LOCK_ID", retryCount);
success &= dropTable(stmt, "COMPACTION_QUEUE", retryCount);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
index 1bb976c..ac61715 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
@@ -61,6 +61,7 @@ import org.apache.commons.pool.impl.GenericObjectPool;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.common.ValidReadTxnList;
import org.apache.hadoop.hive.common.ValidTxnList;
import org.apache.hadoop.hive.common.classification.RetrySemantics;
import org.apache.hadoop.hive.metastore.DatabaseProduct;
@@ -69,6 +70,8 @@ import org.apache.hadoop.hive.metastore.Warehouse;
import org.apache.hadoop.hive.metastore.api.AbortTxnRequest;
import org.apache.hadoop.hive.metastore.api.AbortTxnsRequest;
import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsRequest;
+import org.apache.hadoop.hive.metastore.api.AllocateTableWriteIdsResponse;
import org.apache.hadoop.hive.metastore.api.BasicTxnInfo;
import org.apache.hadoop.hive.metastore.api.CheckLockRequest;
import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
@@ -80,6 +83,8 @@ import org.apache.hadoop.hive.metastore.api.Database;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse;
import org.apache.hadoop.hive.metastore.api.GetOpenTxnsResponse;
+import org.apache.hadoop.hive.metastore.api.GetValidWriteIdsRequest;
+import org.apache.hadoop.hive.metastore.api.GetValidWriteIdsResponse;
import org.apache.hadoop.hive.metastore.api.HeartbeatRequest;
import org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeRequest;
import org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeResponse;
@@ -102,10 +107,12 @@ import org.apache.hadoop.hive.metastore.api.ShowLocksRequest;
import org.apache.hadoop.hive.metastore.api.ShowLocksResponse;
import org.apache.hadoop.hive.metastore.api.ShowLocksResponseElement;
import org.apache.hadoop.hive.metastore.api.Table;
+import org.apache.hadoop.hive.metastore.api.TableValidWriteIds;
import org.apache.hadoop.hive.metastore.api.TxnAbortedException;
import org.apache.hadoop.hive.metastore.api.TxnInfo;
import org.apache.hadoop.hive.metastore.api.TxnOpenException;
import org.apache.hadoop.hive.metastore.api.TxnState;
+import org.apache.hadoop.hive.metastore.api.TxnToWriteId;
import org.apache.hadoop.hive.metastore.api.UnlockRequest;
import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
@@ -819,8 +826,8 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
// Move the record from txn_components into completed_txn_components so that the compactor
// knows where to look to compact.
String s = "insert into COMPLETED_TXN_COMPONENTS (ctc_txnid, ctc_database, " +
- "ctc_table, ctc_partition) select tc_txnid, tc_database, tc_table, " +
- "tc_partition from TXN_COMPONENTS where tc_txnid = " + txnid;
+ "ctc_table, ctc_partition, ctc_writeid) select tc_txnid, tc_database, tc_table, " +
+ "tc_partition, tc_writeid from TXN_COMPONENTS where tc_txnid = " + txnid;
LOG.debug("Going to execute insert <" + s + ">");
int modCount = 0;
if ((modCount = stmt.executeUpdate(s)) < 1) {
@@ -869,6 +876,244 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
}
@Override
+ @RetrySemantics.ReadOnly
+ public GetValidWriteIdsResponse getValidWriteIds(GetValidWriteIdsRequest rqst)
+ throws NoSuchTxnException, MetaException {
+ try {
+ Connection dbConn = null;
+ Statement stmt = null;
+ ValidTxnList validTxnList;
+
+ // We should prepare the valid write ids list based on validTxnList of current txn.
+ // If no txn exists in the caller, then they would pass null for validTxnList and so it is
+ // required to get the current state of txns to make validTxnList
+ if (rqst.isSetValidTxnList()) {
+ validTxnList = new ValidReadTxnList(rqst.getValidTxnList());
+ } else {
+ // Passing 0 for currentTxn means, this validTxnList is not wrt to any txn
+ validTxnList = TxnUtils.createValidReadTxnList(getOpenTxns(), 0);
+ }
+ try {
+ /**
+ * This runs at READ_COMMITTED for exactly the same reason as {@link #getOpenTxnsInfo()}
+ */
+ dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
+ stmt = dbConn.createStatement();
+
+ // Get the valid write id list for all the tables read by the current txn
+ List<TableValidWriteIds> tblValidWriteIdsList = new ArrayList<>();
+ for (String fullTableName : rqst.getFullTableNames()) {
+ tblValidWriteIdsList.add(getValidWriteIdsForTable(stmt, fullTableName, validTxnList));
+ }
+
+ LOG.debug("Going to rollback");
+ dbConn.rollback();
+ GetValidWriteIdsResponse owr = new GetValidWriteIdsResponse(tblValidWriteIdsList);
+ return owr;
+ } catch (SQLException e) {
+ LOG.debug("Going to rollback");
+ rollbackDBConn(dbConn);
+ checkRetryable(dbConn, e, "getValidWriteIds");
+ throw new MetaException("Unable to select from transaction database, "
+ + StringUtils.stringifyException(e));
+ } finally {
+ close(null, stmt, dbConn);
+ }
+ } catch (RetryException e) {
+ return getValidWriteIds(rqst);
+ }
+ }
+
+ // Method to get the Valid write ids list for the given table
+ // Input fullTableName is expected to be of format <db_name>.<table_name>
+ private TableValidWriteIds getValidWriteIdsForTable(Statement stmt, String fullTableName,
+ ValidTxnList validTxnList) throws SQLException {
+ ResultSet rs = null;
+ String[] names = TxnUtils.getDbTableName(fullTableName);
+ try {
+ // Need to initialize to 0 to make sure if nobody modified this table, then current txn
+ // shouldn't read any data
+ long writeIdHwm = 0;
+ List<Long> invalidWriteIdList = new ArrayList<>();
+ long txnHwm = validTxnList.getHighWatermark();
+
+ // The output includes all the txns which are under the high water mark. It includes
+ // the committed transactions as well. The results should be sorted in ascending order based
+ // on write id. The sorting is needed as exceptions list in ValidWriteIdList would be looked-up
+ // using binary search.
+ String s = "select t2w_txnid, t2w_writeid from TXN_TO_WRITE_ID where t2w_txnid <= " + txnHwm
+ + " and t2w_database = " + quoteString(names[0])
+ + " and t2w_table = " + quoteString(names[1])
+ + " order by t2w_writeid asc";
+ LOG.debug("Going to execute query<" + s + ">");
+ rs = stmt.executeQuery(s);
+ long minOpenWriteId = Long.MAX_VALUE;
+ BitSet abortedBits = new BitSet();
+ while (rs.next()) {
+ long txnId = rs.getLong(1);
+ long writeId = rs.getLong(2);
+ writeIdHwm = Math.max(writeIdHwm, writeId);
+ if (validTxnList.isTxnValid(txnId)) {
+ // Skip if the transaction under evaluation is already committed.
+ continue;
+ }
+
+ // The current txn is either in open or aborted state.
+ // Mark the write ids state as per the txn state.
+ if (validTxnList.isTxnAborted(txnId)) {
+ invalidWriteIdList.add(writeId);
+ abortedBits.set(invalidWriteIdList.size() - 1);
+ } else {
+ invalidWriteIdList.add(writeId);
+ minOpenWriteId = Math.min(minOpenWriteId, writeId);
+ }
+ }
+
+ ByteBuffer byteBuffer = ByteBuffer.wrap(abortedBits.toByteArray());
+ TableValidWriteIds owi = new TableValidWriteIds(fullTableName, writeIdHwm, invalidWriteIdList, byteBuffer);
+ if (minOpenWriteId < Long.MAX_VALUE) {
+ owi.setMinOpenWriteId(minOpenWriteId);
+ }
+ return owi;
+ } finally {
+ close(rs);
+ }
+ }
+
+ @Override
+ public AllocateTableWriteIdsResponse allocateTableWriteIds(AllocateTableWriteIdsRequest rqst)
+ throws NoSuchTxnException, TxnAbortedException, MetaException {
+ List<Long> txnIds = rqst.getTxnIds();
+ String dbName = rqst.getDbName().toLowerCase();
+ String tblName = rqst.getTableName().toLowerCase();
+ try {
+ Connection dbConn = null;
+ Statement stmt = null;
+ ResultSet rs = null;
+ TxnStore.MutexAPI.LockHandle handle = null;
+ try {
+ lockInternal();
+ dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
+ stmt = dbConn.createStatement();
+
+ Collections.sort(txnIds); //easier to read logs
+
+ // Check if all the input txns are in open state. Write ID should be allocated only for open transactions.
+ if (!isTxnsInOpenState(txnIds, stmt)) {
+ ensureAllTxnsValid(dbName, tblName, txnIds, stmt);
+ throw new RuntimeException("This should never happen for txnIds: " + txnIds);
+ }
+
+ List<TxnToWriteId> txnToWriteIds = new ArrayList<>();
+ List<Long> allocatedTxns = new ArrayList<>();
+ long txnId;
+ long writeId;
+ List<String> queries = new ArrayList<>();
+ StringBuilder prefix = new StringBuilder();
+ StringBuilder suffix = new StringBuilder();
+
+ // Traverse the TXN_TO_WRITE_ID to see if any of the input txns already have allocated a
+ // write id for the same db.table. If yes, then need to reuse it else have to allocate new one
+ // The write id would have been already allocated in case of multi-statement txns where
+ // first write on a table will allocate write id and rest of the writes should re-use it.
+ prefix.append("select t2w_txnid, t2w_writeid from TXN_TO_WRITE_ID where"
+ + " t2w_database = " + quoteString(dbName)
+ + " and t2w_table = " + quoteString(tblName) + " and ");
+ suffix.append("");
+ TxnUtils.buildQueryWithINClause(conf, queries, prefix, suffix,
+ txnIds, "t2w_txnid", false, false);
+ for (String query : queries) {
+ LOG.debug("Going to execute query <" + query + ">");
+ rs = stmt.executeQuery(query);
+ while (rs.next()) {
+ // If table write ID is already allocated for the given transaction, then just use it
+ txnId = rs.getLong(1);
+ writeId = rs.getLong(2);
+ txnToWriteIds.add(new TxnToWriteId(txnId, writeId));
+ allocatedTxns.add(txnId);
+ LOG.info("Reused already allocated writeID: " + writeId + " for txnId: " + txnId);
+ }
+ }
+
+ // If all the txns in the list have already allocated write ids, then just skip new allocations
+ long numOfWriteIds = txnIds.size() - allocatedTxns.size();
+ assert(numOfWriteIds >= 0);
+ if (0 == numOfWriteIds) {
+ // If all the txns in the list have pre-allocated write ids for the given table, then just return
+ return new AllocateTableWriteIdsResponse(txnToWriteIds);
+ }
+
+ handle = getMutexAPI().acquireLock(MUTEX_KEY.WriteIdAllocator.name());
+
+ // There are some txns in the list which has no write id allocated and hence go ahead and do it.
+ // Get the next write id for the given table and update it with new next write id.
+ // This is select for update query which takes a lock if the table entry is already there in NEXT_WRITE_ID
+ String s = sqlGenerator.addForUpdateClause(
+ "select nwi_next from NEXT_WRITE_ID where nwi_database = " + quoteString(dbName)
+ + " and nwi_table = " + quoteString(tblName));
+ LOG.debug("Going to execute query <" + s + ">");
+ rs = stmt.executeQuery(s);
+ if (!rs.next()) {
+ // First allocation of write id should add the table to the next_write_id meta table
+ // The initial value for write id should be 1 and hence we add 1 with number of write ids allocated here
+ s = "insert into NEXT_WRITE_ID (nwi_database, nwi_table, nwi_next) values ("
+ + quoteString(dbName) + "," + quoteString(tblName) + "," + String.valueOf(numOfWriteIds + 1) + ")";
+ LOG.debug("Going to execute insert <" + s + ">");
+ stmt.execute(s);
+ writeId = 1;
+ } else {
+ // Update the NEXT_WRITE_ID for the given table after incrementing by number of write ids allocated
+ writeId = rs.getLong(1);
+ s = "update NEXT_WRITE_ID set nwi_next = " + (writeId + numOfWriteIds)
+ + " where nwi_database = " + quoteString(dbName)
+ + " and nwi_table = " + quoteString(tblName);
+ LOG.debug("Going to execute update <" + s + ">");
+ stmt.executeUpdate(s);
+ }
+
+ // Map the newly allocated write ids against the list of txns which doesn't have pre-allocated
+ // write ids
+ List<String> rows = new ArrayList<>();
+ for (long txn : txnIds) {
+ if (allocatedTxns.contains(txn)) {
+ continue;
+ }
+ rows.add(txn + ", " + quoteString(dbName) + ", " + quoteString(tblName) + ", " + writeId);
+ txnToWriteIds.add(new TxnToWriteId(txn, writeId));
+ LOG.info("Allocated writeID: " + writeId + " for txnId: " + txn);
+ writeId++;
+ }
+
+ // Insert entries to TXN_TO_WRITE_ID for newly allocated write ids
+ List<String> inserts = sqlGenerator.createInsertValuesStmt(
+ "TXN_TO_WRITE_ID (t2w_txnid, t2w_database, t2w_table, t2w_writeid)", rows);
+ for (String insert : inserts) {
+ LOG.debug("Going to execute insert <" + insert + ">");
+ stmt.execute(insert);
+ }
+
+ LOG.debug("Going to commit");
+ dbConn.commit();
+ return new AllocateTableWriteIdsResponse(txnToWriteIds);
+ } catch (SQLException e) {
+ LOG.debug("Going to rollback");
+ rollbackDBConn(dbConn);
+ checkRetryable(dbConn, e, "allocateTableWriteIds(" + rqst + ")");
+ throw new MetaException("Unable to update transaction database "
+ + StringUtils.stringifyException(e));
+ } finally {
+ close(rs, stmt, dbConn);
+ if(handle != null) {
+ handle.releaseLocks();
+ }
+ unlockInternal();
+ }
+ } catch (RetryException e) {
+ return allocateTableWriteIds(rqst);
+ }
+ }
+
+ @Override
@RetrySemantics.SafeToRetry
public void performWriteSetGC() {
Connection dbConn = null;
@@ -1122,13 +1367,30 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
String dbName = lc.getDbname();
String tblName = lc.getTablename();
String partName = lc.getPartitionname();
+ Long writeId = null;
+ if (tblName != null) {
+ // It is assumed the caller have already allocated write id for adding/updating data to
+ // the acid tables. However, DDL operatons won't allocate write id and hence this query
+ // may return empty result sets.
+ // Get the write id allocated by this txn for the given table writes
+ s = "select t2w_writeid from TXN_TO_WRITE_ID where"
+ + " t2w_database = " + quoteString(dbName.toLowerCase())
+ + " and t2w_table = " + quoteString(tblName.toLowerCase())
+ + " and t2w_txnid = " + txnid;
+ LOG.debug("Going to execute query <" + s + ">");
+ rs = stmt.executeQuery(s);
+ if (rs.next()) {
+ writeId = rs.getLong(1);
+ }
+ }
rows.add(txnid + ", '" + dbName + "', " +
- (tblName == null ? "null" : "'" + tblName + "'") + ", " +
- (partName == null ? "null" : "'" + partName + "'")+ "," +
- quoteString(OpertaionType.fromDataOperationType(lc.getOperationType()).toString()));
+ (tblName == null ? "null" : "'" + tblName + "'") + ", " +
+ (partName == null ? "null" : "'" + partName + "'")+ "," +
+ quoteString(OpertaionType.fromDataOperationType(lc.getOperationType()).toString())+ "," +
+ (writeId == null ? "null" : writeId));
}
List<String> queries = sqlGenerator.createInsertValuesStmt(
- "TXN_COMPONENTS (tc_txnid, tc_database, tc_table, tc_partition, tc_operation_type)", rows);
+ "TXN_COMPONENTS (tc_txnid, tc_database, tc_table, tc_partition, tc_operation_type, tc_writeid)", rows);
for(String query : queries) {
LOG.debug("Going to execute update <" + query + ">");
int modCount = stmt.executeUpdate(query);
@@ -1810,7 +2072,6 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
Connection dbConn = null;
Statement stmt = null;
ResultSet lockHandle = null;
- ResultSet rs = null;
try {
try {
lockInternal();
@@ -1827,15 +2088,17 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
if(rqst.isSetOperationType()) {
ot = OpertaionType.fromDataOperationType(rqst.getOperationType());
}
+
+ Long writeId = rqst.getWriteid();
List<String> rows = new ArrayList<>();
for (String partName : rqst.getPartitionnames()) {
rows.add(rqst.getTxnid() + "," + quoteString(rqst.getDbname()) + "," + quoteString(rqst.getTablename()) +
- "," + quoteString(partName) + "," + quoteChar(ot.sqlConst));
+ "," + quoteString(partName) + "," + quoteChar(ot.sqlConst) + "," + writeId);
}
int modCount = 0;
//record partitions that were written to
List<String> queries = sqlGenerator.createInsertValuesStmt(
- "TXN_COMPONENTS (tc_txnid, tc_database, tc_table, tc_partition, tc_operation_type)", rows);
+ "TXN_COMPONENTS (tc_txnid, tc_database, tc_table, tc_partition, tc_operation_type, tc_writeid)", rows);
for(String query : queries) {
LOG.debug("Going to execute update <" + query + ">");
modCount = stmt.executeUpdate(query);
@@ -1880,7 +2143,7 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
StringBuilder buff = new StringBuilder();
switch (type) {
- case DATABASE:
+ case DATABASE: {
dbName = db.getName();
buff.append("delete from TXN_COMPONENTS where tc_database='");
@@ -1906,8 +2169,21 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
buff.append("'");
queries.add(buff.toString());
+ buff.setLength(0);
+ buff.append("delete from TXN_TO_WRITE_ID where t2w_database='");
+ buff.append(dbName.toLowerCase());
+ buff.append("'");
+ queries.add(buff.toString());
+
+ buff.setLength(0);
+ buff.append("delete from NEXT_WRITE_ID where nwi_database='");
+ buff.append(dbName.toLowerCase());
+ buff.append("'");
+ queries.add(buff.toString());
+
break;
- case TABLE:
+ }
+ case TABLE: {
dbName = table.getDbName();
tblName = table.getTableName();
@@ -1942,8 +2218,25 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
buff.append("'");
queries.add(buff.toString());
+ buff.setLength(0);
+ buff.append("delete from TXN_TO_WRITE_ID where t2w_database='");
+ buff.append(dbName.toLowerCase());
+ buff.append("' and t2w_table='");
+ buff.append(tblName.toLowerCase());
+ buff.append("'");
+ queries.add(buff.toString());
+
+ buff.setLength(0);
+ buff.append("delete from NEXT_WRITE_ID where nwi_database='");
+ buff.append(dbName.toLowerCase());
+ buff.append("' and nwi_table='");
+ buff.append(tblName.toLowerCase());
+ buff.append("'");
+ queries.add(buff.toString());
+
break;
- case PARTITION:
+ }
+ case PARTITION: {
dbName = table.getDbName();
tblName = table.getTableName();
List<FieldSchema> partCols = table.getPartitionKeys(); // partition columns
@@ -1996,8 +2289,10 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
}
break;
- default:
+ }
+ default: {
throw new MetaException("Invalid object type for cleanup: " + type);
+ }
}
for (String query : queries) {
@@ -3003,6 +3298,115 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
}
/**
+ * Checks if all the txns in the list are in open state.
+ * @param txnIds list of txns to be evaluated for open state
+ * @param stmt db statement
+ * @return If all txns in open state, then return true else false
+ */
+ private boolean isTxnsInOpenState(List<Long> txnIds, Statement stmt) throws SQLException {
+ List<String> queries = new ArrayList<>();
+ StringBuilder prefix = new StringBuilder();
+ StringBuilder suffix = new StringBuilder();
+
+ // Get the count of txns from the given list are in open state. If the returned count is same as
+ // the input number of txns, then it means, all are in open state.
+ prefix.append("select count(*) from TXNS where txn_state = '" + TXN_OPEN + "' and ");
+ suffix.append("");
+ TxnUtils.buildQueryWithINClause(conf, queries, prefix, suffix,
+ txnIds, "txn_id", false, false);
+
+ long count = 0;
+ for (String query : queries) {
+ LOG.debug("Going to execute query <" + query + ">");
+ ResultSet rs = stmt.executeQuery(query);
+ if (rs.next()) {
+ count += rs.getLong(1);
+ }
+ }
+ return count == txnIds.size();
+ }
+
+ /**
+ * Checks if all the txns in the list are in open state.
+ * @param dbName Database name
+ * @param tblName Table on which we try to allocate write id
+ * @param txnIds list of txns to be evaluated for open state
+ * @param stmt db statement
+ */
+ private void ensureAllTxnsValid(String dbName, String tblName, List<Long> txnIds, Statement stmt)
+ throws SQLException {
+ List<String> queries = new ArrayList<>();
+ StringBuilder prefix = new StringBuilder();
+ StringBuilder suffix = new StringBuilder();
+
+ // Check if any of the txns in the list is aborted.
+ prefix.append("select txn_id, txn_state from TXNS where ");
+ suffix.append("");
+ TxnUtils.buildQueryWithINClause(conf, queries, prefix, suffix,
+ txnIds, "txn_id", false, false);
+ Long txnId;
+ char txnState;
+ boolean isAborted = false;
+ StringBuilder errorMsg = new StringBuilder();
+ errorMsg.append("Write ID allocation on ")
+ .append(Warehouse.getQualifiedName(dbName, tblName))
+ .append(" failed for input txns: ");
+ for (String query : queries) {
+ LOG.debug("Going to execute query <" + query + ">");
+ ResultSet rs = stmt.executeQuery(query);
+ while (rs.next()) {
+ txnId = rs.getLong(1);
+ txnState = rs.getString(2).charAt(0);
+ if (txnState != TXN_OPEN) {
+ isAborted = true;
+ errorMsg.append("{").append(txnId).append(",").append(txnState).append("}");
+ }
+ }
+ }
+ // Check if any of the txns in the list is committed.
+ boolean isCommitted = checkIfTxnsCommitted(txnIds, stmt, errorMsg);
+ if (isAborted || isCommitted) {
+ LOG.error(errorMsg.toString());
+ throw new IllegalStateException("Write ID allocation failed on "
+ + Warehouse.getQualifiedName(dbName, tblName)
+ + " as not all input txns in open state");
+ }
+ }
+
+ /**
+ * Checks if all the txns in the list are in committed. If yes, throw eception.
+ * @param txnIds list of txns to be evaluated for committed
+ * @param stmt db statement
+ * @return true if any input txn is committed, else false
+ */
+ private boolean checkIfTxnsCommitted(List<Long> txnIds, Statement stmt, StringBuilder errorMsg)
+ throws SQLException {
+ List<String> queries = new ArrayList<>();
+ StringBuilder prefix = new StringBuilder();
+ StringBuilder suffix = new StringBuilder();
+
+ // Check if any of the txns in the list is committed. If yes, throw exception.
+ prefix.append("select ctc_txnid from COMPLETED_TXN_COMPONENTS where ");
+ suffix.append("");
+ TxnUtils.buildQueryWithINClause(conf, queries, prefix, suffix,
+ txnIds, "ctc_txnid", false, false);
+ Long txnId;
+ boolean isCommitted = false;
+ for (String query : queries) {
+ LOG.debug("Going to execute query <" + query + ">");
+ ResultSet rs = stmt.executeQuery(query);
+ while (rs.next()) {
+ isCommitted = true;
+ txnId = rs.getLong(1);
+ if (errorMsg != null) {
+ errorMsg.append("{").append(txnId).append(",c}");
+ }
+ }
+ }
+ return isCommitted;
+ }
+
+ /**
* Used to raise an informative error when the caller expected a txn in a particular TxnStatus
* but found it in some other status
*/
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnStore.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnStore.java
index 3e27034..38fa0e2 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnStore.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnStore.java
@@ -38,8 +38,10 @@ import java.util.Set;
@InterfaceStability.Evolving
public interface TxnStore extends Configurable {
- enum MUTEX_KEY {Initiator, Cleaner, HouseKeeper, CompactionHistory, CheckLock,
- WriteSetCleaner, CompactionScheduler}
+ enum MUTEX_KEY {
+ Initiator, Cleaner, HouseKeeper, CompactionHistory, CheckLock,
+ WriteSetCleaner, CompactionScheduler, WriteIdAllocator
+ }
// Compactor states (Should really be enum)
String INITIATED_RESPONSE = "initiated";
String WORKING_RESPONSE = "working";
@@ -123,6 +125,25 @@ public interface TxnStore extends Configurable {
public BasicTxnInfo getFirstCompletedTransactionForTableAfterCommit(
String inputDbName, String inputTableName, ValidTxnList txnList)
throws MetaException;
+ /**
+ * Gets the list of valid write ids for the given table wrt to current txn
+ * @param rqst info on transaction and list of table names associated with given transaction
+ * @throws NoSuchTxnException
+ * @throws MetaException
+ */
+ @RetrySemantics.ReadOnly
+ GetValidWriteIdsResponse getValidWriteIds(GetValidWriteIdsRequest rqst)
+ throws NoSuchTxnException, MetaException;
+
+ /**
+ * Allocate a write ID for the given table and associate it with a transaction
+ * @param rqst info on transaction and table to allocate write id
+ * @throws NoSuchTxnException
+ * @throws TxnAbortedException
+ * @throws MetaException
+ */
+ AllocateTableWriteIdsResponse allocateTableWriteIds(AllocateTableWriteIdsRequest rqst)
+ throws NoSuchTxnException, TxnAbortedException, MetaException;
/**
* Obtain a lock.
@@ -206,7 +227,7 @@ public interface TxnStore extends Configurable {
CompactionResponse compact(CompactionRequest rqst) throws MetaException;
/**
- * Show list of current compactions
+ * Show list of current compactions.
* @param rqst info on which compactions to show
* @return compaction information
* @throws MetaException
@@ -226,7 +247,7 @@ public interface TxnStore extends Configurable {
throws NoSuchTxnException, TxnAbortedException, MetaException;
/**
- * Clean up corresponding records in metastore tables
+ * Clean up corresponding records in metastore tables.
* @param type Hive object type
* @param db database object
* @param table table object
@@ -350,10 +371,10 @@ public interface TxnStore extends Configurable {
List<String> findColumnsWithStats(CompactionInfo ci) throws MetaException;
/**
- * Record the highest txn id that the {@code ci} compaction job will pay attention to.
+ * Record the highest write id that the {@code ci} compaction job will pay attention to.
*/
@RetrySemantics.Idempotent
- void setCompactionHighestTxnId(CompactionInfo ci, long highestTxnId) throws MetaException;
+ void setCompactionHighestWriteId(CompactionInfo ci, long highestWriteId) throws MetaException;
/**
* For any given compactable entity (partition, table if not partitioned) the history of compactions
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnUtils.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnUtils.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnUtils.java
index 027fb3f..7b02865 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnUtils.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnUtils.java
@@ -18,15 +18,16 @@
package org.apache.hadoop.hive.metastore.txn;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hive.common.ValidCompactorTxnList;
+import org.apache.hadoop.hive.common.ValidCompactorWriteIdList;
+import org.apache.hadoop.hive.common.ValidReaderWriteIdList;
import org.apache.hadoop.hive.common.ValidReadTxnList;
import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
import org.apache.hadoop.hive.metastore.TransactionalValidationListener;
-import org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse;
import org.apache.hadoop.hive.metastore.api.GetOpenTxnsResponse;
+import org.apache.hadoop.hive.metastore.api.GetValidWriteIdsResponse;
import org.apache.hadoop.hive.metastore.api.Table;
-import org.apache.hadoop.hive.metastore.api.TxnInfo;
-import org.apache.hadoop.hive.metastore.api.TxnState;
+import org.apache.hadoop.hive.metastore.api.TableValidWriteIds;
import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
@@ -63,53 +64,94 @@ public class TxnUtils {
BitSet abortedBits = BitSet.valueOf(txns.getAbortedBits());
long[] exceptions = new long[open.size() - (currentTxn > 0 ? 1 : 0)];
int i = 0;
- for(long txn: open) {
+ for (long txn : open) {
if (currentTxn > 0 && currentTxn == txn) continue;
exceptions[i++] = txn;
}
- if(txns.isSetMin_open_txn()) {
+ if (txns.isSetMin_open_txn()) {
return new ValidReadTxnList(exceptions, abortedBits, highWater, txns.getMin_open_txn());
- }
- else {
+ } else {
return new ValidReadTxnList(exceptions, abortedBits, highWater);
}
}
/**
- * Transform a {@link org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse} to a
- * {@link org.apache.hadoop.hive.common.ValidTxnList}. This assumes that the caller intends to
- * compact the files, and thus treats only open transactions as invalid. Additionally any
- * txnId > highestOpenTxnId is also invalid. This is to avoid creating something like
- * delta_17_120 where txnId 80, for example, is still open.
- * @param txns txn list from the metastore
- * @return a valid txn list.
+ * Transform a {@link org.apache.hadoop.hive.metastore.api.GetValidWriteIdsResponse} to a
+ * {@link org.apache.hadoop.hive.common.ValidTxnWriteIdList}. This assumes that the caller intends to
+ * read the files, and thus treats both open and aborted transactions as invalid.
+ * @param currentTxnId current txn ID for which we get the valid write ids list
+ * @param validWriteIds valid write ids list from the metastore
+ * @return a valid write IDs list for the whole transaction.
*/
- public static ValidTxnList createValidCompactTxnList(GetOpenTxnsInfoResponse txns) {
- //highWater is the last txn id that has been allocated
- long highWater = txns.getTxn_high_water_mark();
- long minOpenTxn = Long.MAX_VALUE;
- long[] exceptions = new long[txns.getOpen_txnsSize()];
+ public static ValidTxnWriteIdList createValidTxnWriteIdList(Long currentTxnId,
+ GetValidWriteIdsResponse validWriteIds) {
+ ValidTxnWriteIdList validTxnWriteIdList = new ValidTxnWriteIdList(currentTxnId);
+ for (TableValidWriteIds tableWriteIds : validWriteIds.getTblValidWriteIds()) {
+ validTxnWriteIdList.addTableValidWriteIdList(createValidReaderWriteIdList(tableWriteIds));
+ }
+ return validTxnWriteIdList;
+ }
+
+ /**
+ * Transform a {@link org.apache.hadoop.hive.metastore.api.TableValidWriteIds} to a
+ * {@link org.apache.hadoop.hive.common.ValidReaderWriteIdList}. This assumes that the caller intends to
+ * read the files, and thus treats both open and aborted write ids as invalid.
+ * @param tableWriteIds valid write ids for the given table from the metastore
+ * @return a valid write IDs list for the input table
+ */
+ public static ValidReaderWriteIdList createValidReaderWriteIdList(TableValidWriteIds tableWriteIds) {
+ String fullTableName = tableWriteIds.getFullTableName();
+ long highWater = tableWriteIds.getWriteIdHighWaterMark();
+ List<Long> invalids = tableWriteIds.getInvalidWriteIds();
+ BitSet abortedBits = BitSet.valueOf(tableWriteIds.getAbortedBits());
+ long[] exceptions = new long[invalids.size()];
int i = 0;
- for (TxnInfo txn : txns.getOpen_txns()) {
- if (txn.getState() == TxnState.OPEN) {
- minOpenTxn = Math.min(minOpenTxn, txn.getId());
- }
- else {
- //only need aborted since we don't consider anything above minOpenTxn
- exceptions[i++] = txn.getId();
+ for (long writeId : invalids) {
+ exceptions[i++] = writeId;
+ }
+ if (tableWriteIds.isSetMinOpenWriteId()) {
+ return new ValidReaderWriteIdList(fullTableName, exceptions, abortedBits, highWater,
+ tableWriteIds.getMinOpenWriteId());
+ } else {
+ return new ValidReaderWriteIdList(fullTableName, exceptions, abortedBits, highWater);
+ }
+ }
+
+ /**
+ * Transform a {@link org.apache.hadoop.hive.metastore.api.TableValidWriteIds} to a
+ * {@link org.apache.hadoop.hive.common.ValidCompactorWriteIdList}. This assumes that the caller intends to
+ * compact the files, and thus treats only open transactions/write ids as invalid. Additionally any
+ * writeId > highestOpenWriteId is also invalid. This is to avoid creating something like
+ * delta_17_120 where writeId 80, for example, is still open.
+ * @param tableValidWriteIds table write id list from the metastore
+ * @return a valid write id list.
+ */
+ public static ValidCompactorWriteIdList createValidCompactWriteIdList(TableValidWriteIds tableValidWriteIds) {
+ String fullTableName = tableValidWriteIds.getFullTableName();
+ long highWater = tableValidWriteIds.getWriteIdHighWaterMark();
+ long minOpenWriteId = Long.MAX_VALUE;
+ List<Long> invalids = tableValidWriteIds.getInvalidWriteIds();
+ BitSet abortedBits = BitSet.valueOf(tableValidWriteIds.getAbortedBits());
+ long[] exceptions = new long[invalids.size()];
+ int i = 0;
+ for (long writeId : invalids) {
+ if (abortedBits.get(i)) {
+ // Only need aborted since we don't consider anything above minOpenWriteId
+ exceptions[i++] = writeId;
+ } else {
+ minOpenWriteId = Math.min(minOpenWriteId, writeId);
}
}
if(i < exceptions.length) {
exceptions = Arrays.copyOf(exceptions, i);
}
- highWater = minOpenTxn == Long.MAX_VALUE ? highWater : minOpenTxn - 1;
+ highWater = minOpenWriteId == Long.MAX_VALUE ? highWater : minOpenWriteId - 1;
BitSet bitSet = new BitSet(exceptions.length);
- bitSet.set(0, exceptions.length); // for ValidCompactorTxnList, everything in exceptions are aborted
- if(minOpenTxn == Long.MAX_VALUE) {
- return new ValidCompactorTxnList(exceptions, bitSet, highWater);
- }
- else {
- return new ValidCompactorTxnList(exceptions, bitSet, highWater, minOpenTxn);
+ bitSet.set(0, exceptions.length); // for ValidCompactorWriteIdList, everything in exceptions are aborted
+ if (minOpenWriteId == Long.MAX_VALUE) {
+ return new ValidCompactorWriteIdList(fullTableName, exceptions, bitSet, highWater);
+ } else {
+ return new ValidCompactorWriteIdList(fullTableName, exceptions, bitSet, highWater, minOpenWriteId);
}
}
@@ -134,7 +176,7 @@ public class TxnUtils {
* Note, users are responsible for using the correct TxnManager. We do not look at
* SessionState.get().getTxnMgr().supportsAcid() here
* Should produce the same result as
- * {@link org.apache.hadoop.hive.ql.io.AcidUtils#isTransactionalTable(org.apache.hadoop.hive.ql.metadata.Table)}
+ * {@link org.apache.hadoop.hive.ql.io.AcidUtils#isTransactionalTable(org.apache.hadoop.hive.ql.metadata.Table)}.
* @return true if table is a transactional table, false otherwise
*/
public static boolean isTransactionalTable(Table table) {
@@ -148,7 +190,7 @@ public class TxnUtils {
/**
* Should produce the same result as
- * {@link org.apache.hadoop.hive.ql.io.AcidUtils#isAcidTable(org.apache.hadoop.hive.ql.metadata.Table)}
+ * {@link org.apache.hadoop.hive.ql.io.AcidUtils#isAcidTable(org.apache.hadoop.hive.ql.metadata.Table)}.
*/
public static boolean isAcidTable(Table table) {
return TxnUtils.isTransactionalTable(table) &&
@@ -157,6 +199,19 @@ public class TxnUtils {
}
/**
+ * Should produce the result as <dbName>.<tableName>.
+ */
+ public static String getFullTableName(String dbName, String tableName) {
+ return dbName.toLowerCase() + "." + tableName.toLowerCase();
+ }
+
+ public static String[] getDbTableName(String fullTableName) {
+ return fullTableName.split("\\.");
+ }
+
+
+
+ /**
* Build a query (or queries if one query is too big but only for the case of 'IN'
* composite clause. For the case of 'NOT IN' clauses, multiple queries change
* the semantics of the intended query.
@@ -357,7 +412,7 @@ public class TxnUtils {
return ret;
}
- /*
+ /**
* Compute and return the size of a query statement with the given parameters as input variables.
*
* @param sizeSoFar size of the current contents of the buf
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/derby/hive-schema-3.0.0.derby.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/derby/hive-schema-3.0.0.derby.sql b/standalone-metastore/src/main/sql/derby/hive-schema-3.0.0.derby.sql
index ac28869..9d8a703 100644
--- a/standalone-metastore/src/main/sql/derby/hive-schema-3.0.0.derby.sql
+++ b/standalone-metastore/src/main/sql/derby/hive-schema-3.0.0.derby.sql
@@ -422,7 +422,8 @@ CREATE TABLE TXN_COMPONENTS (
TC_DATABASE varchar(128) NOT NULL,
TC_TABLE varchar(128),
TC_PARTITION varchar(767),
- TC_OPERATION_TYPE char(1) NOT NULL
+ TC_OPERATION_TYPE char(1) NOT NULL,
+ TC_WRITEID bigint
);
CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);
@@ -432,7 +433,8 @@ CREATE TABLE COMPLETED_TXN_COMPONENTS (
CTC_DATABASE varchar(128) NOT NULL,
CTC_TABLE varchar(256),
CTC_PARTITION varchar(767),
- CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL
+ CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CTC_WRITEID bigint
);
CREATE INDEX COMPLETED_TXN_COMPONENTS_IDX ON COMPLETED_TXN_COMPONENTS (CTC_DATABASE, CTC_TABLE, CTC_PARTITION);
@@ -480,7 +482,7 @@ CREATE TABLE COMPACTION_QUEUE (
CQ_WORKER_ID varchar(128),
CQ_START bigint,
CQ_RUN_AS varchar(128),
- CQ_HIGHEST_TXN_ID bigint,
+ CQ_HIGHEST_WRITE_ID bigint,
CQ_META_INFO varchar(2048) for bit data,
CQ_HADOOP_JOB_ID varchar(32)
);
@@ -502,7 +504,7 @@ CREATE TABLE COMPLETED_COMPACTIONS (
CC_START bigint,
CC_END bigint,
CC_RUN_AS varchar(128),
- CC_HIGHEST_TXN_ID bigint,
+ CC_HIGHEST_WRITE_ID bigint,
CC_META_INFO varchar(2048) for bit data,
CC_HADOOP_JOB_ID varchar(32)
);
@@ -525,6 +527,23 @@ CREATE TABLE WRITE_SET (
WS_OPERATION_TYPE char(1) NOT NULL
);
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
-- -----------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/derby/upgrade-2.3.0-to-3.0.0.derby.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/derby/upgrade-2.3.0-to-3.0.0.derby.sql b/standalone-metastore/src/main/sql/derby/upgrade-2.3.0-to-3.0.0.derby.sql
index d49255a..a50c45d 100644
--- a/standalone-metastore/src/main/sql/derby/upgrade-2.3.0-to-3.0.0.derby.sql
+++ b/standalone-metastore/src/main/sql/derby/upgrade-2.3.0-to-3.0.0.derby.sql
@@ -94,3 +94,29 @@ UPDATE SDS
UPDATE DBS
SET DB_LOCATION_URI = 's3a' || SUBSTR(DB_LOCATION_URI, 4)
WHERE DB_LOCATION_URI LIKE 's3n://%' ;
+
+-- 050-HIVE-18192.derby.sql
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
+RENAME COLUMN COMPACTION_QUEUE.CQ_HIGHEST_TXN_ID TO CQ_HIGHEST_WRITE_ID;
+
+RENAME COLUMN COMPLETED_COMPACTIONS.CC_HIGHEST_TXN_ID TO CC_HIGHEST_WRITE_ID;
+
+-- Modify txn_components/completed_txn_components tables to add write id.
+ALTER TABLE TXN_COMPONENTS ADD TC_WRITEID bigint;
+ALTER TABLE COMPLETED_TXN_COMPONENTS ADD CTC_WRITEID bigint;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/mssql/hive-schema-3.0.0.mssql.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/mssql/hive-schema-3.0.0.mssql.sql b/standalone-metastore/src/main/sql/mssql/hive-schema-3.0.0.mssql.sql
index 7c26d5d..1b7d0da 100644
--- a/standalone-metastore/src/main/sql/mssql/hive-schema-3.0.0.mssql.sql
+++ b/standalone-metastore/src/main/sql/mssql/hive-schema-3.0.0.mssql.sql
@@ -969,7 +969,7 @@ CREATE TABLE COMPACTION_QUEUE(
CQ_WORKER_ID nvarchar(128) NULL,
CQ_START bigint NULL,
CQ_RUN_AS nvarchar(128) NULL,
- CQ_HIGHEST_TXN_ID bigint NULL,
+ CQ_HIGHEST_WRITE_ID bigint NULL,
CQ_META_INFO varbinary(2048) NULL,
CQ_HADOOP_JOB_ID nvarchar(128) NULL,
PRIMARY KEY CLUSTERED
@@ -990,7 +990,7 @@ CREATE TABLE COMPLETED_COMPACTIONS (
CC_START bigint NULL,
CC_END bigint NULL,
CC_RUN_AS nvarchar(128) NULL,
- CC_HIGHEST_TXN_ID bigint NULL,
+ CC_HIGHEST_WRITE_ID bigint NULL,
CC_META_INFO varbinary(2048) NULL,
CC_HADOOP_JOB_ID nvarchar(128) NULL,
PRIMARY KEY CLUSTERED
@@ -1004,7 +1004,8 @@ CREATE TABLE COMPLETED_TXN_COMPONENTS(
CTC_DATABASE nvarchar(128) NOT NULL,
CTC_TABLE nvarchar(128) NULL,
CTC_PARTITION nvarchar(767) NULL,
- CTC_TIMESTAMP datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL
+ CTC_TIMESTAMP datetime2 DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CTC_WRITEID bigint
);
CREATE INDEX COMPLETED_TXN_COMPONENTS_IDX2 ON COMPLETED_TXN_COMPONENTS (CTC_DATABASE, CTC_TABLE, CTC_PARTITION);
@@ -1072,7 +1073,8 @@ CREATE TABLE TXN_COMPONENTS(
TC_DATABASE nvarchar(128) NOT NULL,
TC_TABLE nvarchar(128) NULL,
TC_PARTITION nvarchar(767) NULL,
- TC_OPERATION_TYPE char(1) NOT NULL
+ TC_OPERATION_TYPE char(1) NOT NULL,
+ TC_WRITEID bigint
);
ALTER TABLE TXN_COMPONENTS WITH CHECK ADD FOREIGN KEY(TC_TXNID) REFERENCES TXNS (TXN_ID);
@@ -1129,6 +1131,23 @@ CREATE TABLE METASTORE_DB_PROPERTIES (
ALTER TABLE METASTORE_DB_PROPERTIES ADD CONSTRAINT PROPERTY_KEY_PK PRIMARY KEY (PROPERTY_KEY);
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE nvarchar(128) NOT NULL,
+ T2W_TABLE nvarchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE nvarchar(128) NOT NULL,
+ NWI_TABLE nvarchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
-- -----------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql b/standalone-metastore/src/main/sql/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
index 6dc3e1a..8ab466d 100644
--- a/standalone-metastore/src/main/sql/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
+++ b/standalone-metastore/src/main/sql/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
@@ -148,3 +148,29 @@ UPDATE SDS
UPDATE DBS
SET DB_LOCATION_URI = 's3a' + SUBSTRING(DB_LOCATION_URI, 4, LEN(DB_LOCATION_URI))
WHERE DB_LOCATION_URI LIKE 's3n://%' ;
+
+-- HIVE-18192
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE nvarchar(128) NOT NULL,
+ T2W_TABLE nvarchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE nvarchar(128) NOT NULL,
+ NWI_TABLE nvarchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
+EXEC SP_RENAME 'COMPACTION_QUEUE.CQ_HIGHEST_TXN_ID', 'CQ_HIGHEST_WRITE_ID', 'COLUMN';
+
+EXEC SP_RENAME 'COMPLETED_COMPACTIONS.CC_HIGHEST_TXN_ID', 'CC_HIGHEST_WRITE_ID', 'COLUMN';
+
+-- Modify txn_components/completed_txn_components tables to add write id.
+ALTER TABLE TXN_COMPONENTS ADD TC_WRITEID bigint;
+ALTER TABLE COMPLETED_TXN_COMPONENTS ADD CTC_WRITEID bigint;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/mysql/hive-schema-3.0.0.mysql.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/mysql/hive-schema-3.0.0.mysql.sql b/standalone-metastore/src/main/sql/mysql/hive-schema-3.0.0.mysql.sql
index 0eb2e2e..886c932 100644
--- a/standalone-metastore/src/main/sql/mysql/hive-schema-3.0.0.mysql.sql
+++ b/standalone-metastore/src/main/sql/mysql/hive-schema-3.0.0.mysql.sql
@@ -962,6 +962,7 @@ CREATE TABLE TXN_COMPONENTS (
TC_TABLE varchar(128) NOT NULL,
TC_PARTITION varchar(767),
TC_OPERATION_TYPE char(1) NOT NULL,
+ TC_WRITEID bigint,
FOREIGN KEY (TC_TXNID) REFERENCES TXNS (TXN_ID)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@@ -972,7 +973,8 @@ CREATE TABLE COMPLETED_TXN_COMPONENTS (
CTC_DATABASE varchar(128) NOT NULL,
CTC_TABLE varchar(256),
CTC_PARTITION varchar(767),
- CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL
+ CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CTC_WRITEID bigint
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE INDEX COMPLETED_TXN_COMPONENTS_IDX2 ON COMPLETED_TXN_COMPONENTS (CTC_DATABASE, CTC_TABLE, CTC_PARTITION) USING BTREE;
@@ -1021,7 +1023,7 @@ CREATE TABLE COMPACTION_QUEUE (
CQ_WORKER_ID varchar(128),
CQ_START bigint,
CQ_RUN_AS varchar(128),
- CQ_HIGHEST_TXN_ID bigint,
+ CQ_HIGHEST_WRITE_ID bigint,
CQ_META_INFO varbinary(2048),
CQ_HADOOP_JOB_ID varchar(32)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@@ -1038,7 +1040,7 @@ CREATE TABLE COMPLETED_COMPACTIONS (
CC_START bigint,
CC_END bigint,
CC_RUN_AS varchar(128),
- CC_HIGHEST_TXN_ID bigint,
+ CC_HIGHEST_WRITE_ID bigint,
CC_META_INFO varbinary(2048),
CC_HADOOP_JOB_ID varchar(32)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@@ -1063,6 +1065,24 @@ CREATE TABLE WRITE_SET (
WS_COMMIT_ID bigint NOT NULL,
WS_OPERATION_TYPE char(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
-- -----------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql b/standalone-metastore/src/main/sql/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql
index 0a170f6..a537734 100644
--- a/standalone-metastore/src/main/sql/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql
+++ b/standalone-metastore/src/main/sql/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql
@@ -133,3 +133,29 @@ UPDATE SDS
UPDATE DBS
SET DB_LOCATION_URI = CONCAT('s3a', SUBSTR(DB_LOCATION_URI, 4, LENGTH(DB_LOCATION_URI)))
WHERE DB_LOCATION_URI LIKE 's3n://%' ;
+
+-- HIVE-18192
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
+ALTER TABLE COMPACTION_QUEUE CHANGE `CQ_HIGHEST_TXN_ID` `CQ_HIGHEST_WRITE_ID` bigint;
+
+ALTER TABLE COMPLETED_COMPACTIONS CHANGE `CC_HIGHEST_TXN_ID` `CC_HIGHEST_WRITE_ID` bigint;
+
+-- Modify txn_components/completed_txn_components tables to add write id.
+ALTER TABLE TXN_COMPONENTS ADD TC_WRITEID bigint;
+ALTER TABLE COMPLETED_TXN_COMPONENTS ADD CTC_WRITEID bigint;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/oracle/hive-schema-3.0.0.oracle.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/oracle/hive-schema-3.0.0.oracle.sql b/standalone-metastore/src/main/sql/oracle/hive-schema-3.0.0.oracle.sql
index 37f9063..366b2d9 100644
--- a/standalone-metastore/src/main/sql/oracle/hive-schema-3.0.0.oracle.sql
+++ b/standalone-metastore/src/main/sql/oracle/hive-schema-3.0.0.oracle.sql
@@ -936,7 +936,8 @@ CREATE TABLE TXN_COMPONENTS (
TC_DATABASE VARCHAR2(128) NOT NULL,
TC_TABLE VARCHAR2(256),
TC_PARTITION VARCHAR2(767) NULL,
- TC_OPERATION_TYPE char(1) NOT NULL
+ TC_OPERATION_TYPE char(1) NOT NULL,
+ TC_WRITEID NUMBER(19)
) ROWDEPENDENCIES;
CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);
@@ -946,7 +947,8 @@ CREATE TABLE COMPLETED_TXN_COMPONENTS (
CTC_DATABASE VARCHAR2(128) NOT NULL,
CTC_TABLE VARCHAR2(128),
CTC_PARTITION VARCHAR2(767),
- CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL
+ CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CTC_WRITEID NUMBER(19)
) ROWDEPENDENCIES;
CREATE INDEX COMPLETED_TXN_COMPONENTS_INDEX ON COMPLETED_TXN_COMPONENTS (CTC_DATABASE, CTC_TABLE, CTC_PARTITION);
@@ -994,7 +996,7 @@ CREATE TABLE COMPACTION_QUEUE (
CQ_WORKER_ID varchar(128),
CQ_START NUMBER(19),
CQ_RUN_AS varchar(128),
- CQ_HIGHEST_TXN_ID NUMBER(19),
+ CQ_HIGHEST_WRITE_ID NUMBER(19),
CQ_META_INFO BLOB,
CQ_HADOOP_JOB_ID varchar2(32)
) ROWDEPENDENCIES;
@@ -1016,7 +1018,7 @@ CREATE TABLE COMPLETED_COMPACTIONS (
CC_START NUMBER(19),
CC_END NUMBER(19),
CC_RUN_AS varchar(128),
- CC_HIGHEST_TXN_ID NUMBER(19),
+ CC_HIGHEST_WRITE_ID NUMBER(19),
CC_META_INFO BLOB,
CC_HADOOP_JOB_ID varchar2(32)
) ROWDEPENDENCIES;
@@ -1037,6 +1039,23 @@ CREATE TABLE WRITE_SET (
WS_OPERATION_TYPE char(1) NOT NULL
);
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID number(19) NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID number(19) NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT number(19) NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
-- -----------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql b/standalone-metastore/src/main/sql/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql
index a923d92..bd786fb 100644
--- a/standalone-metastore/src/main/sql/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql
+++ b/standalone-metastore/src/main/sql/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql
@@ -156,3 +156,29 @@ UPDATE SDS
UPDATE DBS
SET DB_LOCATION_URI = 's3a' || SUBSTR(DB_LOCATION_URI, 4)
WHERE DB_LOCATION_URI LIKE 's3n://%' ;
+
+-- HIVE-18192
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID number(19) NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID number(19) NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT number(19) NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
+ALTER TABLE COMPACTION_QUEUE RENAME COLUMN CQ_HIGHEST_TXN_ID TO CQ_HIGHEST_WRITE_ID;
+
+ALTER TABLE COMPLETED_COMPACTIONS RENAME COLUMN CC_HIGHEST_TXN_ID TO CC_HIGHEST_WRITE_ID;
+
+-- Modify txn_components/completed_txn_components tables to add write id.
+ALTER TABLE TXN_COMPONENTS ADD TC_WRITEID number(19);
+ALTER TABLE COMPLETED_TXN_COMPONENTS ADD CTC_WRITEID number(19);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/postgres/hive-schema-3.0.0.postgres.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/postgres/hive-schema-3.0.0.postgres.sql b/standalone-metastore/src/main/sql/postgres/hive-schema-3.0.0.postgres.sql
index 9d63056..4abf24c 100644
--- a/standalone-metastore/src/main/sql/postgres/hive-schema-3.0.0.postgres.sql
+++ b/standalone-metastore/src/main/sql/postgres/hive-schema-3.0.0.postgres.sql
@@ -1628,7 +1628,8 @@ CREATE TABLE TXN_COMPONENTS (
TC_DATABASE varchar(128) NOT NULL,
TC_TABLE varchar(128),
TC_PARTITION varchar(767) DEFAULT NULL,
- TC_OPERATION_TYPE char(1) NOT NULL
+ TC_OPERATION_TYPE char(1) NOT NULL,
+ TC_WRITEID bigint
);
CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS USING hash (TC_TXNID);
@@ -1638,7 +1639,8 @@ CREATE TABLE COMPLETED_TXN_COMPONENTS (
CTC_DATABASE varchar(128) NOT NULL,
CTC_TABLE varchar(256),
CTC_PARTITION varchar(767),
- CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL
+ CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CTC_WRITEID bigint
);
CREATE INDEX COMPLETED_TXN_COMPONENTS_INDEX ON COMPLETED_TXN_COMPONENTS USING btree (CTC_DATABASE, CTC_TABLE, CTC_PARTITION);
@@ -1686,7 +1688,7 @@ CREATE TABLE COMPACTION_QUEUE (
CQ_WORKER_ID varchar(128),
CQ_START bigint,
CQ_RUN_AS varchar(128),
- CQ_HIGHEST_TXN_ID bigint,
+ CQ_HIGHEST_WRITE_ID bigint,
CQ_META_INFO bytea,
CQ_HADOOP_JOB_ID varchar(32)
);
@@ -1708,7 +1710,7 @@ CREATE TABLE COMPLETED_COMPACTIONS (
CC_START bigint,
CC_END bigint,
CC_RUN_AS varchar(128),
- CC_HIGHEST_TXN_ID bigint,
+ CC_HIGHEST_WRITE_ID bigint,
CC_META_INFO bytea,
CC_HADOOP_JOB_ID varchar(32)
);
@@ -1729,6 +1731,23 @@ CREATE TABLE WRITE_SET (
WS_OPERATION_TYPE char(1) NOT NULL
);
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
-- -----------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/sql/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/sql/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql b/standalone-metastore/src/main/sql/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql
index eb45cd2..34ed974 100644
--- a/standalone-metastore/src/main/sql/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql
+++ b/standalone-metastore/src/main/sql/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql
@@ -172,3 +172,29 @@ UPDATE "SDS"
UPDATE "DBS"
SET "DB_LOCATION_URI" = 's3a' || SUBSTR("DB_LOCATION_URI", 4)
WHERE "DB_LOCATION_URI" LIKE 's3n://%' ;
+
+-- HIVE-18192
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
+ALTER TABLE COMPACTION_QUEUE RENAME CQ_HIGHEST_TXN_ID TO CQ_HIGHEST_WRITE_ID;
+
+ALTER TABLE COMPLETED_COMPACTIONS RENAME CC_HIGHEST_TXN_ID TO CC_HIGHEST_WRITE_ID;
+
+-- Modify txn_components/completed_txn_components tables to add write id.
+ALTER TABLE TXN_COMPONENTS ADD TC_WRITEID bigint;
+ALTER TABLE COMPLETED_TXN_COMPONENTS ADD CTC_WRITEID bigint;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/main/thrift/hive_metastore.thrift
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/thrift/hive_metastore.thrift b/standalone-metastore/src/main/thrift/hive_metastore.thrift
index 35fc8b3..b11ee38 100644
--- a/standalone-metastore/src/main/thrift/hive_metastore.thrift
+++ b/standalone-metastore/src/main/thrift/hive_metastore.thrift
@@ -731,6 +731,43 @@ struct CommitTxnRequest {
1: required i64 txnid,
}
+// Request msg to get the valid write ids list for the given list of tables wrt to input validTxnList
+struct GetValidWriteIdsRequest {
+ 1: required list<string> fullTableNames, // Full table names of format <db_name>.<table_name>
+ 2: required string validTxnList, // Valid txn list string wrt the current txn of the caller
+}
+
+// Valid Write ID list of one table wrt to current txn
+struct TableValidWriteIds {
+ 1: required string fullTableName, // Full table name of format <db_name>.<table_name>
+ 2: required i64 writeIdHighWaterMark, // The highest write id valid for this table wrt given txn
+ 3: required list<i64> invalidWriteIds, // List of open and aborted writes ids in the table
+ 4: optional i64 minOpenWriteId, // Minimum write id which maps to a opened txn
+ 5: required binary abortedBits, // Bit array to identify the aborted write ids in invalidWriteIds list
+}
+
+// Valid Write ID list for all the input tables wrt to current txn
+struct GetValidWriteIdsResponse {
+ 1: required list<TableValidWriteIds> tblValidWriteIds,
+}
+
+// Request msg to allocate table write ids for the given list of txns
+struct AllocateTableWriteIdsRequest {
+ 1: required list<i64> txnIds,
+ 2: required string dbName,
+ 3: required string tableName,
+}
+
+// Map for allocated write id against the txn for which it is allocated
+struct TxnToWriteId {
+ 1: required i64 txnId,
+ 2: required i64 writeId,
+}
+
+struct AllocateTableWriteIdsResponse {
+ 1: required list<TxnToWriteId> txnToWriteIds,
+}
+
struct LockComponent {
1: required LockType type,
2: required LockLevel level,
@@ -850,10 +887,11 @@ struct ShowCompactResponse {
struct AddDynamicPartitions {
1: required i64 txnid,
- 2: required string dbname,
- 3: required string tablename,
- 4: required list<string> partitionnames,
- 5: optional DataOperationType operationType = DataOperationType.UNSET
+ 2: required i64 writeid,
+ 3: required string dbname,
+ 4: required string tablename,
+ 5: required list<string> partitionnames,
+ 6: optional DataOperationType operationType = DataOperationType.UNSET
}
struct BasicTxnInfo {
@@ -1807,6 +1845,10 @@ service ThriftHiveMetastore extends fb303.FacebookService
void abort_txn(1:AbortTxnRequest rqst) throws (1:NoSuchTxnException o1)
void abort_txns(1:AbortTxnsRequest rqst) throws (1:NoSuchTxnException o1)
void commit_txn(1:CommitTxnRequest rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2)
+ GetValidWriteIdsResponse get_valid_write_ids(1:GetValidWriteIdsRequest rqst)
+ throws (1:NoSuchTxnException o1, 2:MetaException o2)
+ AllocateTableWriteIdsResponse allocate_table_write_ids(1:AllocateTableWriteIdsRequest rqst)
+ throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2, 3:MetaException o3)
LockResponse lock(1:LockRequest rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2)
LockResponse check_lock(1:CheckLockRequest rqst)
throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2, 3:NoSuchLockException o3)
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/java/org/apache/hadoop/hive/common/ValidCompactorTxnList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/java/org/apache/hadoop/hive/common/ValidCompactorTxnList.java b/storage-api/src/java/org/apache/hadoop/hive/common/ValidCompactorTxnList.java
deleted file mode 100644
index 94b8c58..0000000
--- a/storage-api/src/java/org/apache/hadoop/hive/common/ValidCompactorTxnList.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.common;
-
-import java.util.Arrays;
-import java.util.BitSet;
-
-/**
- * An implementation of {@link org.apache.hadoop.hive.common.ValidTxnList} for use by the compactor.
- *
- * Compaction should only include txns up to smallest open txn (exclussive).
- * There may be aborted txns in the snapshot represented by this ValidCompactorTxnList.
- * Thus {@link #isTxnRangeValid(long, long)} returns NONE for any range that inluces any unresolved
- * transactions. Any txn above {@code highWatermark} is unresolved.
- * These produce the logic we need to assure that the compactor only sees records less than the lowest
- * open transaction when choosing which files to compact, but that it still ignores aborted
- * records when compacting.
- *
- * See org.apache.hadoop.hive.metastore.txn.TxnUtils#createValidCompactTxnList() for proper
- * way to construct this.
- */
-public class ValidCompactorTxnList extends ValidReadTxnList {
- public ValidCompactorTxnList() {
- super();
- }
- public ValidCompactorTxnList(long[] abortedTxnList, BitSet abortedBits, long highWatermark) {
- this(abortedTxnList, abortedBits, highWatermark, Long.MAX_VALUE);
- }
- /**
- * @param abortedTxnList list of all aborted transactions
- * @param abortedBits bitset marking whether the corresponding transaction is aborted
- * @param highWatermark highest committed transaction to be considered for compaction,
- * equivalently (lowest_open_txn - 1).
- */
- public ValidCompactorTxnList(long[] abortedTxnList, BitSet abortedBits, long highWatermark, long minOpenTxnId) {
- // abortedBits should be all true as everything in exceptions are aborted txns
- super(abortedTxnList, abortedBits, highWatermark, minOpenTxnId);
- if(this.exceptions.length <= 0) {
- return;
- }
- //now that exceptions (aka abortedTxnList) is sorted
- int idx = Arrays.binarySearch(this.exceptions, highWatermark);
- int lastElementPos;
- if(idx < 0) {
- int insertionPoint = -idx - 1 ;//see Arrays.binarySearch() JavaDoc
- lastElementPos = insertionPoint - 1;
- }
- else {
- lastElementPos = idx;
- }
- /*
- * ensure that we throw out any exceptions above highWatermark to make
- * {@link #isTxnValid(long)} faster
- */
- this.exceptions = Arrays.copyOf(this.exceptions, lastElementPos + 1);
- }
- public ValidCompactorTxnList(String value) {
- super(value);
- }
- /**
- * Returns org.apache.hadoop.hive.common.ValidTxnList.RangeResponse.ALL if all txns in
- * the range are resolved and RangeResponse.NONE otherwise
- */
- @Override
- public RangeResponse isTxnRangeValid(long minTxnId, long maxTxnId) {
- return highWatermark >= maxTxnId ? RangeResponse.ALL : RangeResponse.NONE;
- }
-
- @Override
- public boolean isTxnAborted(long txnid) {
- return Arrays.binarySearch(exceptions, txnid) >= 0;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/java/org/apache/hadoop/hive/common/ValidCompactorWriteIdList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/java/org/apache/hadoop/hive/common/ValidCompactorWriteIdList.java b/storage-api/src/java/org/apache/hadoop/hive/common/ValidCompactorWriteIdList.java
new file mode 100644
index 0000000..9f6cf47
--- /dev/null
+++ b/storage-api/src/java/org/apache/hadoop/hive/common/ValidCompactorWriteIdList.java
@@ -0,0 +1,93 @@
+/*
+ * 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.common;
+
+import java.util.Arrays;
+import java.util.BitSet;
+
+/**
+ * An implementation of {@link ValidWriteIdList} for use by the compactor.
+ *
+ * Compaction should only include txns up to smallest open txn (exclussive).
+ * There may be aborted write ids in the snapshot represented by this ValidCompactorWriteIdList.
+ * Thus {@link #isWriteIdRangeValid(long, long)} returns NONE for any range that includes any unresolved
+ * write ids. Any write id above {@code highWatermark} is unresolved.
+ * These produce the logic we need to assure that the compactor only sees records less than the lowest
+ * open write ids when choosing which files to compact, but that it still ignores aborted
+ * records when compacting.
+ *
+ * See org.apache.hadoop.hive.metastore.txn.TxnUtils#createValidCompactTxnList() for proper
+ * way to construct this.
+ */
+public class ValidCompactorWriteIdList extends ValidReaderWriteIdList {
+ public ValidCompactorWriteIdList() {
+ super();
+ }
+ public ValidCompactorWriteIdList(String tableName, long[] abortedWriteIdList, BitSet abortedBits,
+ long highWatermark) {
+ this(tableName, abortedWriteIdList, abortedBits, highWatermark, Long.MAX_VALUE);
+ }
+ /**
+ * @param tableName table which is under compaction. Full name of format <db_name>.<table_name>
+ * @param abortedWriteIdList list of all aborted write ids
+ * @param abortedBits bitset marking whether the corresponding transaction is aborted
+ * @param highWatermark highest committed write id to be considered for compaction,
+ * equivalently (lowest_open_write_id - 1).
+ * @param minOpenWriteId minimum write ID which maps to a open transaction
+ */
+ public ValidCompactorWriteIdList(String tableName, long[] abortedWriteIdList, BitSet abortedBits,
+ long highWatermark, long minOpenWriteId) {
+ // abortedBits should be all true as everything in exceptions are aborted txns
+ super(tableName, abortedWriteIdList, abortedBits, highWatermark, minOpenWriteId);
+ if(this.exceptions.length <= 0) {
+ return;
+ }
+ //now that exceptions (aka abortedTxnList) is sorted
+ int idx = Arrays.binarySearch(this.exceptions, highWatermark);
+ int lastElementPos;
+ if(idx < 0) {
+ int insertionPoint = -idx - 1 ;//see Arrays.binarySearch() JavaDoc
+ lastElementPos = insertionPoint - 1;
+ }
+ else {
+ lastElementPos = idx;
+ }
+ /*
+ * ensure that we throw out any exceptions above highWatermark to make
+ * {@link #isWriteIdValid(long)} faster
+ */
+ this.exceptions = Arrays.copyOf(this.exceptions, lastElementPos + 1);
+ }
+ public ValidCompactorWriteIdList(String value) {
+ super(value);
+ }
+ /**
+ * Returns org.apache.hadoop.hive.common.ValidWriteIdList.RangeResponse.ALL if all write ids in
+ * the range are resolved and RangeResponse.NONE otherwise
+ */
+ @Override
+ public RangeResponse isWriteIdRangeValid(long minWriteId, long maxWriteId) {
+ return highWatermark >= maxWriteId ? RangeResponse.ALL : RangeResponse.NONE;
+ }
+
+ @Override
+ public boolean isWriteIdAborted(long writeId) {
+ return Arrays.binarySearch(exceptions, writeId) >= 0;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/storage-api/src/java/org/apache/hadoop/hive/common/ValidReadTxnList.java
----------------------------------------------------------------------
diff --git a/storage-api/src/java/org/apache/hadoop/hive/common/ValidReadTxnList.java b/storage-api/src/java/org/apache/hadoop/hive/common/ValidReadTxnList.java
index ccdd4b7..dd432d9 100644
--- a/storage-api/src/java/org/apache/hadoop/hive/common/ValidReadTxnList.java
+++ b/storage-api/src/java/org/apache/hadoop/hive/common/ValidReadTxnList.java
@@ -59,24 +59,16 @@ public class ValidReadTxnList implements ValidTxnList {
@Override
public boolean isTxnValid(long txnid) {
- if (highWatermark < txnid) {
+ if (txnid > highWatermark) {
return false;
}
return Arrays.binarySearch(exceptions, txnid) < 0;
}
- /**
- * We cannot use a base file if its range contains an open txn.
- * @param txnid from base_xxxx
- */
- @Override
- public boolean isValidBase(long txnid) {
- return minOpenTxn > txnid && txnid <= highWatermark;
- }
@Override
public RangeResponse isTxnRangeValid(long minTxnId, long maxTxnId) {
// check the easy cases first
- if (highWatermark < minTxnId) {
+ if (minTxnId > highWatermark) {
return RangeResponse.NONE;
} else if (exceptions.length > 0 && exceptions[0] > maxTxnId) {
return RangeResponse.ALL;
[06/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php b/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
index f6fc346..d063de8 100644
--- a/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
+++ b/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
@@ -1156,6 +1156,21 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf {
*/
public function commit_txn(\metastore\CommitTxnRequest $rqst);
/**
+ * @param \metastore\GetValidWriteIdsRequest $rqst
+ * @return \metastore\GetValidWriteIdsResponse
+ * @throws \metastore\NoSuchTxnException
+ * @throws \metastore\MetaException
+ */
+ public function get_valid_write_ids(\metastore\GetValidWriteIdsRequest $rqst);
+ /**
+ * @param \metastore\AllocateTableWriteIdsRequest $rqst
+ * @return \metastore\AllocateTableWriteIdsResponse
+ * @throws \metastore\NoSuchTxnException
+ * @throws \metastore\TxnAbortedException
+ * @throws \metastore\MetaException
+ */
+ public function allocate_table_write_ids(\metastore\AllocateTableWriteIdsRequest $rqst);
+ /**
* @param \metastore\LockRequest $rqst
* @return \metastore\LockResponse
* @throws \metastore\NoSuchTxnException
@@ -9621,6 +9636,123 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas
return;
}
+ public function get_valid_write_ids(\metastore\GetValidWriteIdsRequest $rqst)
+ {
+ $this->send_get_valid_write_ids($rqst);
+ return $this->recv_get_valid_write_ids();
+ }
+
+ public function send_get_valid_write_ids(\metastore\GetValidWriteIdsRequest $rqst)
+ {
+ $args = new \metastore\ThriftHiveMetastore_get_valid_write_ids_args();
+ $args->rqst = $rqst;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_valid_write_ids', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_valid_write_ids', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_valid_write_ids()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_valid_write_ids_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_get_valid_write_ids_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new \Exception("get_valid_write_ids failed: unknown result");
+ }
+
+ public function allocate_table_write_ids(\metastore\AllocateTableWriteIdsRequest $rqst)
+ {
+ $this->send_allocate_table_write_ids($rqst);
+ return $this->recv_allocate_table_write_ids();
+ }
+
+ public function send_allocate_table_write_ids(\metastore\AllocateTableWriteIdsRequest $rqst)
+ {
+ $args = new \metastore\ThriftHiveMetastore_allocate_table_write_ids_args();
+ $args->rqst = $rqst;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'allocate_table_write_ids', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('allocate_table_write_ids', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_allocate_table_write_ids()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_allocate_table_write_ids_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_allocate_table_write_ids_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ throw new \Exception("allocate_table_write_ids failed: unknown result");
+ }
+
public function lock(\metastore\LockRequest $rqst)
{
$this->send_lock($rqst);
@@ -12932,14 +13064,14 @@ class ThriftHiveMetastore_get_databases_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size724 = 0;
- $_etype727 = 0;
- $xfer += $input->readListBegin($_etype727, $_size724);
- for ($_i728 = 0; $_i728 < $_size724; ++$_i728)
+ $_size759 = 0;
+ $_etype762 = 0;
+ $xfer += $input->readListBegin($_etype762, $_size759);
+ for ($_i763 = 0; $_i763 < $_size759; ++$_i763)
{
- $elem729 = null;
- $xfer += $input->readString($elem729);
- $this->success []= $elem729;
+ $elem764 = null;
+ $xfer += $input->readString($elem764);
+ $this->success []= $elem764;
}
$xfer += $input->readListEnd();
} else {
@@ -12975,9 +13107,9 @@ class ThriftHiveMetastore_get_databases_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter730)
+ foreach ($this->success as $iter765)
{
- $xfer += $output->writeString($iter730);
+ $xfer += $output->writeString($iter765);
}
}
$output->writeListEnd();
@@ -13108,14 +13240,14 @@ class ThriftHiveMetastore_get_all_databases_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size731 = 0;
- $_etype734 = 0;
- $xfer += $input->readListBegin($_etype734, $_size731);
- for ($_i735 = 0; $_i735 < $_size731; ++$_i735)
+ $_size766 = 0;
+ $_etype769 = 0;
+ $xfer += $input->readListBegin($_etype769, $_size766);
+ for ($_i770 = 0; $_i770 < $_size766; ++$_i770)
{
- $elem736 = null;
- $xfer += $input->readString($elem736);
- $this->success []= $elem736;
+ $elem771 = null;
+ $xfer += $input->readString($elem771);
+ $this->success []= $elem771;
}
$xfer += $input->readListEnd();
} else {
@@ -13151,9 +13283,9 @@ class ThriftHiveMetastore_get_all_databases_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter737)
+ foreach ($this->success as $iter772)
{
- $xfer += $output->writeString($iter737);
+ $xfer += $output->writeString($iter772);
}
}
$output->writeListEnd();
@@ -14154,18 +14286,18 @@ class ThriftHiveMetastore_get_type_all_result {
case 0:
if ($ftype == TType::MAP) {
$this->success = array();
- $_size738 = 0;
- $_ktype739 = 0;
- $_vtype740 = 0;
- $xfer += $input->readMapBegin($_ktype739, $_vtype740, $_size738);
- for ($_i742 = 0; $_i742 < $_size738; ++$_i742)
+ $_size773 = 0;
+ $_ktype774 = 0;
+ $_vtype775 = 0;
+ $xfer += $input->readMapBegin($_ktype774, $_vtype775, $_size773);
+ for ($_i777 = 0; $_i777 < $_size773; ++$_i777)
{
- $key743 = '';
- $val744 = new \metastore\Type();
- $xfer += $input->readString($key743);
- $val744 = new \metastore\Type();
- $xfer += $val744->read($input);
- $this->success[$key743] = $val744;
+ $key778 = '';
+ $val779 = new \metastore\Type();
+ $xfer += $input->readString($key778);
+ $val779 = new \metastore\Type();
+ $xfer += $val779->read($input);
+ $this->success[$key778] = $val779;
}
$xfer += $input->readMapEnd();
} else {
@@ -14201,10 +14333,10 @@ class ThriftHiveMetastore_get_type_all_result {
{
$output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
{
- foreach ($this->success as $kiter745 => $viter746)
+ foreach ($this->success as $kiter780 => $viter781)
{
- $xfer += $output->writeString($kiter745);
- $xfer += $viter746->write($output);
+ $xfer += $output->writeString($kiter780);
+ $xfer += $viter781->write($output);
}
}
$output->writeMapEnd();
@@ -14408,15 +14540,15 @@ class ThriftHiveMetastore_get_fields_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size747 = 0;
- $_etype750 = 0;
- $xfer += $input->readListBegin($_etype750, $_size747);
- for ($_i751 = 0; $_i751 < $_size747; ++$_i751)
+ $_size782 = 0;
+ $_etype785 = 0;
+ $xfer += $input->readListBegin($_etype785, $_size782);
+ for ($_i786 = 0; $_i786 < $_size782; ++$_i786)
{
- $elem752 = null;
- $elem752 = new \metastore\FieldSchema();
- $xfer += $elem752->read($input);
- $this->success []= $elem752;
+ $elem787 = null;
+ $elem787 = new \metastore\FieldSchema();
+ $xfer += $elem787->read($input);
+ $this->success []= $elem787;
}
$xfer += $input->readListEnd();
} else {
@@ -14468,9 +14600,9 @@ class ThriftHiveMetastore_get_fields_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter753)
+ foreach ($this->success as $iter788)
{
- $xfer += $iter753->write($output);
+ $xfer += $iter788->write($output);
}
}
$output->writeListEnd();
@@ -14712,15 +14844,15 @@ class ThriftHiveMetastore_get_fields_with_environment_context_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size754 = 0;
- $_etype757 = 0;
- $xfer += $input->readListBegin($_etype757, $_size754);
- for ($_i758 = 0; $_i758 < $_size754; ++$_i758)
+ $_size789 = 0;
+ $_etype792 = 0;
+ $xfer += $input->readListBegin($_etype792, $_size789);
+ for ($_i793 = 0; $_i793 < $_size789; ++$_i793)
{
- $elem759 = null;
- $elem759 = new \metastore\FieldSchema();
- $xfer += $elem759->read($input);
- $this->success []= $elem759;
+ $elem794 = null;
+ $elem794 = new \metastore\FieldSchema();
+ $xfer += $elem794->read($input);
+ $this->success []= $elem794;
}
$xfer += $input->readListEnd();
} else {
@@ -14772,9 +14904,9 @@ class ThriftHiveMetastore_get_fields_with_environment_context_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter760)
+ foreach ($this->success as $iter795)
{
- $xfer += $iter760->write($output);
+ $xfer += $iter795->write($output);
}
}
$output->writeListEnd();
@@ -14988,15 +15120,15 @@ class ThriftHiveMetastore_get_schema_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size761 = 0;
- $_etype764 = 0;
- $xfer += $input->readListBegin($_etype764, $_size761);
- for ($_i765 = 0; $_i765 < $_size761; ++$_i765)
+ $_size796 = 0;
+ $_etype799 = 0;
+ $xfer += $input->readListBegin($_etype799, $_size796);
+ for ($_i800 = 0; $_i800 < $_size796; ++$_i800)
{
- $elem766 = null;
- $elem766 = new \metastore\FieldSchema();
- $xfer += $elem766->read($input);
- $this->success []= $elem766;
+ $elem801 = null;
+ $elem801 = new \metastore\FieldSchema();
+ $xfer += $elem801->read($input);
+ $this->success []= $elem801;
}
$xfer += $input->readListEnd();
} else {
@@ -15048,9 +15180,9 @@ class ThriftHiveMetastore_get_schema_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter767)
+ foreach ($this->success as $iter802)
{
- $xfer += $iter767->write($output);
+ $xfer += $iter802->write($output);
}
}
$output->writeListEnd();
@@ -15292,15 +15424,15 @@ class ThriftHiveMetastore_get_schema_with_environment_context_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size768 = 0;
- $_etype771 = 0;
- $xfer += $input->readListBegin($_etype771, $_size768);
- for ($_i772 = 0; $_i772 < $_size768; ++$_i772)
+ $_size803 = 0;
+ $_etype806 = 0;
+ $xfer += $input->readListBegin($_etype806, $_size803);
+ for ($_i807 = 0; $_i807 < $_size803; ++$_i807)
{
- $elem773 = null;
- $elem773 = new \metastore\FieldSchema();
- $xfer += $elem773->read($input);
- $this->success []= $elem773;
+ $elem808 = null;
+ $elem808 = new \metastore\FieldSchema();
+ $xfer += $elem808->read($input);
+ $this->success []= $elem808;
}
$xfer += $input->readListEnd();
} else {
@@ -15352,9 +15484,9 @@ class ThriftHiveMetastore_get_schema_with_environment_context_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter774)
+ foreach ($this->success as $iter809)
{
- $xfer += $iter774->write($output);
+ $xfer += $iter809->write($output);
}
}
$output->writeListEnd();
@@ -15994,15 +16126,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
case 2:
if ($ftype == TType::LST) {
$this->primaryKeys = array();
- $_size775 = 0;
- $_etype778 = 0;
- $xfer += $input->readListBegin($_etype778, $_size775);
- for ($_i779 = 0; $_i779 < $_size775; ++$_i779)
+ $_size810 = 0;
+ $_etype813 = 0;
+ $xfer += $input->readListBegin($_etype813, $_size810);
+ for ($_i814 = 0; $_i814 < $_size810; ++$_i814)
{
- $elem780 = null;
- $elem780 = new \metastore\SQLPrimaryKey();
- $xfer += $elem780->read($input);
- $this->primaryKeys []= $elem780;
+ $elem815 = null;
+ $elem815 = new \metastore\SQLPrimaryKey();
+ $xfer += $elem815->read($input);
+ $this->primaryKeys []= $elem815;
}
$xfer += $input->readListEnd();
} else {
@@ -16012,15 +16144,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
case 3:
if ($ftype == TType::LST) {
$this->foreignKeys = array();
- $_size781 = 0;
- $_etype784 = 0;
- $xfer += $input->readListBegin($_etype784, $_size781);
- for ($_i785 = 0; $_i785 < $_size781; ++$_i785)
+ $_size816 = 0;
+ $_etype819 = 0;
+ $xfer += $input->readListBegin($_etype819, $_size816);
+ for ($_i820 = 0; $_i820 < $_size816; ++$_i820)
{
- $elem786 = null;
- $elem786 = new \metastore\SQLForeignKey();
- $xfer += $elem786->read($input);
- $this->foreignKeys []= $elem786;
+ $elem821 = null;
+ $elem821 = new \metastore\SQLForeignKey();
+ $xfer += $elem821->read($input);
+ $this->foreignKeys []= $elem821;
}
$xfer += $input->readListEnd();
} else {
@@ -16030,15 +16162,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
case 4:
if ($ftype == TType::LST) {
$this->uniqueConstraints = array();
- $_size787 = 0;
- $_etype790 = 0;
- $xfer += $input->readListBegin($_etype790, $_size787);
- for ($_i791 = 0; $_i791 < $_size787; ++$_i791)
+ $_size822 = 0;
+ $_etype825 = 0;
+ $xfer += $input->readListBegin($_etype825, $_size822);
+ for ($_i826 = 0; $_i826 < $_size822; ++$_i826)
{
- $elem792 = null;
- $elem792 = new \metastore\SQLUniqueConstraint();
- $xfer += $elem792->read($input);
- $this->uniqueConstraints []= $elem792;
+ $elem827 = null;
+ $elem827 = new \metastore\SQLUniqueConstraint();
+ $xfer += $elem827->read($input);
+ $this->uniqueConstraints []= $elem827;
}
$xfer += $input->readListEnd();
} else {
@@ -16048,15 +16180,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
case 5:
if ($ftype == TType::LST) {
$this->notNullConstraints = array();
- $_size793 = 0;
- $_etype796 = 0;
- $xfer += $input->readListBegin($_etype796, $_size793);
- for ($_i797 = 0; $_i797 < $_size793; ++$_i797)
+ $_size828 = 0;
+ $_etype831 = 0;
+ $xfer += $input->readListBegin($_etype831, $_size828);
+ for ($_i832 = 0; $_i832 < $_size828; ++$_i832)
{
- $elem798 = null;
- $elem798 = new \metastore\SQLNotNullConstraint();
- $xfer += $elem798->read($input);
- $this->notNullConstraints []= $elem798;
+ $elem833 = null;
+ $elem833 = new \metastore\SQLNotNullConstraint();
+ $xfer += $elem833->read($input);
+ $this->notNullConstraints []= $elem833;
}
$xfer += $input->readListEnd();
} else {
@@ -16092,9 +16224,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
{
$output->writeListBegin(TType::STRUCT, count($this->primaryKeys));
{
- foreach ($this->primaryKeys as $iter799)
+ foreach ($this->primaryKeys as $iter834)
{
- $xfer += $iter799->write($output);
+ $xfer += $iter834->write($output);
}
}
$output->writeListEnd();
@@ -16109,9 +16241,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
{
$output->writeListBegin(TType::STRUCT, count($this->foreignKeys));
{
- foreach ($this->foreignKeys as $iter800)
+ foreach ($this->foreignKeys as $iter835)
{
- $xfer += $iter800->write($output);
+ $xfer += $iter835->write($output);
}
}
$output->writeListEnd();
@@ -16126,9 +16258,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
{
$output->writeListBegin(TType::STRUCT, count($this->uniqueConstraints));
{
- foreach ($this->uniqueConstraints as $iter801)
+ foreach ($this->uniqueConstraints as $iter836)
{
- $xfer += $iter801->write($output);
+ $xfer += $iter836->write($output);
}
}
$output->writeListEnd();
@@ -16143,9 +16275,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
{
$output->writeListBegin(TType::STRUCT, count($this->notNullConstraints));
{
- foreach ($this->notNullConstraints as $iter802)
+ foreach ($this->notNullConstraints as $iter837)
{
- $xfer += $iter802->write($output);
+ $xfer += $iter837->write($output);
}
}
$output->writeListEnd();
@@ -17781,14 +17913,14 @@ class ThriftHiveMetastore_truncate_table_args {
case 3:
if ($ftype == TType::LST) {
$this->partNames = array();
- $_size803 = 0;
- $_etype806 = 0;
- $xfer += $input->readListBegin($_etype806, $_size803);
- for ($_i807 = 0; $_i807 < $_size803; ++$_i807)
+ $_size838 = 0;
+ $_etype841 = 0;
+ $xfer += $input->readListBegin($_etype841, $_size838);
+ for ($_i842 = 0; $_i842 < $_size838; ++$_i842)
{
- $elem808 = null;
- $xfer += $input->readString($elem808);
- $this->partNames []= $elem808;
+ $elem843 = null;
+ $xfer += $input->readString($elem843);
+ $this->partNames []= $elem843;
}
$xfer += $input->readListEnd();
} else {
@@ -17826,9 +17958,9 @@ class ThriftHiveMetastore_truncate_table_args {
{
$output->writeListBegin(TType::STRING, count($this->partNames));
{
- foreach ($this->partNames as $iter809)
+ foreach ($this->partNames as $iter844)
{
- $xfer += $output->writeString($iter809);
+ $xfer += $output->writeString($iter844);
}
}
$output->writeListEnd();
@@ -18079,14 +18211,14 @@ class ThriftHiveMetastore_get_tables_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size810 = 0;
- $_etype813 = 0;
- $xfer += $input->readListBegin($_etype813, $_size810);
- for ($_i814 = 0; $_i814 < $_size810; ++$_i814)
+ $_size845 = 0;
+ $_etype848 = 0;
+ $xfer += $input->readListBegin($_etype848, $_size845);
+ for ($_i849 = 0; $_i849 < $_size845; ++$_i849)
{
- $elem815 = null;
- $xfer += $input->readString($elem815);
- $this->success []= $elem815;
+ $elem850 = null;
+ $xfer += $input->readString($elem850);
+ $this->success []= $elem850;
}
$xfer += $input->readListEnd();
} else {
@@ -18122,9 +18254,9 @@ class ThriftHiveMetastore_get_tables_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter816)
+ foreach ($this->success as $iter851)
{
- $xfer += $output->writeString($iter816);
+ $xfer += $output->writeString($iter851);
}
}
$output->writeListEnd();
@@ -18326,14 +18458,14 @@ class ThriftHiveMetastore_get_tables_by_type_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size817 = 0;
- $_etype820 = 0;
- $xfer += $input->readListBegin($_etype820, $_size817);
- for ($_i821 = 0; $_i821 < $_size817; ++$_i821)
+ $_size852 = 0;
+ $_etype855 = 0;
+ $xfer += $input->readListBegin($_etype855, $_size852);
+ for ($_i856 = 0; $_i856 < $_size852; ++$_i856)
{
- $elem822 = null;
- $xfer += $input->readString($elem822);
- $this->success []= $elem822;
+ $elem857 = null;
+ $xfer += $input->readString($elem857);
+ $this->success []= $elem857;
}
$xfer += $input->readListEnd();
} else {
@@ -18369,9 +18501,9 @@ class ThriftHiveMetastore_get_tables_by_type_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter823)
+ foreach ($this->success as $iter858)
{
- $xfer += $output->writeString($iter823);
+ $xfer += $output->writeString($iter858);
}
}
$output->writeListEnd();
@@ -18527,14 +18659,14 @@ class ThriftHiveMetastore_get_materialized_views_for_rewriting_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size824 = 0;
- $_etype827 = 0;
- $xfer += $input->readListBegin($_etype827, $_size824);
- for ($_i828 = 0; $_i828 < $_size824; ++$_i828)
+ $_size859 = 0;
+ $_etype862 = 0;
+ $xfer += $input->readListBegin($_etype862, $_size859);
+ for ($_i863 = 0; $_i863 < $_size859; ++$_i863)
{
- $elem829 = null;
- $xfer += $input->readString($elem829);
- $this->success []= $elem829;
+ $elem864 = null;
+ $xfer += $input->readString($elem864);
+ $this->success []= $elem864;
}
$xfer += $input->readListEnd();
} else {
@@ -18570,9 +18702,9 @@ class ThriftHiveMetastore_get_materialized_views_for_rewriting_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter830)
+ foreach ($this->success as $iter865)
{
- $xfer += $output->writeString($iter830);
+ $xfer += $output->writeString($iter865);
}
}
$output->writeListEnd();
@@ -18677,14 +18809,14 @@ class ThriftHiveMetastore_get_table_meta_args {
case 3:
if ($ftype == TType::LST) {
$this->tbl_types = array();
- $_size831 = 0;
- $_etype834 = 0;
- $xfer += $input->readListBegin($_etype834, $_size831);
- for ($_i835 = 0; $_i835 < $_size831; ++$_i835)
+ $_size866 = 0;
+ $_etype869 = 0;
+ $xfer += $input->readListBegin($_etype869, $_size866);
+ for ($_i870 = 0; $_i870 < $_size866; ++$_i870)
{
- $elem836 = null;
- $xfer += $input->readString($elem836);
- $this->tbl_types []= $elem836;
+ $elem871 = null;
+ $xfer += $input->readString($elem871);
+ $this->tbl_types []= $elem871;
}
$xfer += $input->readListEnd();
} else {
@@ -18722,9 +18854,9 @@ class ThriftHiveMetastore_get_table_meta_args {
{
$output->writeListBegin(TType::STRING, count($this->tbl_types));
{
- foreach ($this->tbl_types as $iter837)
+ foreach ($this->tbl_types as $iter872)
{
- $xfer += $output->writeString($iter837);
+ $xfer += $output->writeString($iter872);
}
}
$output->writeListEnd();
@@ -18801,15 +18933,15 @@ class ThriftHiveMetastore_get_table_meta_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size838 = 0;
- $_etype841 = 0;
- $xfer += $input->readListBegin($_etype841, $_size838);
- for ($_i842 = 0; $_i842 < $_size838; ++$_i842)
+ $_size873 = 0;
+ $_etype876 = 0;
+ $xfer += $input->readListBegin($_etype876, $_size873);
+ for ($_i877 = 0; $_i877 < $_size873; ++$_i877)
{
- $elem843 = null;
- $elem843 = new \metastore\TableMeta();
- $xfer += $elem843->read($input);
- $this->success []= $elem843;
+ $elem878 = null;
+ $elem878 = new \metastore\TableMeta();
+ $xfer += $elem878->read($input);
+ $this->success []= $elem878;
}
$xfer += $input->readListEnd();
} else {
@@ -18845,9 +18977,9 @@ class ThriftHiveMetastore_get_table_meta_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter844)
+ foreach ($this->success as $iter879)
{
- $xfer += $iter844->write($output);
+ $xfer += $iter879->write($output);
}
}
$output->writeListEnd();
@@ -19003,14 +19135,14 @@ class ThriftHiveMetastore_get_all_tables_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size845 = 0;
- $_etype848 = 0;
- $xfer += $input->readListBegin($_etype848, $_size845);
- for ($_i849 = 0; $_i849 < $_size845; ++$_i849)
+ $_size880 = 0;
+ $_etype883 = 0;
+ $xfer += $input->readListBegin($_etype883, $_size880);
+ for ($_i884 = 0; $_i884 < $_size880; ++$_i884)
{
- $elem850 = null;
- $xfer += $input->readString($elem850);
- $this->success []= $elem850;
+ $elem885 = null;
+ $xfer += $input->readString($elem885);
+ $this->success []= $elem885;
}
$xfer += $input->readListEnd();
} else {
@@ -19046,9 +19178,9 @@ class ThriftHiveMetastore_get_all_tables_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter851)
+ foreach ($this->success as $iter886)
{
- $xfer += $output->writeString($iter851);
+ $xfer += $output->writeString($iter886);
}
}
$output->writeListEnd();
@@ -19363,14 +19495,14 @@ class ThriftHiveMetastore_get_table_objects_by_name_args {
case 2:
if ($ftype == TType::LST) {
$this->tbl_names = array();
- $_size852 = 0;
- $_etype855 = 0;
- $xfer += $input->readListBegin($_etype855, $_size852);
- for ($_i856 = 0; $_i856 < $_size852; ++$_i856)
+ $_size887 = 0;
+ $_etype890 = 0;
+ $xfer += $input->readListBegin($_etype890, $_size887);
+ for ($_i891 = 0; $_i891 < $_size887; ++$_i891)
{
- $elem857 = null;
- $xfer += $input->readString($elem857);
- $this->tbl_names []= $elem857;
+ $elem892 = null;
+ $xfer += $input->readString($elem892);
+ $this->tbl_names []= $elem892;
}
$xfer += $input->readListEnd();
} else {
@@ -19403,9 +19535,9 @@ class ThriftHiveMetastore_get_table_objects_by_name_args {
{
$output->writeListBegin(TType::STRING, count($this->tbl_names));
{
- foreach ($this->tbl_names as $iter858)
+ foreach ($this->tbl_names as $iter893)
{
- $xfer += $output->writeString($iter858);
+ $xfer += $output->writeString($iter893);
}
}
$output->writeListEnd();
@@ -19470,15 +19602,15 @@ class ThriftHiveMetastore_get_table_objects_by_name_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size859 = 0;
- $_etype862 = 0;
- $xfer += $input->readListBegin($_etype862, $_size859);
- for ($_i863 = 0; $_i863 < $_size859; ++$_i863)
+ $_size894 = 0;
+ $_etype897 = 0;
+ $xfer += $input->readListBegin($_etype897, $_size894);
+ for ($_i898 = 0; $_i898 < $_size894; ++$_i898)
{
- $elem864 = null;
- $elem864 = new \metastore\Table();
- $xfer += $elem864->read($input);
- $this->success []= $elem864;
+ $elem899 = null;
+ $elem899 = new \metastore\Table();
+ $xfer += $elem899->read($input);
+ $this->success []= $elem899;
}
$xfer += $input->readListEnd();
} else {
@@ -19506,9 +19638,9 @@ class ThriftHiveMetastore_get_table_objects_by_name_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter865)
+ foreach ($this->success as $iter900)
{
- $xfer += $iter865->write($output);
+ $xfer += $iter900->write($output);
}
}
$output->writeListEnd();
@@ -20035,14 +20167,14 @@ class ThriftHiveMetastore_get_materialization_invalidation_info_args {
case 2:
if ($ftype == TType::LST) {
$this->tbl_names = array();
- $_size866 = 0;
- $_etype869 = 0;
- $xfer += $input->readListBegin($_etype869, $_size866);
- for ($_i870 = 0; $_i870 < $_size866; ++$_i870)
+ $_size901 = 0;
+ $_etype904 = 0;
+ $xfer += $input->readListBegin($_etype904, $_size901);
+ for ($_i905 = 0; $_i905 < $_size901; ++$_i905)
{
- $elem871 = null;
- $xfer += $input->readString($elem871);
- $this->tbl_names []= $elem871;
+ $elem906 = null;
+ $xfer += $input->readString($elem906);
+ $this->tbl_names []= $elem906;
}
$xfer += $input->readListEnd();
} else {
@@ -20075,9 +20207,9 @@ class ThriftHiveMetastore_get_materialization_invalidation_info_args {
{
$output->writeListBegin(TType::STRING, count($this->tbl_names));
{
- foreach ($this->tbl_names as $iter872)
+ foreach ($this->tbl_names as $iter907)
{
- $xfer += $output->writeString($iter872);
+ $xfer += $output->writeString($iter907);
}
}
$output->writeListEnd();
@@ -20182,18 +20314,18 @@ class ThriftHiveMetastore_get_materialization_invalidation_info_result {
case 0:
if ($ftype == TType::MAP) {
$this->success = array();
- $_size873 = 0;
- $_ktype874 = 0;
- $_vtype875 = 0;
- $xfer += $input->readMapBegin($_ktype874, $_vtype875, $_size873);
- for ($_i877 = 0; $_i877 < $_size873; ++$_i877)
+ $_size908 = 0;
+ $_ktype909 = 0;
+ $_vtype910 = 0;
+ $xfer += $input->readMapBegin($_ktype909, $_vtype910, $_size908);
+ for ($_i912 = 0; $_i912 < $_size908; ++$_i912)
{
- $key878 = '';
- $val879 = new \metastore\Materialization();
- $xfer += $input->readString($key878);
- $val879 = new \metastore\Materialization();
- $xfer += $val879->read($input);
- $this->success[$key878] = $val879;
+ $key913 = '';
+ $val914 = new \metastore\Materialization();
+ $xfer += $input->readString($key913);
+ $val914 = new \metastore\Materialization();
+ $xfer += $val914->read($input);
+ $this->success[$key913] = $val914;
}
$xfer += $input->readMapEnd();
} else {
@@ -20245,10 +20377,10 @@ class ThriftHiveMetastore_get_materialization_invalidation_info_result {
{
$output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
{
- foreach ($this->success as $kiter880 => $viter881)
+ foreach ($this->success as $kiter915 => $viter916)
{
- $xfer += $output->writeString($kiter880);
- $xfer += $viter881->write($output);
+ $xfer += $output->writeString($kiter915);
+ $xfer += $viter916->write($output);
}
}
$output->writeMapEnd();
@@ -20737,14 +20869,14 @@ class ThriftHiveMetastore_get_table_names_by_filter_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size882 = 0;
- $_etype885 = 0;
- $xfer += $input->readListBegin($_etype885, $_size882);
- for ($_i886 = 0; $_i886 < $_size882; ++$_i886)
+ $_size917 = 0;
+ $_etype920 = 0;
+ $xfer += $input->readListBegin($_etype920, $_size917);
+ for ($_i921 = 0; $_i921 < $_size917; ++$_i921)
{
- $elem887 = null;
- $xfer += $input->readString($elem887);
- $this->success []= $elem887;
+ $elem922 = null;
+ $xfer += $input->readString($elem922);
+ $this->success []= $elem922;
}
$xfer += $input->readListEnd();
} else {
@@ -20796,9 +20928,9 @@ class ThriftHiveMetastore_get_table_names_by_filter_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter888)
+ foreach ($this->success as $iter923)
{
- $xfer += $output->writeString($iter888);
+ $xfer += $output->writeString($iter923);
}
}
$output->writeListEnd();
@@ -22111,15 +22243,15 @@ class ThriftHiveMetastore_add_partitions_args {
case 1:
if ($ftype == TType::LST) {
$this->new_parts = array();
- $_size889 = 0;
- $_etype892 = 0;
- $xfer += $input->readListBegin($_etype892, $_size889);
- for ($_i893 = 0; $_i893 < $_size889; ++$_i893)
+ $_size924 = 0;
+ $_etype927 = 0;
+ $xfer += $input->readListBegin($_etype927, $_size924);
+ for ($_i928 = 0; $_i928 < $_size924; ++$_i928)
{
- $elem894 = null;
- $elem894 = new \metastore\Partition();
- $xfer += $elem894->read($input);
- $this->new_parts []= $elem894;
+ $elem929 = null;
+ $elem929 = new \metastore\Partition();
+ $xfer += $elem929->read($input);
+ $this->new_parts []= $elem929;
}
$xfer += $input->readListEnd();
} else {
@@ -22147,9 +22279,9 @@ class ThriftHiveMetastore_add_partitions_args {
{
$output->writeListBegin(TType::STRUCT, count($this->new_parts));
{
- foreach ($this->new_parts as $iter895)
+ foreach ($this->new_parts as $iter930)
{
- $xfer += $iter895->write($output);
+ $xfer += $iter930->write($output);
}
}
$output->writeListEnd();
@@ -22364,15 +22496,15 @@ class ThriftHiveMetastore_add_partitions_pspec_args {
case 1:
if ($ftype == TType::LST) {
$this->new_parts = array();
- $_size896 = 0;
- $_etype899 = 0;
- $xfer += $input->readListBegin($_etype899, $_size896);
- for ($_i900 = 0; $_i900 < $_size896; ++$_i900)
+ $_size931 = 0;
+ $_etype934 = 0;
+ $xfer += $input->readListBegin($_etype934, $_size931);
+ for ($_i935 = 0; $_i935 < $_size931; ++$_i935)
{
- $elem901 = null;
- $elem901 = new \metastore\PartitionSpec();
- $xfer += $elem901->read($input);
- $this->new_parts []= $elem901;
+ $elem936 = null;
+ $elem936 = new \metastore\PartitionSpec();
+ $xfer += $elem936->read($input);
+ $this->new_parts []= $elem936;
}
$xfer += $input->readListEnd();
} else {
@@ -22400,9 +22532,9 @@ class ThriftHiveMetastore_add_partitions_pspec_args {
{
$output->writeListBegin(TType::STRUCT, count($this->new_parts));
{
- foreach ($this->new_parts as $iter902)
+ foreach ($this->new_parts as $iter937)
{
- $xfer += $iter902->write($output);
+ $xfer += $iter937->write($output);
}
}
$output->writeListEnd();
@@ -22652,14 +22784,14 @@ class ThriftHiveMetastore_append_partition_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size903 = 0;
- $_etype906 = 0;
- $xfer += $input->readListBegin($_etype906, $_size903);
- for ($_i907 = 0; $_i907 < $_size903; ++$_i907)
+ $_size938 = 0;
+ $_etype941 = 0;
+ $xfer += $input->readListBegin($_etype941, $_size938);
+ for ($_i942 = 0; $_i942 < $_size938; ++$_i942)
{
- $elem908 = null;
- $xfer += $input->readString($elem908);
- $this->part_vals []= $elem908;
+ $elem943 = null;
+ $xfer += $input->readString($elem943);
+ $this->part_vals []= $elem943;
}
$xfer += $input->readListEnd();
} else {
@@ -22697,9 +22829,9 @@ class ThriftHiveMetastore_append_partition_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter909)
+ foreach ($this->part_vals as $iter944)
{
- $xfer += $output->writeString($iter909);
+ $xfer += $output->writeString($iter944);
}
}
$output->writeListEnd();
@@ -23201,14 +23333,14 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size910 = 0;
- $_etype913 = 0;
- $xfer += $input->readListBegin($_etype913, $_size910);
- for ($_i914 = 0; $_i914 < $_size910; ++$_i914)
+ $_size945 = 0;
+ $_etype948 = 0;
+ $xfer += $input->readListBegin($_etype948, $_size945);
+ for ($_i949 = 0; $_i949 < $_size945; ++$_i949)
{
- $elem915 = null;
- $xfer += $input->readString($elem915);
- $this->part_vals []= $elem915;
+ $elem950 = null;
+ $xfer += $input->readString($elem950);
+ $this->part_vals []= $elem950;
}
$xfer += $input->readListEnd();
} else {
@@ -23254,9 +23386,9 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter916)
+ foreach ($this->part_vals as $iter951)
{
- $xfer += $output->writeString($iter916);
+ $xfer += $output->writeString($iter951);
}
}
$output->writeListEnd();
@@ -24110,14 +24242,14 @@ class ThriftHiveMetastore_drop_partition_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size917 = 0;
- $_etype920 = 0;
- $xfer += $input->readListBegin($_etype920, $_size917);
- for ($_i921 = 0; $_i921 < $_size917; ++$_i921)
+ $_size952 = 0;
+ $_etype955 = 0;
+ $xfer += $input->readListBegin($_etype955, $_size952);
+ for ($_i956 = 0; $_i956 < $_size952; ++$_i956)
{
- $elem922 = null;
- $xfer += $input->readString($elem922);
- $this->part_vals []= $elem922;
+ $elem957 = null;
+ $xfer += $input->readString($elem957);
+ $this->part_vals []= $elem957;
}
$xfer += $input->readListEnd();
} else {
@@ -24162,9 +24294,9 @@ class ThriftHiveMetastore_drop_partition_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter923)
+ foreach ($this->part_vals as $iter958)
{
- $xfer += $output->writeString($iter923);
+ $xfer += $output->writeString($iter958);
}
}
$output->writeListEnd();
@@ -24417,14 +24549,14 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size924 = 0;
- $_etype927 = 0;
- $xfer += $input->readListBegin($_etype927, $_size924);
- for ($_i928 = 0; $_i928 < $_size924; ++$_i928)
+ $_size959 = 0;
+ $_etype962 = 0;
+ $xfer += $input->readListBegin($_etype962, $_size959);
+ for ($_i963 = 0; $_i963 < $_size959; ++$_i963)
{
- $elem929 = null;
- $xfer += $input->readString($elem929);
- $this->part_vals []= $elem929;
+ $elem964 = null;
+ $xfer += $input->readString($elem964);
+ $this->part_vals []= $elem964;
}
$xfer += $input->readListEnd();
} else {
@@ -24477,9 +24609,9 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter930)
+ foreach ($this->part_vals as $iter965)
{
- $xfer += $output->writeString($iter930);
+ $xfer += $output->writeString($iter965);
}
}
$output->writeListEnd();
@@ -25493,14 +25625,14 @@ class ThriftHiveMetastore_get_partition_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size931 = 0;
- $_etype934 = 0;
- $xfer += $input->readListBegin($_etype934, $_size931);
- for ($_i935 = 0; $_i935 < $_size931; ++$_i935)
+ $_size966 = 0;
+ $_etype969 = 0;
+ $xfer += $input->readListBegin($_etype969, $_size966);
+ for ($_i970 = 0; $_i970 < $_size966; ++$_i970)
{
- $elem936 = null;
- $xfer += $input->readString($elem936);
- $this->part_vals []= $elem936;
+ $elem971 = null;
+ $xfer += $input->readString($elem971);
+ $this->part_vals []= $elem971;
}
$xfer += $input->readListEnd();
} else {
@@ -25538,9 +25670,9 @@ class ThriftHiveMetastore_get_partition_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter937)
+ foreach ($this->part_vals as $iter972)
{
- $xfer += $output->writeString($iter937);
+ $xfer += $output->writeString($iter972);
}
}
$output->writeListEnd();
@@ -25782,17 +25914,17 @@ class ThriftHiveMetastore_exchange_partition_args {
case 1:
if ($ftype == TType::MAP) {
$this->partitionSpecs = array();
- $_size938 = 0;
- $_ktype939 = 0;
- $_vtype940 = 0;
- $xfer += $input->readMapBegin($_ktype939, $_vtype940, $_size938);
- for ($_i942 = 0; $_i942 < $_size938; ++$_i942)
+ $_size973 = 0;
+ $_ktype974 = 0;
+ $_vtype975 = 0;
+ $xfer += $input->readMapBegin($_ktype974, $_vtype975, $_size973);
+ for ($_i977 = 0; $_i977 < $_size973; ++$_i977)
{
- $key943 = '';
- $val944 = '';
- $xfer += $input->readString($key943);
- $xfer += $input->readString($val944);
- $this->partitionSpecs[$key943] = $val944;
+ $key978 = '';
+ $val979 = '';
+ $xfer += $input->readString($key978);
+ $xfer += $input->readString($val979);
+ $this->partitionSpecs[$key978] = $val979;
}
$xfer += $input->readMapEnd();
} else {
@@ -25848,10 +25980,10 @@ class ThriftHiveMetastore_exchange_partition_args {
{
$output->writeMapBegin(TType::STRING, TType::STRING, count($this->partitionSpecs));
{
- foreach ($this->partitionSpecs as $kiter945 => $viter946)
+ foreach ($this->partitionSpecs as $kiter980 => $viter981)
{
- $xfer += $output->writeString($kiter945);
- $xfer += $output->writeString($viter946);
+ $xfer += $output->writeString($kiter980);
+ $xfer += $output->writeString($viter981);
}
}
$output->writeMapEnd();
@@ -26163,17 +26295,17 @@ class ThriftHiveMetastore_exchange_partitions_args {
case 1:
if ($ftype == TType::MAP) {
$this->partitionSpecs = array();
- $_size947 = 0;
- $_ktype948 = 0;
- $_vtype949 = 0;
- $xfer += $input->readMapBegin($_ktype948, $_vtype949, $_size947);
- for ($_i951 = 0; $_i951 < $_size947; ++$_i951)
+ $_size982 = 0;
+ $_ktype983 = 0;
+ $_vtype984 = 0;
+ $xfer += $input->readMapBegin($_ktype983, $_vtype984, $_size982);
+ for ($_i986 = 0; $_i986 < $_size982; ++$_i986)
{
- $key952 = '';
- $val953 = '';
- $xfer += $input->readString($key952);
- $xfer += $input->readString($val953);
- $this->partitionSpecs[$key952] = $val953;
+ $key987 = '';
+ $val988 = '';
+ $xfer += $input->readString($key987);
+ $xfer += $input->readString($val988);
+ $this->partitionSpecs[$key987] = $val988;
}
$xfer += $input->readMapEnd();
} else {
@@ -26229,10 +26361,10 @@ class ThriftHiveMetastore_exchange_partitions_args {
{
$output->writeMapBegin(TType::STRING, TType::STRING, count($this->partitionSpecs));
{
- foreach ($this->partitionSpecs as $kiter954 => $viter955)
+ foreach ($this->partitionSpecs as $kiter989 => $viter990)
{
- $xfer += $output->writeString($kiter954);
- $xfer += $output->writeString($viter955);
+ $xfer += $output->writeString($kiter989);
+ $xfer += $output->writeString($viter990);
}
}
$output->writeMapEnd();
@@ -26365,15 +26497,15 @@ class ThriftHiveMetastore_exchange_partitions_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size956 = 0;
- $_etype959 = 0;
- $xfer += $input->readListBegin($_etype959, $_size956);
- for ($_i960 = 0; $_i960 < $_size956; ++$_i960)
+ $_size991 = 0;
+ $_etype994 = 0;
+ $xfer += $input->readListBegin($_etype994, $_size991);
+ for ($_i995 = 0; $_i995 < $_size991; ++$_i995)
{
- $elem961 = null;
- $elem961 = new \metastore\Partition();
- $xfer += $elem961->read($input);
- $this->success []= $elem961;
+ $elem996 = null;
+ $elem996 = new \metastore\Partition();
+ $xfer += $elem996->read($input);
+ $this->success []= $elem996;
}
$xfer += $input->readListEnd();
} else {
@@ -26433,9 +26565,9 @@ class ThriftHiveMetastore_exchange_partitions_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter962)
+ foreach ($this->success as $iter997)
{
- $xfer += $iter962->write($output);
+ $xfer += $iter997->write($output);
}
}
$output->writeListEnd();
@@ -26581,14 +26713,14 @@ class ThriftHiveMetastore_get_partition_with_auth_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size963 = 0;
- $_etype966 = 0;
- $xfer += $input->readListBegin($_etype966, $_size963);
- for ($_i967 = 0; $_i967 < $_size963; ++$_i967)
+ $_size998 = 0;
+ $_etype1001 = 0;
+ $xfer += $input->readListBegin($_etype1001, $_size998);
+ for ($_i1002 = 0; $_i1002 < $_size998; ++$_i1002)
{
- $elem968 = null;
- $xfer += $input->readString($elem968);
- $this->part_vals []= $elem968;
+ $elem1003 = null;
+ $xfer += $input->readString($elem1003);
+ $this->part_vals []= $elem1003;
}
$xfer += $input->readListEnd();
} else {
@@ -26605,14 +26737,14 @@ class ThriftHiveMetastore_get_partition_with_auth_args {
case 5:
if ($ftype == TType::LST) {
$this->group_names = array();
- $_size969 = 0;
- $_etype972 = 0;
- $xfer += $input->readListBegin($_etype972, $_size969);
- for ($_i973 = 0; $_i973 < $_size969; ++$_i973)
+ $_size1004 = 0;
+ $_etype1007 = 0;
+ $xfer += $input->readListBegin($_etype1007, $_size1004);
+ for ($_i1008 = 0; $_i1008 < $_size1004; ++$_i1008)
{
- $elem974 = null;
- $xfer += $input->readString($elem974);
- $this->group_names []= $elem974;
+ $elem1009 = null;
+ $xfer += $input->readString($elem1009);
+ $this->group_names []= $elem1009;
}
$xfer += $input->readListEnd();
} else {
@@ -26650,9 +26782,9 @@ class ThriftHiveMetastore_get_partition_with_auth_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter975)
+ foreach ($this->part_vals as $iter1010)
{
- $xfer += $output->writeString($iter975);
+ $xfer += $output->writeString($iter1010);
}
}
$output->writeListEnd();
@@ -26672,9 +26804,9 @@ class ThriftHiveMetastore_get_partition_with_auth_args {
{
$output->writeListBegin(TType::STRING, count($this->group_names));
{
- foreach ($this->group_names as $iter976)
+ foreach ($this->group_names as $iter1011)
{
- $xfer += $output->writeString($iter976);
+ $xfer += $output->writeString($iter1011);
}
}
$output->writeListEnd();
@@ -27265,15 +27397,15 @@ class ThriftHiveMetastore_get_partitions_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size977 = 0;
- $_etype980 = 0;
- $xfer += $input->readListBegin($_etype980, $_size977);
- for ($_i981 = 0; $_i981 < $_size977; ++$_i981)
+ $_size1012 = 0;
+ $_etype1015 = 0;
+ $xfer += $input->readListBegin($_etype1015, $_size1012);
+ for ($_i1016 = 0; $_i1016 < $_size1012; ++$_i1016)
{
- $elem982 = null;
- $elem982 = new \metastore\Partition();
- $xfer += $elem982->read($input);
- $this->success []= $elem982;
+ $elem1017 = null;
+ $elem1017 = new \metastore\Partition();
+ $xfer += $elem1017->read($input);
+ $this->success []= $elem1017;
}
$xfer += $input->readListEnd();
} else {
@@ -27317,9 +27449,9 @@ class ThriftHiveMetastore_get_partitions_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter983)
+ foreach ($this->success as $iter1018)
{
- $xfer += $iter983->write($output);
+ $xfer += $iter1018->write($output);
}
}
$output->writeListEnd();
@@ -27465,14 +27597,14 @@ class ThriftHiveMetastore_get_partitions_with_auth_args {
case 5:
if ($ftype == TType::LST) {
$this->group_names = array();
- $_size984 = 0;
- $_etype987 = 0;
- $xfer += $input->readListBegin($_etype987, $_size984);
- for ($_i988 = 0; $_i988 < $_size984; ++$_i988)
+ $_size1019 = 0;
+ $_etype1022 = 0;
+ $xfer += $input->readListBegin($_etype1022, $_size1019);
+ for ($_i1023 = 0; $_i1023 < $_size1019; ++$_i1023)
{
- $elem989 = null;
- $xfer += $input->readString($elem989);
- $this->group_names []= $elem989;
+ $elem1024 = null;
+ $xfer += $input->readString($elem1024);
+ $this->group_names []= $elem1024;
}
$xfer += $input->readListEnd();
} else {
@@ -27520,9 +27652,9 @@ class ThriftHiveMetastore_get_partitions_with_auth_args {
{
$output->writeListBegin(TType::STRING, count($this->group_names));
{
- foreach ($this->group_names as $iter990)
+ foreach ($this->group_names as $iter1025)
{
- $xfer += $output->writeString($iter990);
+ $xfer += $output->writeString($iter1025);
}
}
$output->writeListEnd();
@@ -27611,15 +27743,15 @@ class ThriftHiveMetastore_get_partitions_with_auth_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size991 = 0;
- $_etype994 = 0;
- $xfer += $input->readListBegin($_etype994, $_size991);
- for ($_i995 = 0; $_i995 < $_size991; ++$_i995)
+ $_size1026 = 0;
+ $_etype1029 = 0;
+ $xfer += $input->readListBegin($_etype1029, $_size1026);
+ for ($_i1030 = 0; $_i1030 < $_size1026; ++$_i1030)
{
- $elem996 = null;
- $elem996 = new \metastore\Partition();
- $xfer += $elem996->read($input);
- $this->success []= $elem996;
+ $elem1031 = null;
+ $elem1031 = new \metastore\Partition();
+ $xfer += $elem1031->read($input);
+ $this->success []= $elem1031;
}
$xfer += $input->readListEnd();
} else {
@@ -27663,9 +27795,9 @@ class ThriftHiveMetastore_get_partitions_with_auth_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter997)
+ foreach ($this->success as $iter1032)
{
- $xfer += $iter997->write($output);
+ $xfer += $iter1032->write($output);
}
}
$output->writeListEnd();
@@ -27885,15 +28017,15 @@ class ThriftHiveMetastore_get_partitions_pspec_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size998 = 0;
- $_etype1001 = 0;
- $xfer += $input->readListBegin($_etype1001, $_size998);
- for ($_i1002 = 0; $_i1002 < $_size998; ++$_i1002)
+ $_size1033 = 0;
+ $_etype1036 = 0;
+ $xfer += $input->readListBegin($_etype1036, $_size1033);
+ for ($_i1037 = 0; $_i1037 < $_size1033; ++$_i1037)
{
- $elem1003 = null;
- $elem1003 = new \metastore\PartitionSpec();
- $xfer += $elem1003->read($input);
- $this->success []= $elem1003;
+ $elem1038 = null;
+ $elem1038 = new \metastore\PartitionSpec();
+ $xfer += $elem1038->read($input);
+ $this->success []= $elem1038;
}
$xfer += $input->readListEnd();
} else {
@@ -27937,9 +28069,9 @@ class ThriftHiveMetastore_get_partitions_pspec_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter1004)
+ foreach ($this->success as $iter1039)
{
- $xfer += $iter1004->write($output);
+ $xfer += $iter1039->write($output);
}
}
$output->writeListEnd();
@@ -28158,14 +28290,14 @@ class ThriftHiveMetastore_get_partition_names_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size1005 = 0;
- $_etype1008 = 0;
- $xfer += $input->readListBegin($_etype1008, $_size1005);
- for ($_i1009 = 0; $_i1009 < $_size1005; ++$_i1009)
+ $_size1040 = 0;
+ $_etype1043 = 0;
+ $xfer += $input->readListBegin($_etype1043, $_size1040);
+ for ($_i1044 = 0; $_i1044 < $_size1040; ++$_i1044)
{
- $elem1010 = null;
- $xfer += $input->readString($elem1010);
- $this->success []= $elem1010;
+ $elem1045 = null;
+ $xfer += $input->readString($elem1045);
+ $this->success []= $elem1045;
}
$xfer += $input->readListEnd();
} else {
@@ -28209,9 +28341,9 @@ class ThriftHiveMetastore_get_partition_names_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter1011)
+ foreach ($this->success as $iter1046)
{
- $xfer += $output->writeString($iter1011);
+ $xfer += $output->writeString($iter1046);
}
}
$output->writeListEnd();
@@ -28542,14 +28674,14 @@ class ThriftHiveMetastore_get_partitions_ps_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size1012 = 0;
- $_etype1015 = 0;
- $xfer += $input->readListBegin($_etype1015, $_size1012);
- for ($_i1016 = 0; $_i1016 < $_size1012; ++$_i1016)
+ $_size1047 = 0;
+ $_etype1050 = 0;
+ $xfer += $input->readListBegin($_etype1050, $_size1047);
+ for ($_i1051 = 0; $_i1051 < $_size1047; ++$_i1051)
{
- $elem1017 = null;
- $xfer += $input->readString($elem1017);
- $this->part_vals []= $elem1017;
+ $elem1052 = null;
+ $xfer += $input->readString($elem1052);
+ $this->part_vals []= $elem1052;
}
$xfer += $input->readListEnd();
} else {
@@ -28594,9 +28726,9 @@ class ThriftHiveMetastore_get_partitions_ps_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter1018)
+ foreach ($this->part_vals as $iter1053)
{
- $xfer += $output->writeString($iter1018);
+ $xfer += $output->writeString($iter1053);
}
}
$output->writeListEnd();
@@ -28690,15 +28822,15 @@ class ThriftHiveMetastore_get_partitions_ps_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size1019 = 0;
- $_etype1022 = 0;
- $xfer += $input->readListBegin($_etype1022, $_size1019);
- for ($_i1023 = 0; $_i1023 < $_size1019; ++$_i1023)
+ $_size1054 = 0;
+ $_etype1057 = 0;
+ $xfer += $input->readListBegin($_etype1057, $_size1054);
+ for ($_i1058 = 0; $_i1058 < $_size1054; ++$_i1058)
{
- $elem1024 = null;
- $elem1024 = new \metastore\Partition();
- $xfer += $elem1024->read($input);
- $this->success []= $elem1024;
+ $elem1059 = null;
+ $elem1059 = new \metastore\Partition();
+ $xfer += $elem1059->read($input);
+ $this->success []= $elem1059;
}
$xfer += $input->readListEnd();
} else {
@@ -28742,9 +28874,9 @@ class ThriftHiveMetastore_get_partitions_ps_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter1025)
+ foreach ($this->success as $iter1060)
{
- $xfer += $iter1025->write($output);
+ $xfer += $iter1060->write($output);
}
}
$output->writeListEnd();
@@ -28891,14 +29023,14 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size1026 = 0;
- $_etype1029 = 0;
- $xfer += $input->readListBegin($_etype1029, $_size1026);
- for ($_i1030 = 0; $_i1030 < $_size1026; ++$_i1030)
+ $_size1061 = 0;
+ $_etype1064 = 0;
+ $xfer += $input->readListBegin($_etype1064, $_size1061);
+ for ($_i1065 = 0; $_i1065 < $_size1061; ++$_i1065)
{
- $elem1031 = null;
- $xfer += $input->readString($elem1031);
- $this->part_vals []= $elem1031;
+ $elem1066 = null;
+ $xfer += $input->readString($elem1066);
+ $this->part_vals []= $elem1066;
}
$xfer += $input->readListEnd();
} else {
@@ -28922,14 +29054,14 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args {
case 6:
if ($ftype == TType::LST) {
$this->group_names = array();
- $_size1032 = 0;
- $_etype1035 = 0;
- $xfer += $input->readListBegin($_etype1035, $_size1032);
- for ($_i1036 = 0; $_i1036 < $_size1032; ++$_i1036)
+ $_size1067 = 0;
+ $_etype1070 = 0;
+ $xfer += $input->readListBegin($_etype1070, $_size1067);
+ for ($_i1071 = 0; $_i1071 < $_size1067; ++$_i1071)
{
- $elem1037 = null;
- $xfer += $input->readString($elem1037);
- $this->group_names []= $elem1037;
+ $elem1072 = null;
+ $xfer += $input->readString($elem1072);
+ $this->group_names []= $elem1072;
}
$xfer += $input->readListEnd();
} else {
@@ -28967,9 +29099,9 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter1038)
+ foreach ($this->part_vals as $iter1073)
{
- $xfer += $output->writeString($iter1038);
+ $xfer += $output->writeString($iter1073);
}
}
$output->writeListEnd();
@@ -28994,9 +29126,9 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args {
{
$output->writeListBegin(TType::STRING, count($this->group_names));
{
- foreach ($this->group_names as $iter1039)
+ foreach ($this->group_names as $iter1074)
{
- $xfer += $output->writeString($iter1039);
+ $xfer += $output->writeString($iter1074);
}
}
$output->writeListEnd();
@@ -29085,15 +29217,15 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size1040 = 0;
- $_etype1043 = 0;
- $xfer += $input->readListBegin($_etype1043, $_size1040);
- for ($_i1044 = 0; $_i1044 < $_size1040; ++$_i1044)
+ $_size1075 = 0;
+ $_etype1078 = 0;
+ $xfer += $input->readListBegin($_etype1078, $_size1075);
+ for ($_i1079 = 0; $_i1079 < $_size1075; ++$_i1079)
{
- $elem1045 = null;
- $elem1045 = new \metastore\Partition();
- $xfer += $elem1045->read($input);
- $this->success []= $elem1045;
+ $elem1080 = null;
+ $elem1080 = new \metastore\Partition();
+ $xfer += $elem1080->read($input);
+ $this->success []= $elem1080;
}
$xfer += $input->readListEnd();
} else {
@@ -29137,9 +29269,9 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter1046)
+ foreach ($this->success as $iter1081)
{
- $xfer += $iter1046->write($output);
+ $xfer += $iter1081->write($output);
}
}
$output->writeListEnd();
@@ -29260,14 +29392,14 @@ class ThriftHiveMetastore_get_partition_names_ps_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size1047 = 0;
- $_etype1050 = 0;
- $xfer += $input->readListBegin($_etype1050, $_size1047);
- for ($_i1051 = 0; $_i1051 < $_size1047; ++$_i1051)
+ $_size1082 = 0;
+ $_etype1085 = 0;
+ $xfer += $input->readListBegin($_etype1085, $_size1082);
+ for ($_i1086 = 0; $_i1086 < $_size1082; ++$_i1086)
{
- $elem1052 = null;
- $xfer += $input->readString($elem1052);
- $this->part_vals []= $elem1052;
+ $elem1087 = null;
+ $xfer += $input->readString($elem1087);
+ $this->part_vals []= $elem1087;
}
$xfer += $input->readListEnd();
} else {
@@ -29312,9 +29444,9 @@ class ThriftHiveMetastore_get_partition_names_ps_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter1053)
+ foreach ($this->part_vals as $iter1088)
{
- $xfer += $output->writeString($iter1053);
+ $xfer += $output->writeString($iter1088);
}
}
$output->writeListEnd();
@@ -29407,14 +29539,14 @@ class ThriftHiveMetastore_get_partition_names_ps_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size1054 = 0;
- $_etype1057 = 0;
- $xfer += $input->readListBegin($_etype1057, $_size1054);
- for ($_i1058 = 0; $_i1058 < $_size1054; ++$_i1058)
+ $_size1089 = 0;
+ $_etype1092 = 0;
+ $xfer += $input->readListBegin($_etype1092, $_size1089);
+ for ($_i1093 = 0; $_i1093 < $_size1089; ++$_i1093)
{
- $elem1059 = null;
- $xfer += $input->readString($elem1059);
- $this->success []= $elem1059;
+ $elem1094 = null;
+ $xfer += $input->readString($elem1094);
+ $this->success []= $elem1094;
}
$xfer += $input->readListEnd();
} else {
@@ -29458,9 +29590,9 @@ class ThriftHiveMetastore_get_partition_names_ps_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter1060)
+ foreach ($this->success as $iter1095)
{
- $xfer += $output->writeString($iter1060);
+ $xfer += $output->writeString($iter1095);
}
}
$output->writeListEnd();
@@ -29703,15 +29835,15 @@ class ThriftHiveMetastore_get_partitions_by_filter_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size1061 = 0;
- $_etype1064 = 0;
- $xfer += $input->readListBegin($_etype1064, $_size1061);
- for ($_i1065 = 0; $_i1065 < $_size1061; ++$_i1065)
+ $_size1096 = 0;
+ $_etype1099 = 0;
+ $xfer += $input->readListBegin($_etype1099, $_size1096);
+ for ($_i1100 = 0; $_i1100 < $_size1096; ++$_i1100)
{
- $elem1066 = null;
- $elem1066 = new \metastore\Partition();
- $xfer += $elem1066->read($input);
- $this->success []= $elem1066;
+ $elem1101 = null;
+ $elem1101 = new \metastore\Partition();
+ $xfer += $elem1101->read($input);
+ $this->success []= $elem1101;
}
$xfer += $input->readListEnd();
} else {
@@ -29755,9 +29887,9 @@ class ThriftHiveMetastore_get_partitions_by_filter_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter1067)
+ foreach ($this->success as $iter1102)
{
- $xfer += $iter1067->write($output);
+ $xfer += $iter1102->write($output);
}
}
$output->writeListEnd();
@@ -30000,15 +30132,15 @@ class ThriftHiveMetastore_get_part_specs_by_filter_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size1068 = 0;
- $_etype1071 = 0;
- $xfer += $input->readListBegin($_etype1071, $_size1068);
- for ($_i1072 = 0; $_i1072 < $_size1068; ++$_i1072)
+ $_size1103 = 0;
+ $_etype1106 = 0;
+ $xfer += $input->readListBegin($_etype1106, $_size1103);
+ for ($_i1107 = 0; $_i1107 < $_size1103; ++$_i1107)
{
- $elem1073 = null;
- $elem1073 = new \metastore\PartitionSpec();
- $xfer += $elem1073->read($input);
- $this->success []= $elem1073;
+ $elem1108 = null;
+ $elem1108 = new \metastore\PartitionSpec();
+ $xfer += $elem1108->read($input);
+ $this->success []= $elem1108;
}
$xfer += $input->readListEnd();
} else {
@@ -30052,9 +30184,9 @@ class ThriftHiveMetastore_get_part_specs_by_filter_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter1074)
+ foreach ($this->success as $iter1109)
{
- $xfer += $iter1074->write($output);
+ $xfer += $iter1109->write($output);
}
}
$output->writeListEnd();
@@ -30620,14 +30752,14 @@ class ThriftHiveMetastore_get_partitions_by_names_args {
case 3:
if ($ftype == TType::LST) {
$this->names = array();
- $_size1075 = 0;
- $_etype1078 = 0;
- $xfer += $input->readListBegin($_etype1078, $_size1075);
- for ($_i1079 = 0; $_i1079 < $_size1075; ++$_i1079)
+ $_size1110 = 0;
+ $_etype1113 = 0;
+ $xfer += $input->readListBegin($_etype1113, $_size1110);
+ for ($_i1114 = 0; $_i1114 < $_size1110; ++$_i1114)
{
- $elem1080 = null;
- $xfer += $input->readString($elem1080);
- $this->names []= $elem1080;
+ $elem1115 = null;
+ $xfer += $input->readString($elem1115);
+ $this->names []= $elem1115;
}
$xfer += $input->readListEnd();
} else {
@@ -30665,9 +30797,9 @@ class ThriftHiveMetastore_get_partitions_by_names_args {
{
$output->writeListBegin(TType::STRING, count($this->names));
{
- foreach ($this->names as $iter1081)
+ foreach ($this->names as $iter1116)
{
- $xfer += $output->writeString($iter1081);
+ $xfer += $output->writeString($iter1116);
}
}
$output->writeListEnd();
@@ -30756,15 +30888,15 @@ class ThriftHiveMetastore_get_partitions_by_names_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size1082 = 0;
- $_etype1085 = 0;
- $xfer += $input->readListBegin($_etype1085, $_size1082);
- for ($_i1086 = 0; $_i1086 < $_size1082; ++$_i1086)
+ $_size1117 = 0;
+ $_etype1120 = 0;
+ $xfer += $input->readListBegin($_etype1120, $_size1117);
+ for ($_i1121 = 0; $_i1121 < $_size1117; ++$_i1121)
{
- $elem1087 = null;
- $elem1087 = new \metastore\Partition();
- $xfer += $elem1087->read($input);
- $this->success []= $elem1087;
+ $elem1122 = null;
+ $elem1122 = new \metastore\Partition();
+ $xfer += $elem1122->read($input);
+ $this->success []= $elem1122;
}
$xfer += $input->readListEnd();
} else {
@@ -30808,9 +30940,9 @@ class ThriftHiveMetastore_get_partitions_by_names_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter1088)
+ foreach ($this->success as $iter1123)
{
- $xfer += $iter1088->write($output);
+ $xfer += $iter1123->write($output);
}
}
$output->writeListEnd();
@@ -31149,15 +31281,15 @@ class ThriftHiveMetastore_alter_partitions_args {
case 3:
if ($ftype == TType::LST) {
$this->new_parts = array();
- $_size1089 = 0;
- $_etype1092 = 0;
- $xfer += $input->readListBegin($_etype1092, $_size1089);
- for ($_i1093 = 0; $_i1093 < $_size1089; ++$_i1093)
+ $_size1124 = 0;
+ $_etype1127 = 0;
+ $xfer += $input->readListBegin($_etype1127, $_size1124);
+ for ($_i1128 = 0; $_i1128 < $_size1124; ++$_i1128)
{
- $elem1094 = null;
- $elem1094 = new \metastore\Partition();
- $xfer += $elem1094->read($input);
- $this->new_parts []= $elem1094;
+ $elem1129 = null;
+ $elem1129 = new \metastore\Partition();
+ $xfer += $elem1129->read($input);
+ $this->new_parts []= $elem1129;
}
$xfer += $input->readListEnd();
} else {
@@ -31195,9 +31327,9 @@ class ThriftHiveMetastore_alter_partitions_args {
{
$output->writeListBegin(TType::STRUCT, count($this->new_parts));
{
- foreach ($this->new_parts as $iter1095)
+ foreach ($this->new_parts as $iter1130)
{
- $xfer += $iter1095->write($output);
+ $xfer += $iter1130->write($output);
}
}
$output->writeListEnd();
@@ -31412,15 +31544,15 @@ class ThriftHiveMetastore_alter_partitions_with_environment_context_args {
case 3:
if ($ftype == TType::LST) {
$this->new_parts = array();
- $_size1096 = 0;
- $_etype1099 = 0;
- $xfer += $input->readListBegin($_etype1099, $_size1096);
- for ($_i1100 = 0; $_i1100 < $_size1096; ++$_i1100)
+ $_size1131 = 0;
+ $_etype1134 = 0;
+ $xfer += $input->readListBegin($_etype1134, $_size1131);
+ for ($_i1135 = 0; $_i1135 < $_size1131; ++$_i1135)
{
- $elem1101 = null;
- $elem1101 = new \metastore\Partition();
- $xfer += $elem1101->read($input);
- $this->new_parts []= $elem1101;
+ $elem1136 = null;
+ $elem1136 = new \metastore\Partition();
+ $xfer += $elem1136->read($input);
+ $this->new_parts []= $elem1136;
}
$xfer += $input->readListEnd();
} else {
@@ -31466,9 +31598,9 @@ class ThriftHiveMetastore_alter_partitions_with_environment_context_args {
{
$output->writeListBegin(TType::STRUCT, count($this->new_parts));
{
- foreach ($this->new_parts as $iter1102)
+ foreach ($this->new_parts as $iter1137)
{
- $xfer += $iter1102->write($output);
+ $xfer += $iter1137->write($output);
}
}
$output->writeListEnd();
@@ -31946,14 +32078,14 @@ class ThriftHiveMetastore_rename_partition_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size1103 = 0;
- $_etype1106 = 0;
- $xfer += $input->readListBegin($_etype1106, $_size1103);
- for ($_i1107 = 0; $_i1107 < $_size1103; ++$_i1107)
+ $_size1138 = 0;
+ $_etype1141 = 0;
+ $xfer += $input->readListBegin($_etype1141, $_size1138);
+ for ($_i1142 = 0; $_i1142 < $_size1138; ++$_i1142)
{
- $elem1108 = null;
- $xfer += $input->readString($elem1108);
- $this->part_vals []= $elem1108;
+ $elem1143 = null;
+ $xfer += $input->readString($elem1143);
+ $this->part_vals []= $elem1143;
}
$xfer += $input->readListEnd();
} else {
@@ -31999,9 +32131,9 @@ class ThriftHiveMetastore_rename_partition_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter1109)
+ foreach ($this->part_vals as $iter1144)
{
- $xfer += $output->writeString($iter1109);
+ $xfer += $output->writeString($iter1144);
}
}
$output->writeListEnd();
@@ -32186,14 +32318,14 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_args {
case 1:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size1110 = 0;
- $_etype1113 = 0;
- $xfer += $input->readListBegin($_etype1113, $_size1110);
- for ($_i1114 = 0; $_i1114 < $_size1110; ++$_i1114)
+ $_size1145 = 0;
+ $_etype1148 = 0;
+ $xfer += $input->readListBegin($_etype1148, $_size1145);
+ for ($_i1149 = 0; $_i1149 < $_size1145; ++$_i1149)
{
- $elem1115 = null;
- $xfer += $input->readString($elem1115);
- $this->part_vals []= $elem1115;
+ $elem1150 = null;
+ $xfer += $input->readString($elem1150);
+ $this->part_vals []= $elem1150;
}
$xfer += $input->readListEnd();
} else {
@@ -32228,9 +32360,9 @@ class ThriftHiveMetastore_partition_name_has_valid_characters_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter1116)
+ foreach ($this->part_vals as $iter1151)
{
- $xfer += $output->writeString($iter1116);
+ $xfer += $output->writeString($iter1151);
}
}
$output->writeListEnd();
@@ -32684,14 +32816,14 @@ class ThriftHiveMetastore_partition_name_to_vals_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size1117 = 0;
- $_etype1120 = 0;
- $xfer += $input->readListBegin($_etype1120, $_size1117);
- for ($_i1121 = 0; $_i1121 < $_size1117; ++$_i1121)
+ $_size1152 = 0;
+ $_etype1155 = 0;
+ $xfer += $input->readListBegin($_etype1155, $_size1152);
+ for ($_i1156 = 0; $_i1156 < $_size1152; ++$_i1156)
{
- $elem1122 = null;
- $xfer += $input->readString($elem1122);
- $this->success []= $elem1122;
+ $elem1157 = null;
+ $xfer += $input->readString($elem1157);
+ $this->success []= $elem1157;
}
$xfer += $input->readListEnd();
} else {
@@ -32727,9 +32859,9 @@ class ThriftHiveMetastore_partition_name_to_vals_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter1123)
+ foreach ($this->success as $iter1158)
{
- $xfer += $output->writeString($iter1123);
+ $xfer += $output->writeString($iter1158);
}
}
$output->writeListEnd();
@@ -32889,17 +33021,17 @@ class ThriftHiveMetastore_partition_name_to_spec_result {
case 0:
if ($ftype == TType::MAP) {
$this->success = array();
- $_size1124 = 0;
- $_ktype1125 = 0;
- $_vtype1126 = 0;
- $xfer += $input->readMapBegin($_ktype1125, $_vtype1126, $_size1124);
- for ($_i1128 = 0; $_i1128 < $_size1124; ++$_i1128)
+ $_size1159 = 0;
+ $_ktype1160 = 0;
+ $_vtype1161 = 0;
+ $xfer += $input->readMapBegin($_ktype1160, $_vtype1161, $_size1159);
+ for ($_i1163 = 0; $_i1163 < $_size1159; ++$_i1163)
{
- $key1129 = '';
- $val1130 = '';
- $xfer += $input->readString($key1129);
- $xfer += $input->readString($val1130);
- $this->success[$key1129] = $val1130;
+ $key1164 = '';
+ $val1165 = '';
+ $xfer += $input->readString($key1164);
+ $xfer += $input->readString($val1165);
+ $this->success[$key1164] = $val1165;
}
$xfer += $input->readMapEnd();
} else {
@@ -32935,10 +33067,10 @@ class ThriftHiveMetastore_partition_name_to_spec_result {
{
$output->writeMapBegin(TType::STRING, TType::STRING, count($this->success));
{
- foreach ($this->success as $kiter1131 => $viter1132)
+ foreach ($this->success as $kiter1166 => $viter1167)
{
- $xfer += $output->writeString($kiter1131);
- $xfer += $output->writeString($viter1132);
+ $xfer += $output->writeString($kiter1166);
+ $xfer += $output->writeString($viter1167);
}
}
$output->writeMapEnd();
@@ -33058,17 +33190,17 @@ class ThriftHiveMetastore_markPartitionForEvent_args {
case 3:
if ($ftype == TType::MAP) {
$this->part_vals = array();
- $_size1133 = 0;
- $_ktype1134 = 0;
- $_vtype1135 = 0;
- $xfer += $input->readMapBegin($_ktype1134, $_vtype1135, $_size1133);
- for ($_i1137 = 0; $_i1137 < $_size1133; ++$_i1137)
+ $_size1168 = 0;
+ $_ktype1169 = 0;
+ $_vtype1170 = 0;
+ $xfer += $input->readMapBegin($_ktype1169, $_vtype1170, $_size1168);
+ for ($_i1172 = 0; $_i1172 < $_size1168; ++$_i1172)
{
- $key1138 = '';
- $val1139 = '';
- $xfer += $input->readString($key1138);
- $xfer += $input->readString($val1139);
- $this->part_vals[$key1138] = $val1139;
+ $key1173 = '';
+ $val1174 = '';
+ $xfer += $input->readString($key11
<TRUNCATED>
[12/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
index 8f04b9d..ef138e0 100644
--- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
+++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
@@ -14308,6 +14308,808 @@ void CommitTxnRequest::printTo(std::ostream& out) const {
}
+GetValidWriteIdsRequest::~GetValidWriteIdsRequest() throw() {
+}
+
+
+void GetValidWriteIdsRequest::__set_fullTableNames(const std::vector<std::string> & val) {
+ this->fullTableNames = val;
+}
+
+void GetValidWriteIdsRequest::__set_validTxnList(const std::string& val) {
+ this->validTxnList = val;
+}
+
+uint32_t GetValidWriteIdsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_fullTableNames = false;
+ bool isset_validTxnList = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->fullTableNames.clear();
+ uint32_t _size617;
+ ::apache::thrift::protocol::TType _etype620;
+ xfer += iprot->readListBegin(_etype620, _size617);
+ this->fullTableNames.resize(_size617);
+ uint32_t _i621;
+ for (_i621 = 0; _i621 < _size617; ++_i621)
+ {
+ xfer += iprot->readString(this->fullTableNames[_i621]);
+ }
+ xfer += iprot->readListEnd();
+ }
+ isset_fullTableNames = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->validTxnList);
+ isset_validTxnList = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_fullTableNames)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_validTxnList)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t GetValidWriteIdsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("GetValidWriteIdsRequest");
+
+ xfer += oprot->writeFieldBegin("fullTableNames", ::apache::thrift::protocol::T_LIST, 1);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->fullTableNames.size()));
+ std::vector<std::string> ::const_iterator _iter622;
+ for (_iter622 = this->fullTableNames.begin(); _iter622 != this->fullTableNames.end(); ++_iter622)
+ {
+ xfer += oprot->writeString((*_iter622));
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("validTxnList", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->validTxnList);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(GetValidWriteIdsRequest &a, GetValidWriteIdsRequest &b) {
+ using ::std::swap;
+ swap(a.fullTableNames, b.fullTableNames);
+ swap(a.validTxnList, b.validTxnList);
+}
+
+GetValidWriteIdsRequest::GetValidWriteIdsRequest(const GetValidWriteIdsRequest& other623) {
+ fullTableNames = other623.fullTableNames;
+ validTxnList = other623.validTxnList;
+}
+GetValidWriteIdsRequest& GetValidWriteIdsRequest::operator=(const GetValidWriteIdsRequest& other624) {
+ fullTableNames = other624.fullTableNames;
+ validTxnList = other624.validTxnList;
+ return *this;
+}
+void GetValidWriteIdsRequest::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "GetValidWriteIdsRequest(";
+ out << "fullTableNames=" << to_string(fullTableNames);
+ out << ", " << "validTxnList=" << to_string(validTxnList);
+ out << ")";
+}
+
+
+TableValidWriteIds::~TableValidWriteIds() throw() {
+}
+
+
+void TableValidWriteIds::__set_fullTableName(const std::string& val) {
+ this->fullTableName = val;
+}
+
+void TableValidWriteIds::__set_writeIdHighWaterMark(const int64_t val) {
+ this->writeIdHighWaterMark = val;
+}
+
+void TableValidWriteIds::__set_invalidWriteIds(const std::vector<int64_t> & val) {
+ this->invalidWriteIds = val;
+}
+
+void TableValidWriteIds::__set_minOpenWriteId(const int64_t val) {
+ this->minOpenWriteId = val;
+__isset.minOpenWriteId = true;
+}
+
+void TableValidWriteIds::__set_abortedBits(const std::string& val) {
+ this->abortedBits = val;
+}
+
+uint32_t TableValidWriteIds::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_fullTableName = false;
+ bool isset_writeIdHighWaterMark = false;
+ bool isset_invalidWriteIds = false;
+ bool isset_abortedBits = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->fullTableName);
+ isset_fullTableName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->writeIdHighWaterMark);
+ isset_writeIdHighWaterMark = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->invalidWriteIds.clear();
+ uint32_t _size625;
+ ::apache::thrift::protocol::TType _etype628;
+ xfer += iprot->readListBegin(_etype628, _size625);
+ this->invalidWriteIds.resize(_size625);
+ uint32_t _i629;
+ for (_i629 = 0; _i629 < _size625; ++_i629)
+ {
+ xfer += iprot->readI64(this->invalidWriteIds[_i629]);
+ }
+ xfer += iprot->readListEnd();
+ }
+ isset_invalidWriteIds = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->minOpenWriteId);
+ this->__isset.minOpenWriteId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readBinary(this->abortedBits);
+ isset_abortedBits = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_fullTableName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_writeIdHighWaterMark)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_invalidWriteIds)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_abortedBits)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t TableValidWriteIds::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("TableValidWriteIds");
+
+ xfer += oprot->writeFieldBegin("fullTableName", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->fullTableName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("writeIdHighWaterMark", ::apache::thrift::protocol::T_I64, 2);
+ xfer += oprot->writeI64(this->writeIdHighWaterMark);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("invalidWriteIds", ::apache::thrift::protocol::T_LIST, 3);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->invalidWriteIds.size()));
+ std::vector<int64_t> ::const_iterator _iter630;
+ for (_iter630 = this->invalidWriteIds.begin(); _iter630 != this->invalidWriteIds.end(); ++_iter630)
+ {
+ xfer += oprot->writeI64((*_iter630));
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.minOpenWriteId) {
+ xfer += oprot->writeFieldBegin("minOpenWriteId", ::apache::thrift::protocol::T_I64, 4);
+ xfer += oprot->writeI64(this->minOpenWriteId);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldBegin("abortedBits", ::apache::thrift::protocol::T_STRING, 5);
+ xfer += oprot->writeBinary(this->abortedBits);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(TableValidWriteIds &a, TableValidWriteIds &b) {
+ using ::std::swap;
+ swap(a.fullTableName, b.fullTableName);
+ swap(a.writeIdHighWaterMark, b.writeIdHighWaterMark);
+ swap(a.invalidWriteIds, b.invalidWriteIds);
+ swap(a.minOpenWriteId, b.minOpenWriteId);
+ swap(a.abortedBits, b.abortedBits);
+ swap(a.__isset, b.__isset);
+}
+
+TableValidWriteIds::TableValidWriteIds(const TableValidWriteIds& other631) {
+ fullTableName = other631.fullTableName;
+ writeIdHighWaterMark = other631.writeIdHighWaterMark;
+ invalidWriteIds = other631.invalidWriteIds;
+ minOpenWriteId = other631.minOpenWriteId;
+ abortedBits = other631.abortedBits;
+ __isset = other631.__isset;
+}
+TableValidWriteIds& TableValidWriteIds::operator=(const TableValidWriteIds& other632) {
+ fullTableName = other632.fullTableName;
+ writeIdHighWaterMark = other632.writeIdHighWaterMark;
+ invalidWriteIds = other632.invalidWriteIds;
+ minOpenWriteId = other632.minOpenWriteId;
+ abortedBits = other632.abortedBits;
+ __isset = other632.__isset;
+ return *this;
+}
+void TableValidWriteIds::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "TableValidWriteIds(";
+ out << "fullTableName=" << to_string(fullTableName);
+ out << ", " << "writeIdHighWaterMark=" << to_string(writeIdHighWaterMark);
+ out << ", " << "invalidWriteIds=" << to_string(invalidWriteIds);
+ out << ", " << "minOpenWriteId="; (__isset.minOpenWriteId ? (out << to_string(minOpenWriteId)) : (out << "<null>"));
+ out << ", " << "abortedBits=" << to_string(abortedBits);
+ out << ")";
+}
+
+
+GetValidWriteIdsResponse::~GetValidWriteIdsResponse() throw() {
+}
+
+
+void GetValidWriteIdsResponse::__set_tblValidWriteIds(const std::vector<TableValidWriteIds> & val) {
+ this->tblValidWriteIds = val;
+}
+
+uint32_t GetValidWriteIdsResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_tblValidWriteIds = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->tblValidWriteIds.clear();
+ uint32_t _size633;
+ ::apache::thrift::protocol::TType _etype636;
+ xfer += iprot->readListBegin(_etype636, _size633);
+ this->tblValidWriteIds.resize(_size633);
+ uint32_t _i637;
+ for (_i637 = 0; _i637 < _size633; ++_i637)
+ {
+ xfer += this->tblValidWriteIds[_i637].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ isset_tblValidWriteIds = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_tblValidWriteIds)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t GetValidWriteIdsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("GetValidWriteIdsResponse");
+
+ xfer += oprot->writeFieldBegin("tblValidWriteIds", ::apache::thrift::protocol::T_LIST, 1);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->tblValidWriteIds.size()));
+ std::vector<TableValidWriteIds> ::const_iterator _iter638;
+ for (_iter638 = this->tblValidWriteIds.begin(); _iter638 != this->tblValidWriteIds.end(); ++_iter638)
+ {
+ xfer += (*_iter638).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(GetValidWriteIdsResponse &a, GetValidWriteIdsResponse &b) {
+ using ::std::swap;
+ swap(a.tblValidWriteIds, b.tblValidWriteIds);
+}
+
+GetValidWriteIdsResponse::GetValidWriteIdsResponse(const GetValidWriteIdsResponse& other639) {
+ tblValidWriteIds = other639.tblValidWriteIds;
+}
+GetValidWriteIdsResponse& GetValidWriteIdsResponse::operator=(const GetValidWriteIdsResponse& other640) {
+ tblValidWriteIds = other640.tblValidWriteIds;
+ return *this;
+}
+void GetValidWriteIdsResponse::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "GetValidWriteIdsResponse(";
+ out << "tblValidWriteIds=" << to_string(tblValidWriteIds);
+ out << ")";
+}
+
+
+AllocateTableWriteIdsRequest::~AllocateTableWriteIdsRequest() throw() {
+}
+
+
+void AllocateTableWriteIdsRequest::__set_txnIds(const std::vector<int64_t> & val) {
+ this->txnIds = val;
+}
+
+void AllocateTableWriteIdsRequest::__set_dbName(const std::string& val) {
+ this->dbName = val;
+}
+
+void AllocateTableWriteIdsRequest::__set_tableName(const std::string& val) {
+ this->tableName = val;
+}
+
+uint32_t AllocateTableWriteIdsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_txnIds = false;
+ bool isset_dbName = false;
+ bool isset_tableName = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->txnIds.clear();
+ uint32_t _size641;
+ ::apache::thrift::protocol::TType _etype644;
+ xfer += iprot->readListBegin(_etype644, _size641);
+ this->txnIds.resize(_size641);
+ uint32_t _i645;
+ for (_i645 = 0; _i645 < _size641; ++_i645)
+ {
+ xfer += iprot->readI64(this->txnIds[_i645]);
+ }
+ xfer += iprot->readListEnd();
+ }
+ isset_txnIds = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->dbName);
+ isset_dbName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->tableName);
+ isset_tableName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_txnIds)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_dbName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_tableName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t AllocateTableWriteIdsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("AllocateTableWriteIdsRequest");
+
+ xfer += oprot->writeFieldBegin("txnIds", ::apache::thrift::protocol::T_LIST, 1);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->txnIds.size()));
+ std::vector<int64_t> ::const_iterator _iter646;
+ for (_iter646 = this->txnIds.begin(); _iter646 != this->txnIds.end(); ++_iter646)
+ {
+ xfer += oprot->writeI64((*_iter646));
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->dbName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->tableName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(AllocateTableWriteIdsRequest &a, AllocateTableWriteIdsRequest &b) {
+ using ::std::swap;
+ swap(a.txnIds, b.txnIds);
+ swap(a.dbName, b.dbName);
+ swap(a.tableName, b.tableName);
+}
+
+AllocateTableWriteIdsRequest::AllocateTableWriteIdsRequest(const AllocateTableWriteIdsRequest& other647) {
+ txnIds = other647.txnIds;
+ dbName = other647.dbName;
+ tableName = other647.tableName;
+}
+AllocateTableWriteIdsRequest& AllocateTableWriteIdsRequest::operator=(const AllocateTableWriteIdsRequest& other648) {
+ txnIds = other648.txnIds;
+ dbName = other648.dbName;
+ tableName = other648.tableName;
+ return *this;
+}
+void AllocateTableWriteIdsRequest::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "AllocateTableWriteIdsRequest(";
+ out << "txnIds=" << to_string(txnIds);
+ out << ", " << "dbName=" << to_string(dbName);
+ out << ", " << "tableName=" << to_string(tableName);
+ out << ")";
+}
+
+
+TxnToWriteId::~TxnToWriteId() throw() {
+}
+
+
+void TxnToWriteId::__set_txnId(const int64_t val) {
+ this->txnId = val;
+}
+
+void TxnToWriteId::__set_writeId(const int64_t val) {
+ this->writeId = val;
+}
+
+uint32_t TxnToWriteId::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_txnId = false;
+ bool isset_writeId = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->txnId);
+ isset_txnId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->writeId);
+ isset_writeId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_txnId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_writeId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t TxnToWriteId::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("TxnToWriteId");
+
+ xfer += oprot->writeFieldBegin("txnId", ::apache::thrift::protocol::T_I64, 1);
+ xfer += oprot->writeI64(this->txnId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("writeId", ::apache::thrift::protocol::T_I64, 2);
+ xfer += oprot->writeI64(this->writeId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(TxnToWriteId &a, TxnToWriteId &b) {
+ using ::std::swap;
+ swap(a.txnId, b.txnId);
+ swap(a.writeId, b.writeId);
+}
+
+TxnToWriteId::TxnToWriteId(const TxnToWriteId& other649) {
+ txnId = other649.txnId;
+ writeId = other649.writeId;
+}
+TxnToWriteId& TxnToWriteId::operator=(const TxnToWriteId& other650) {
+ txnId = other650.txnId;
+ writeId = other650.writeId;
+ return *this;
+}
+void TxnToWriteId::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "TxnToWriteId(";
+ out << "txnId=" << to_string(txnId);
+ out << ", " << "writeId=" << to_string(writeId);
+ out << ")";
+}
+
+
+AllocateTableWriteIdsResponse::~AllocateTableWriteIdsResponse() throw() {
+}
+
+
+void AllocateTableWriteIdsResponse::__set_txnToWriteIds(const std::vector<TxnToWriteId> & val) {
+ this->txnToWriteIds = val;
+}
+
+uint32_t AllocateTableWriteIdsResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_txnToWriteIds = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->txnToWriteIds.clear();
+ uint32_t _size651;
+ ::apache::thrift::protocol::TType _etype654;
+ xfer += iprot->readListBegin(_etype654, _size651);
+ this->txnToWriteIds.resize(_size651);
+ uint32_t _i655;
+ for (_i655 = 0; _i655 < _size651; ++_i655)
+ {
+ xfer += this->txnToWriteIds[_i655].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ isset_txnToWriteIds = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_txnToWriteIds)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t AllocateTableWriteIdsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("AllocateTableWriteIdsResponse");
+
+ xfer += oprot->writeFieldBegin("txnToWriteIds", ::apache::thrift::protocol::T_LIST, 1);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->txnToWriteIds.size()));
+ std::vector<TxnToWriteId> ::const_iterator _iter656;
+ for (_iter656 = this->txnToWriteIds.begin(); _iter656 != this->txnToWriteIds.end(); ++_iter656)
+ {
+ xfer += (*_iter656).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(AllocateTableWriteIdsResponse &a, AllocateTableWriteIdsResponse &b) {
+ using ::std::swap;
+ swap(a.txnToWriteIds, b.txnToWriteIds);
+}
+
+AllocateTableWriteIdsResponse::AllocateTableWriteIdsResponse(const AllocateTableWriteIdsResponse& other657) {
+ txnToWriteIds = other657.txnToWriteIds;
+}
+AllocateTableWriteIdsResponse& AllocateTableWriteIdsResponse::operator=(const AllocateTableWriteIdsResponse& other658) {
+ txnToWriteIds = other658.txnToWriteIds;
+ return *this;
+}
+void AllocateTableWriteIdsResponse::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "AllocateTableWriteIdsResponse(";
+ out << "txnToWriteIds=" << to_string(txnToWriteIds);
+ out << ")";
+}
+
+
LockComponent::~LockComponent() throw() {
}
@@ -14375,9 +15177,9 @@ uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast617;
- xfer += iprot->readI32(ecast617);
- this->type = (LockType::type)ecast617;
+ int32_t ecast659;
+ xfer += iprot->readI32(ecast659);
+ this->type = (LockType::type)ecast659;
isset_type = true;
} else {
xfer += iprot->skip(ftype);
@@ -14385,9 +15187,9 @@ uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast618;
- xfer += iprot->readI32(ecast618);
- this->level = (LockLevel::type)ecast618;
+ int32_t ecast660;
+ xfer += iprot->readI32(ecast660);
+ this->level = (LockLevel::type)ecast660;
isset_level = true;
} else {
xfer += iprot->skip(ftype);
@@ -14419,9 +15221,9 @@ uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast619;
- xfer += iprot->readI32(ecast619);
- this->operationType = (DataOperationType::type)ecast619;
+ int32_t ecast661;
+ xfer += iprot->readI32(ecast661);
+ this->operationType = (DataOperationType::type)ecast661;
this->__isset.operationType = true;
} else {
xfer += iprot->skip(ftype);
@@ -14521,27 +15323,27 @@ void swap(LockComponent &a, LockComponent &b) {
swap(a.__isset, b.__isset);
}
-LockComponent::LockComponent(const LockComponent& other620) {
- type = other620.type;
- level = other620.level;
- dbname = other620.dbname;
- tablename = other620.tablename;
- partitionname = other620.partitionname;
- operationType = other620.operationType;
- isAcid = other620.isAcid;
- isDynamicPartitionWrite = other620.isDynamicPartitionWrite;
- __isset = other620.__isset;
-}
-LockComponent& LockComponent::operator=(const LockComponent& other621) {
- type = other621.type;
- level = other621.level;
- dbname = other621.dbname;
- tablename = other621.tablename;
- partitionname = other621.partitionname;
- operationType = other621.operationType;
- isAcid = other621.isAcid;
- isDynamicPartitionWrite = other621.isDynamicPartitionWrite;
- __isset = other621.__isset;
+LockComponent::LockComponent(const LockComponent& other662) {
+ type = other662.type;
+ level = other662.level;
+ dbname = other662.dbname;
+ tablename = other662.tablename;
+ partitionname = other662.partitionname;
+ operationType = other662.operationType;
+ isAcid = other662.isAcid;
+ isDynamicPartitionWrite = other662.isDynamicPartitionWrite;
+ __isset = other662.__isset;
+}
+LockComponent& LockComponent::operator=(const LockComponent& other663) {
+ type = other663.type;
+ level = other663.level;
+ dbname = other663.dbname;
+ tablename = other663.tablename;
+ partitionname = other663.partitionname;
+ operationType = other663.operationType;
+ isAcid = other663.isAcid;
+ isDynamicPartitionWrite = other663.isDynamicPartitionWrite;
+ __isset = other663.__isset;
return *this;
}
void LockComponent::printTo(std::ostream& out) const {
@@ -14613,14 +15415,14 @@ uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->component.clear();
- uint32_t _size622;
- ::apache::thrift::protocol::TType _etype625;
- xfer += iprot->readListBegin(_etype625, _size622);
- this->component.resize(_size622);
- uint32_t _i626;
- for (_i626 = 0; _i626 < _size622; ++_i626)
+ uint32_t _size664;
+ ::apache::thrift::protocol::TType _etype667;
+ xfer += iprot->readListBegin(_etype667, _size664);
+ this->component.resize(_size664);
+ uint32_t _i668;
+ for (_i668 = 0; _i668 < _size664; ++_i668)
{
- xfer += this->component[_i626].read(iprot);
+ xfer += this->component[_i668].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -14687,10 +15489,10 @@ uint32_t LockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const
xfer += oprot->writeFieldBegin("component", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->component.size()));
- std::vector<LockComponent> ::const_iterator _iter627;
- for (_iter627 = this->component.begin(); _iter627 != this->component.end(); ++_iter627)
+ std::vector<LockComponent> ::const_iterator _iter669;
+ for (_iter669 = this->component.begin(); _iter669 != this->component.end(); ++_iter669)
{
- xfer += (*_iter627).write(oprot);
+ xfer += (*_iter669).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -14729,21 +15531,21 @@ void swap(LockRequest &a, LockRequest &b) {
swap(a.__isset, b.__isset);
}
-LockRequest::LockRequest(const LockRequest& other628) {
- component = other628.component;
- txnid = other628.txnid;
- user = other628.user;
- hostname = other628.hostname;
- agentInfo = other628.agentInfo;
- __isset = other628.__isset;
-}
-LockRequest& LockRequest::operator=(const LockRequest& other629) {
- component = other629.component;
- txnid = other629.txnid;
- user = other629.user;
- hostname = other629.hostname;
- agentInfo = other629.agentInfo;
- __isset = other629.__isset;
+LockRequest::LockRequest(const LockRequest& other670) {
+ component = other670.component;
+ txnid = other670.txnid;
+ user = other670.user;
+ hostname = other670.hostname;
+ agentInfo = other670.agentInfo;
+ __isset = other670.__isset;
+}
+LockRequest& LockRequest::operator=(const LockRequest& other671) {
+ component = other671.component;
+ txnid = other671.txnid;
+ user = other671.user;
+ hostname = other671.hostname;
+ agentInfo = other671.agentInfo;
+ __isset = other671.__isset;
return *this;
}
void LockRequest::printTo(std::ostream& out) const {
@@ -14803,9 +15605,9 @@ uint32_t LockResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast630;
- xfer += iprot->readI32(ecast630);
- this->state = (LockState::type)ecast630;
+ int32_t ecast672;
+ xfer += iprot->readI32(ecast672);
+ this->state = (LockState::type)ecast672;
isset_state = true;
} else {
xfer += iprot->skip(ftype);
@@ -14851,13 +15653,13 @@ void swap(LockResponse &a, LockResponse &b) {
swap(a.state, b.state);
}
-LockResponse::LockResponse(const LockResponse& other631) {
- lockid = other631.lockid;
- state = other631.state;
+LockResponse::LockResponse(const LockResponse& other673) {
+ lockid = other673.lockid;
+ state = other673.state;
}
-LockResponse& LockResponse::operator=(const LockResponse& other632) {
- lockid = other632.lockid;
- state = other632.state;
+LockResponse& LockResponse::operator=(const LockResponse& other674) {
+ lockid = other674.lockid;
+ state = other674.state;
return *this;
}
void LockResponse::printTo(std::ostream& out) const {
@@ -14979,17 +15781,17 @@ void swap(CheckLockRequest &a, CheckLockRequest &b) {
swap(a.__isset, b.__isset);
}
-CheckLockRequest::CheckLockRequest(const CheckLockRequest& other633) {
- lockid = other633.lockid;
- txnid = other633.txnid;
- elapsed_ms = other633.elapsed_ms;
- __isset = other633.__isset;
+CheckLockRequest::CheckLockRequest(const CheckLockRequest& other675) {
+ lockid = other675.lockid;
+ txnid = other675.txnid;
+ elapsed_ms = other675.elapsed_ms;
+ __isset = other675.__isset;
}
-CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other634) {
- lockid = other634.lockid;
- txnid = other634.txnid;
- elapsed_ms = other634.elapsed_ms;
- __isset = other634.__isset;
+CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other676) {
+ lockid = other676.lockid;
+ txnid = other676.txnid;
+ elapsed_ms = other676.elapsed_ms;
+ __isset = other676.__isset;
return *this;
}
void CheckLockRequest::printTo(std::ostream& out) const {
@@ -15073,11 +15875,11 @@ void swap(UnlockRequest &a, UnlockRequest &b) {
swap(a.lockid, b.lockid);
}
-UnlockRequest::UnlockRequest(const UnlockRequest& other635) {
- lockid = other635.lockid;
+UnlockRequest::UnlockRequest(const UnlockRequest& other677) {
+ lockid = other677.lockid;
}
-UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other636) {
- lockid = other636.lockid;
+UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other678) {
+ lockid = other678.lockid;
return *this;
}
void UnlockRequest::printTo(std::ostream& out) const {
@@ -15216,19 +16018,19 @@ void swap(ShowLocksRequest &a, ShowLocksRequest &b) {
swap(a.__isset, b.__isset);
}
-ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other637) {
- dbname = other637.dbname;
- tablename = other637.tablename;
- partname = other637.partname;
- isExtended = other637.isExtended;
- __isset = other637.__isset;
+ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other679) {
+ dbname = other679.dbname;
+ tablename = other679.tablename;
+ partname = other679.partname;
+ isExtended = other679.isExtended;
+ __isset = other679.__isset;
}
-ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other638) {
- dbname = other638.dbname;
- tablename = other638.tablename;
- partname = other638.partname;
- isExtended = other638.isExtended;
- __isset = other638.__isset;
+ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other680) {
+ dbname = other680.dbname;
+ tablename = other680.tablename;
+ partname = other680.partname;
+ isExtended = other680.isExtended;
+ __isset = other680.__isset;
return *this;
}
void ShowLocksRequest::printTo(std::ostream& out) const {
@@ -15381,9 +16183,9 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast639;
- xfer += iprot->readI32(ecast639);
- this->state = (LockState::type)ecast639;
+ int32_t ecast681;
+ xfer += iprot->readI32(ecast681);
+ this->state = (LockState::type)ecast681;
isset_state = true;
} else {
xfer += iprot->skip(ftype);
@@ -15391,9 +16193,9 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast640;
- xfer += iprot->readI32(ecast640);
- this->type = (LockType::type)ecast640;
+ int32_t ecast682;
+ xfer += iprot->readI32(ecast682);
+ this->type = (LockType::type)ecast682;
isset_type = true;
} else {
xfer += iprot->skip(ftype);
@@ -15609,43 +16411,43 @@ void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b) {
swap(a.__isset, b.__isset);
}
-ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other641) {
- lockid = other641.lockid;
- dbname = other641.dbname;
- tablename = other641.tablename;
- partname = other641.partname;
- state = other641.state;
- type = other641.type;
- txnid = other641.txnid;
- lastheartbeat = other641.lastheartbeat;
- acquiredat = other641.acquiredat;
- user = other641.user;
- hostname = other641.hostname;
- heartbeatCount = other641.heartbeatCount;
- agentInfo = other641.agentInfo;
- blockedByExtId = other641.blockedByExtId;
- blockedByIntId = other641.blockedByIntId;
- lockIdInternal = other641.lockIdInternal;
- __isset = other641.__isset;
-}
-ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other642) {
- lockid = other642.lockid;
- dbname = other642.dbname;
- tablename = other642.tablename;
- partname = other642.partname;
- state = other642.state;
- type = other642.type;
- txnid = other642.txnid;
- lastheartbeat = other642.lastheartbeat;
- acquiredat = other642.acquiredat;
- user = other642.user;
- hostname = other642.hostname;
- heartbeatCount = other642.heartbeatCount;
- agentInfo = other642.agentInfo;
- blockedByExtId = other642.blockedByExtId;
- blockedByIntId = other642.blockedByIntId;
- lockIdInternal = other642.lockIdInternal;
- __isset = other642.__isset;
+ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other683) {
+ lockid = other683.lockid;
+ dbname = other683.dbname;
+ tablename = other683.tablename;
+ partname = other683.partname;
+ state = other683.state;
+ type = other683.type;
+ txnid = other683.txnid;
+ lastheartbeat = other683.lastheartbeat;
+ acquiredat = other683.acquiredat;
+ user = other683.user;
+ hostname = other683.hostname;
+ heartbeatCount = other683.heartbeatCount;
+ agentInfo = other683.agentInfo;
+ blockedByExtId = other683.blockedByExtId;
+ blockedByIntId = other683.blockedByIntId;
+ lockIdInternal = other683.lockIdInternal;
+ __isset = other683.__isset;
+}
+ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other684) {
+ lockid = other684.lockid;
+ dbname = other684.dbname;
+ tablename = other684.tablename;
+ partname = other684.partname;
+ state = other684.state;
+ type = other684.type;
+ txnid = other684.txnid;
+ lastheartbeat = other684.lastheartbeat;
+ acquiredat = other684.acquiredat;
+ user = other684.user;
+ hostname = other684.hostname;
+ heartbeatCount = other684.heartbeatCount;
+ agentInfo = other684.agentInfo;
+ blockedByExtId = other684.blockedByExtId;
+ blockedByIntId = other684.blockedByIntId;
+ lockIdInternal = other684.lockIdInternal;
+ __isset = other684.__isset;
return *this;
}
void ShowLocksResponseElement::printTo(std::ostream& out) const {
@@ -15704,14 +16506,14 @@ uint32_t ShowLocksResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->locks.clear();
- uint32_t _size643;
- ::apache::thrift::protocol::TType _etype646;
- xfer += iprot->readListBegin(_etype646, _size643);
- this->locks.resize(_size643);
- uint32_t _i647;
- for (_i647 = 0; _i647 < _size643; ++_i647)
+ uint32_t _size685;
+ ::apache::thrift::protocol::TType _etype688;
+ xfer += iprot->readListBegin(_etype688, _size685);
+ this->locks.resize(_size685);
+ uint32_t _i689;
+ for (_i689 = 0; _i689 < _size685; ++_i689)
{
- xfer += this->locks[_i647].read(iprot);
+ xfer += this->locks[_i689].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -15740,10 +16542,10 @@ uint32_t ShowLocksResponse::write(::apache::thrift::protocol::TProtocol* oprot)
xfer += oprot->writeFieldBegin("locks", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->locks.size()));
- std::vector<ShowLocksResponseElement> ::const_iterator _iter648;
- for (_iter648 = this->locks.begin(); _iter648 != this->locks.end(); ++_iter648)
+ std::vector<ShowLocksResponseElement> ::const_iterator _iter690;
+ for (_iter690 = this->locks.begin(); _iter690 != this->locks.end(); ++_iter690)
{
- xfer += (*_iter648).write(oprot);
+ xfer += (*_iter690).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -15760,13 +16562,13 @@ void swap(ShowLocksResponse &a, ShowLocksResponse &b) {
swap(a.__isset, b.__isset);
}
-ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other649) {
- locks = other649.locks;
- __isset = other649.__isset;
+ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other691) {
+ locks = other691.locks;
+ __isset = other691.__isset;
}
-ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other650) {
- locks = other650.locks;
- __isset = other650.__isset;
+ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other692) {
+ locks = other692.locks;
+ __isset = other692.__isset;
return *this;
}
void ShowLocksResponse::printTo(std::ostream& out) const {
@@ -15867,15 +16669,15 @@ void swap(HeartbeatRequest &a, HeartbeatRequest &b) {
swap(a.__isset, b.__isset);
}
-HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other651) {
- lockid = other651.lockid;
- txnid = other651.txnid;
- __isset = other651.__isset;
+HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other693) {
+ lockid = other693.lockid;
+ txnid = other693.txnid;
+ __isset = other693.__isset;
}
-HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other652) {
- lockid = other652.lockid;
- txnid = other652.txnid;
- __isset = other652.__isset;
+HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other694) {
+ lockid = other694.lockid;
+ txnid = other694.txnid;
+ __isset = other694.__isset;
return *this;
}
void HeartbeatRequest::printTo(std::ostream& out) const {
@@ -15978,13 +16780,13 @@ void swap(HeartbeatTxnRangeRequest &a, HeartbeatTxnRangeRequest &b) {
swap(a.max, b.max);
}
-HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other653) {
- min = other653.min;
- max = other653.max;
+HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other695) {
+ min = other695.min;
+ max = other695.max;
}
-HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other654) {
- min = other654.min;
- max = other654.max;
+HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other696) {
+ min = other696.min;
+ max = other696.max;
return *this;
}
void HeartbeatTxnRangeRequest::printTo(std::ostream& out) const {
@@ -16035,15 +16837,15 @@ uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->aborted.clear();
- uint32_t _size655;
- ::apache::thrift::protocol::TType _etype658;
- xfer += iprot->readSetBegin(_etype658, _size655);
- uint32_t _i659;
- for (_i659 = 0; _i659 < _size655; ++_i659)
+ uint32_t _size697;
+ ::apache::thrift::protocol::TType _etype700;
+ xfer += iprot->readSetBegin(_etype700, _size697);
+ uint32_t _i701;
+ for (_i701 = 0; _i701 < _size697; ++_i701)
{
- int64_t _elem660;
- xfer += iprot->readI64(_elem660);
- this->aborted.insert(_elem660);
+ int64_t _elem702;
+ xfer += iprot->readI64(_elem702);
+ this->aborted.insert(_elem702);
}
xfer += iprot->readSetEnd();
}
@@ -16056,15 +16858,15 @@ uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->nosuch.clear();
- uint32_t _size661;
- ::apache::thrift::protocol::TType _etype664;
- xfer += iprot->readSetBegin(_etype664, _size661);
- uint32_t _i665;
- for (_i665 = 0; _i665 < _size661; ++_i665)
+ uint32_t _size703;
+ ::apache::thrift::protocol::TType _etype706;
+ xfer += iprot->readSetBegin(_etype706, _size703);
+ uint32_t _i707;
+ for (_i707 = 0; _i707 < _size703; ++_i707)
{
- int64_t _elem666;
- xfer += iprot->readI64(_elem666);
- this->nosuch.insert(_elem666);
+ int64_t _elem708;
+ xfer += iprot->readI64(_elem708);
+ this->nosuch.insert(_elem708);
}
xfer += iprot->readSetEnd();
}
@@ -16097,10 +16899,10 @@ uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol*
xfer += oprot->writeFieldBegin("aborted", ::apache::thrift::protocol::T_SET, 1);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->aborted.size()));
- std::set<int64_t> ::const_iterator _iter667;
- for (_iter667 = this->aborted.begin(); _iter667 != this->aborted.end(); ++_iter667)
+ std::set<int64_t> ::const_iterator _iter709;
+ for (_iter709 = this->aborted.begin(); _iter709 != this->aborted.end(); ++_iter709)
{
- xfer += oprot->writeI64((*_iter667));
+ xfer += oprot->writeI64((*_iter709));
}
xfer += oprot->writeSetEnd();
}
@@ -16109,10 +16911,10 @@ uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol*
xfer += oprot->writeFieldBegin("nosuch", ::apache::thrift::protocol::T_SET, 2);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->nosuch.size()));
- std::set<int64_t> ::const_iterator _iter668;
- for (_iter668 = this->nosuch.begin(); _iter668 != this->nosuch.end(); ++_iter668)
+ std::set<int64_t> ::const_iterator _iter710;
+ for (_iter710 = this->nosuch.begin(); _iter710 != this->nosuch.end(); ++_iter710)
{
- xfer += oprot->writeI64((*_iter668));
+ xfer += oprot->writeI64((*_iter710));
}
xfer += oprot->writeSetEnd();
}
@@ -16129,13 +16931,13 @@ void swap(HeartbeatTxnRangeResponse &a, HeartbeatTxnRangeResponse &b) {
swap(a.nosuch, b.nosuch);
}
-HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other669) {
- aborted = other669.aborted;
- nosuch = other669.nosuch;
+HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other711) {
+ aborted = other711.aborted;
+ nosuch = other711.nosuch;
}
-HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other670) {
- aborted = other670.aborted;
- nosuch = other670.nosuch;
+HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other712) {
+ aborted = other712.aborted;
+ nosuch = other712.nosuch;
return *this;
}
void HeartbeatTxnRangeResponse::printTo(std::ostream& out) const {
@@ -16228,9 +17030,9 @@ uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast671;
- xfer += iprot->readI32(ecast671);
- this->type = (CompactionType::type)ecast671;
+ int32_t ecast713;
+ xfer += iprot->readI32(ecast713);
+ this->type = (CompactionType::type)ecast713;
isset_type = true;
} else {
xfer += iprot->skip(ftype);
@@ -16248,17 +17050,17 @@ uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->properties.clear();
- uint32_t _size672;
- ::apache::thrift::protocol::TType _ktype673;
- ::apache::thrift::protocol::TType _vtype674;
- xfer += iprot->readMapBegin(_ktype673, _vtype674, _size672);
- uint32_t _i676;
- for (_i676 = 0; _i676 < _size672; ++_i676)
+ uint32_t _size714;
+ ::apache::thrift::protocol::TType _ktype715;
+ ::apache::thrift::protocol::TType _vtype716;
+ xfer += iprot->readMapBegin(_ktype715, _vtype716, _size714);
+ uint32_t _i718;
+ for (_i718 = 0; _i718 < _size714; ++_i718)
{
- std::string _key677;
- xfer += iprot->readString(_key677);
- std::string& _val678 = this->properties[_key677];
- xfer += iprot->readString(_val678);
+ std::string _key719;
+ xfer += iprot->readString(_key719);
+ std::string& _val720 = this->properties[_key719];
+ xfer += iprot->readString(_val720);
}
xfer += iprot->readMapEnd();
}
@@ -16316,11 +17118,11 @@ uint32_t CompactionRequest::write(::apache::thrift::protocol::TProtocol* oprot)
xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 6);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->properties.size()));
- std::map<std::string, std::string> ::const_iterator _iter679;
- for (_iter679 = this->properties.begin(); _iter679 != this->properties.end(); ++_iter679)
+ std::map<std::string, std::string> ::const_iterator _iter721;
+ for (_iter721 = this->properties.begin(); _iter721 != this->properties.end(); ++_iter721)
{
- xfer += oprot->writeString(_iter679->first);
- xfer += oprot->writeString(_iter679->second);
+ xfer += oprot->writeString(_iter721->first);
+ xfer += oprot->writeString(_iter721->second);
}
xfer += oprot->writeMapEnd();
}
@@ -16342,23 +17144,23 @@ void swap(CompactionRequest &a, CompactionRequest &b) {
swap(a.__isset, b.__isset);
}
-CompactionRequest::CompactionRequest(const CompactionRequest& other680) {
- dbname = other680.dbname;
- tablename = other680.tablename;
- partitionname = other680.partitionname;
- type = other680.type;
- runas = other680.runas;
- properties = other680.properties;
- __isset = other680.__isset;
-}
-CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other681) {
- dbname = other681.dbname;
- tablename = other681.tablename;
- partitionname = other681.partitionname;
- type = other681.type;
- runas = other681.runas;
- properties = other681.properties;
- __isset = other681.__isset;
+CompactionRequest::CompactionRequest(const CompactionRequest& other722) {
+ dbname = other722.dbname;
+ tablename = other722.tablename;
+ partitionname = other722.partitionname;
+ type = other722.type;
+ runas = other722.runas;
+ properties = other722.properties;
+ __isset = other722.__isset;
+}
+CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other723) {
+ dbname = other723.dbname;
+ tablename = other723.tablename;
+ partitionname = other723.partitionname;
+ type = other723.type;
+ runas = other723.runas;
+ properties = other723.properties;
+ __isset = other723.__isset;
return *this;
}
void CompactionRequest::printTo(std::ostream& out) const {
@@ -16485,15 +17287,15 @@ void swap(CompactionResponse &a, CompactionResponse &b) {
swap(a.accepted, b.accepted);
}
-CompactionResponse::CompactionResponse(const CompactionResponse& other682) {
- id = other682.id;
- state = other682.state;
- accepted = other682.accepted;
+CompactionResponse::CompactionResponse(const CompactionResponse& other724) {
+ id = other724.id;
+ state = other724.state;
+ accepted = other724.accepted;
}
-CompactionResponse& CompactionResponse::operator=(const CompactionResponse& other683) {
- id = other683.id;
- state = other683.state;
- accepted = other683.accepted;
+CompactionResponse& CompactionResponse::operator=(const CompactionResponse& other725) {
+ id = other725.id;
+ state = other725.state;
+ accepted = other725.accepted;
return *this;
}
void CompactionResponse::printTo(std::ostream& out) const {
@@ -16554,11 +17356,11 @@ void swap(ShowCompactRequest &a, ShowCompactRequest &b) {
(void) b;
}
-ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other684) {
- (void) other684;
+ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other726) {
+ (void) other726;
}
-ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other685) {
- (void) other685;
+ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other727) {
+ (void) other727;
return *this;
}
void ShowCompactRequest::printTo(std::ostream& out) const {
@@ -16684,9 +17486,9 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol*
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast686;
- xfer += iprot->readI32(ecast686);
- this->type = (CompactionType::type)ecast686;
+ int32_t ecast728;
+ xfer += iprot->readI32(ecast728);
+ this->type = (CompactionType::type)ecast728;
isset_type = true;
} else {
xfer += iprot->skip(ftype);
@@ -16873,37 +17675,37 @@ void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) {
swap(a.__isset, b.__isset);
}
-ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other687) {
- dbname = other687.dbname;
- tablename = other687.tablename;
- partitionname = other687.partitionname;
- type = other687.type;
- state = other687.state;
- workerid = other687.workerid;
- start = other687.start;
- runAs = other687.runAs;
- hightestTxnId = other687.hightestTxnId;
- metaInfo = other687.metaInfo;
- endTime = other687.endTime;
- hadoopJobId = other687.hadoopJobId;
- id = other687.id;
- __isset = other687.__isset;
-}
-ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other688) {
- dbname = other688.dbname;
- tablename = other688.tablename;
- partitionname = other688.partitionname;
- type = other688.type;
- state = other688.state;
- workerid = other688.workerid;
- start = other688.start;
- runAs = other688.runAs;
- hightestTxnId = other688.hightestTxnId;
- metaInfo = other688.metaInfo;
- endTime = other688.endTime;
- hadoopJobId = other688.hadoopJobId;
- id = other688.id;
- __isset = other688.__isset;
+ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other729) {
+ dbname = other729.dbname;
+ tablename = other729.tablename;
+ partitionname = other729.partitionname;
+ type = other729.type;
+ state = other729.state;
+ workerid = other729.workerid;
+ start = other729.start;
+ runAs = other729.runAs;
+ hightestTxnId = other729.hightestTxnId;
+ metaInfo = other729.metaInfo;
+ endTime = other729.endTime;
+ hadoopJobId = other729.hadoopJobId;
+ id = other729.id;
+ __isset = other729.__isset;
+}
+ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other730) {
+ dbname = other730.dbname;
+ tablename = other730.tablename;
+ partitionname = other730.partitionname;
+ type = other730.type;
+ state = other730.state;
+ workerid = other730.workerid;
+ start = other730.start;
+ runAs = other730.runAs;
+ hightestTxnId = other730.hightestTxnId;
+ metaInfo = other730.metaInfo;
+ endTime = other730.endTime;
+ hadoopJobId = other730.hadoopJobId;
+ id = other730.id;
+ __isset = other730.__isset;
return *this;
}
void ShowCompactResponseElement::printTo(std::ostream& out) const {
@@ -16960,14 +17762,14 @@ uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot)
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->compacts.clear();
- uint32_t _size689;
- ::apache::thrift::protocol::TType _etype692;
- xfer += iprot->readListBegin(_etype692, _size689);
- this->compacts.resize(_size689);
- uint32_t _i693;
- for (_i693 = 0; _i693 < _size689; ++_i693)
+ uint32_t _size731;
+ ::apache::thrift::protocol::TType _etype734;
+ xfer += iprot->readListBegin(_etype734, _size731);
+ this->compacts.resize(_size731);
+ uint32_t _i735;
+ for (_i735 = 0; _i735 < _size731; ++_i735)
{
- xfer += this->compacts[_i693].read(iprot);
+ xfer += this->compacts[_i735].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -16998,10 +17800,10 @@ uint32_t ShowCompactResponse::write(::apache::thrift::protocol::TProtocol* oprot
xfer += oprot->writeFieldBegin("compacts", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->compacts.size()));
- std::vector<ShowCompactResponseElement> ::const_iterator _iter694;
- for (_iter694 = this->compacts.begin(); _iter694 != this->compacts.end(); ++_iter694)
+ std::vector<ShowCompactResponseElement> ::const_iterator _iter736;
+ for (_iter736 = this->compacts.begin(); _iter736 != this->compacts.end(); ++_iter736)
{
- xfer += (*_iter694).write(oprot);
+ xfer += (*_iter736).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -17017,11 +17819,11 @@ void swap(ShowCompactResponse &a, ShowCompactResponse &b) {
swap(a.compacts, b.compacts);
}
-ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other695) {
- compacts = other695.compacts;
+ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other737) {
+ compacts = other737.compacts;
}
-ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other696) {
- compacts = other696.compacts;
+ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other738) {
+ compacts = other738.compacts;
return *this;
}
void ShowCompactResponse::printTo(std::ostream& out) const {
@@ -17040,6 +17842,10 @@ void AddDynamicPartitions::__set_txnid(const int64_t val) {
this->txnid = val;
}
+void AddDynamicPartitions::__set_writeid(const int64_t val) {
+ this->writeid = val;
+}
+
void AddDynamicPartitions::__set_dbname(const std::string& val) {
this->dbname = val;
}
@@ -17070,6 +17876,7 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
using ::apache::thrift::protocol::TProtocolException;
bool isset_txnid = false;
+ bool isset_writeid = false;
bool isset_dbname = false;
bool isset_tablename = false;
bool isset_partitionnames = false;
@@ -17091,6 +17898,14 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
}
break;
case 2:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->writeid);
+ isset_writeid = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbname);
isset_dbname = true;
@@ -17098,7 +17913,7 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
xfer += iprot->skip(ftype);
}
break;
- case 3:
+ case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tablename);
isset_tablename = true;
@@ -17106,18 +17921,18 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
xfer += iprot->skip(ftype);
}
break;
- case 4:
+ case 5:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitionnames.clear();
- uint32_t _size697;
- ::apache::thrift::protocol::TType _etype700;
- xfer += iprot->readListBegin(_etype700, _size697);
- this->partitionnames.resize(_size697);
- uint32_t _i701;
- for (_i701 = 0; _i701 < _size697; ++_i701)
+ uint32_t _size739;
+ ::apache::thrift::protocol::TType _etype742;
+ xfer += iprot->readListBegin(_etype742, _size739);
+ this->partitionnames.resize(_size739);
+ uint32_t _i743;
+ for (_i743 = 0; _i743 < _size739; ++_i743)
{
- xfer += iprot->readString(this->partitionnames[_i701]);
+ xfer += iprot->readString(this->partitionnames[_i743]);
}
xfer += iprot->readListEnd();
}
@@ -17126,11 +17941,11 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
xfer += iprot->skip(ftype);
}
break;
- case 5:
+ case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast702;
- xfer += iprot->readI32(ecast702);
- this->operationType = (DataOperationType::type)ecast702;
+ int32_t ecast744;
+ xfer += iprot->readI32(ecast744);
+ this->operationType = (DataOperationType::type)ecast744;
this->__isset.operationType = true;
} else {
xfer += iprot->skip(ftype);
@@ -17147,6 +17962,8 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
if (!isset_txnid)
throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_writeid)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_dbname)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tablename)
@@ -17165,28 +17982,32 @@ uint32_t AddDynamicPartitions::write(::apache::thrift::protocol::TProtocol* opro
xfer += oprot->writeI64(this->txnid);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeFieldBegin("writeid", ::apache::thrift::protocol::T_I64, 2);
+ xfer += oprot->writeI64(this->writeid);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->dbname);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->tablename);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("partitionnames", ::apache::thrift::protocol::T_LIST, 4);
+ xfer += oprot->writeFieldBegin("partitionnames", ::apache::thrift::protocol::T_LIST, 5);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionnames.size()));
- std::vector<std::string> ::const_iterator _iter703;
- for (_iter703 = this->partitionnames.begin(); _iter703 != this->partitionnames.end(); ++_iter703)
+ std::vector<std::string> ::const_iterator _iter745;
+ for (_iter745 = this->partitionnames.begin(); _iter745 != this->partitionnames.end(); ++_iter745)
{
- xfer += oprot->writeString((*_iter703));
+ xfer += oprot->writeString((*_iter745));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
if (this->__isset.operationType) {
- xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 5);
+ xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 6);
xfer += oprot->writeI32((int32_t)this->operationType);
xfer += oprot->writeFieldEnd();
}
@@ -17198,6 +18019,7 @@ uint32_t AddDynamicPartitions::write(::apache::thrift::protocol::TProtocol* opro
void swap(AddDynamicPartitions &a, AddDynamicPartitions &b) {
using ::std::swap;
swap(a.txnid, b.txnid);
+ swap(a.writeid, b.writeid);
swap(a.dbname, b.dbname);
swap(a.tablename, b.tablename);
swap(a.partitionnames, b.partitionnames);
@@ -17205,27 +18027,30 @@ void swap(AddDynamicPartitions &a, AddDynamicPartitions &b) {
swap(a.__isset, b.__isset);
}
-AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other704) {
- txnid = other704.txnid;
- dbname = other704.dbname;
- tablename = other704.tablename;
- partitionnames = other704.partitionnames;
- operationType = other704.operationType;
- __isset = other704.__isset;
-}
-AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other705) {
- txnid = other705.txnid;
- dbname = other705.dbname;
- tablename = other705.tablename;
- partitionnames = other705.partitionnames;
- operationType = other705.operationType;
- __isset = other705.__isset;
+AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other746) {
+ txnid = other746.txnid;
+ writeid = other746.writeid;
+ dbname = other746.dbname;
+ tablename = other746.tablename;
+ partitionnames = other746.partitionnames;
+ operationType = other746.operationType;
+ __isset = other746.__isset;
+}
+AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other747) {
+ txnid = other747.txnid;
+ writeid = other747.writeid;
+ dbname = other747.dbname;
+ tablename = other747.tablename;
+ partitionnames = other747.partitionnames;
+ operationType = other747.operationType;
+ __isset = other747.__isset;
return *this;
}
void AddDynamicPartitions::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
out << "AddDynamicPartitions(";
out << "txnid=" << to_string(txnid);
+ out << ", " << "writeid=" << to_string(writeid);
out << ", " << "dbname=" << to_string(dbname);
out << ", " << "tablename=" << to_string(tablename);
out << ", " << "partitionnames=" << to_string(partitionnames);
@@ -17401,23 +18226,23 @@ void swap(BasicTxnInfo &a, BasicTxnInfo &b) {
swap(a.__isset, b.__isset);
}
-BasicTxnInfo::BasicTxnInfo(const BasicTxnInfo& other706) {
- isnull = other706.isnull;
- time = other706.time;
- txnid = other706.txnid;
- dbname = other706.dbname;
- tablename = other706.tablename;
- partitionname = other706.partitionname;
- __isset = other706.__isset;
-}
-BasicTxnInfo& BasicTxnInfo::operator=(const BasicTxnInfo& other707) {
- isnull = other707.isnull;
- time = other707.time;
- txnid = other707.txnid;
- dbname = other707.dbname;
- tablename = other707.tablename;
- partitionname = other707.partitionname;
- __isset = other707.__isset;
+BasicTxnInfo::BasicTxnInfo(const BasicTxnInfo& other748) {
+ isnull = other748.isnull;
+ time = other748.time;
+ txnid = other748.txnid;
+ dbname = other748.dbname;
+ tablename = other748.tablename;
+ partitionname = other748.partitionname;
+ __isset = other748.__isset;
+}
+BasicTxnInfo& BasicTxnInfo::operator=(const BasicTxnInfo& other749) {
+ isnull = other749.isnull;
+ time = other749.time;
+ txnid = other749.txnid;
+ dbname = other749.dbname;
+ tablename = other749.tablename;
+ partitionname = other749.partitionname;
+ __isset = other749.__isset;
return *this;
}
void BasicTxnInfo::printTo(std::ostream& out) const {
@@ -17498,15 +18323,15 @@ uint32_t CreationMetadata::read(::apache::thrift::protocol::TProtocol* iprot) {
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->tablesUsed.clear();
- uint32_t _size708;
- ::apache::thrift::protocol::TType _etype711;
- xfer += iprot->readSetBegin(_etype711, _size708);
- uint32_t _i712;
- for (_i712 = 0; _i712 < _size708; ++_i712)
+ uint32_t _size750;
+ ::apache::thrift::protocol::TType _etype753;
+ xfer += iprot->readSetBegin(_etype753, _size750);
+ uint32_t _i754;
+ for (_i754 = 0; _i754 < _size750; ++_i754)
{
- std::string _elem713;
- xfer += iprot->readString(_elem713);
- this->tablesUsed.insert(_elem713);
+ std::string _elem755;
+ xfer += iprot->readString(_elem755);
+ this->tablesUsed.insert(_elem755);
}
xfer += iprot->readSetEnd();
}
@@ -17557,10 +18382,10 @@ uint32_t CreationMetadata::write(::apache::thrift::protocol::TProtocol* oprot) c
xfer += oprot->writeFieldBegin("tablesUsed", ::apache::thrift::protocol::T_SET, 3);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->tablesUsed.size()));
- std::set<std::string> ::const_iterator _iter714;
- for (_iter714 = this->tablesUsed.begin(); _iter714 != this->tablesUsed.end(); ++_iter714)
+ std::set<std::string> ::const_iterator _iter756;
+ for (_iter756 = this->tablesUsed.begin(); _iter756 != this->tablesUsed.end(); ++_iter756)
{
- xfer += oprot->writeString((*_iter714));
+ xfer += oprot->writeString((*_iter756));
}
xfer += oprot->writeSetEnd();
}
@@ -17585,19 +18410,19 @@ void swap(CreationMetadata &a, CreationMetadata &b) {
swap(a.__isset, b.__isset);
}
-CreationMetadata::CreationMetadata(const CreationMetadata& other715) {
- dbName = other715.dbName;
- tblName = other715.tblName;
- tablesUsed = other715.tablesUsed;
- validTxnList = other715.validTxnList;
- __isset = other715.__isset;
+CreationMetadata::CreationMetadata(const CreationMetadata& other757) {
+ dbName = other757.dbName;
+ tblName = other757.tblName;
+ tablesUsed = other757.tablesUsed;
+ validTxnList = other757.validTxnList;
+ __isset = other757.__isset;
}
-CreationMetadata& CreationMetadata::operator=(const CreationMetadata& other716) {
- dbName = other716.dbName;
- tblName = other716.tblName;
- tablesUsed = other716.tablesUsed;
- validTxnList = other716.validTxnList;
- __isset = other716.__isset;
+CreationMetadata& CreationMetadata::operator=(const CreationMetadata& other758) {
+ dbName = other758.dbName;
+ tblName = other758.tblName;
+ tablesUsed = other758.tablesUsed;
+ validTxnList = other758.validTxnList;
+ __isset = other758.__isset;
return *this;
}
void CreationMetadata::printTo(std::ostream& out) const {
@@ -17702,15 +18527,15 @@ void swap(NotificationEventRequest &a, NotificationEventRequest &b) {
swap(a.__isset, b.__isset);
}
-NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other717) {
- lastEvent = other717.lastEvent;
- maxEvents = other717.maxEvents;
- __isset = other717.__isset;
+NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other759) {
+ lastEvent = other759.lastEvent;
+ maxEvents = other759.maxEvents;
+ __isset = other759.__isset;
}
-NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other718) {
- lastEvent = other718.lastEvent;
- maxEvents = other718.maxEvents;
- __isset = other718.__isset;
+NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other760) {
+ lastEvent = other760.lastEvent;
+ maxEvents = other760.maxEvents;
+ __isset = other760.__isset;
return *this;
}
void NotificationEventRequest::printTo(std::ostream& out) const {
@@ -17911,25 +18736,25 @@ void swap(NotificationEvent &a, NotificationEvent &b) {
swap(a.__isset, b.__isset);
}
-NotificationEvent::NotificationEvent(const NotificationEvent& other719) {
- eventId = other719.eventId;
- eventTime = other719.eventTime;
- eventType = other719.eventType;
- dbName = other719.dbName;
- tableName = other719.tableName;
- message = other719.message;
- messageFormat = other719.messageFormat;
- __isset = other719.__isset;
-}
-NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other720) {
- eventId = other720.eventId;
- eventTime = other720.eventTime;
- eventType = other720.eventType;
- dbName = other720.dbName;
- tableName = other720.tableName;
- message = other720.message;
- messageFormat = other720.messageFormat;
- __isset = other720.__isset;
+NotificationEvent::NotificationEvent(const NotificationEvent& other761) {
+ eventId = other761.eventId;
+ eventTime = other761.eventTime;
+ eventType = other761.eventType;
+ dbName = other761.dbName;
+ tableName = other761.tableName;
+ message = other761.message;
+ messageFormat = other761.messageFormat;
+ __isset = other761.__isset;
+}
+NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other762) {
+ eventId = other762.eventId;
+ eventTime = other762.eventTime;
+ eventType = other762.eventType;
+ dbName = other762.dbName;
+ tableName = other762.tableName;
+ message = other762.message;
+ messageFormat = other762.messageFormat;
+ __isset = other762.__isset;
return *this;
}
void NotificationEvent::printTo(std::ostream& out) const {
@@ -17980,14 +18805,14 @@ uint32_t NotificationEventResponse::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->events.clear();
- uint32_t _size721;
- ::apache::thrift::protocol::TType _etype724;
- xfer += iprot->readListBegin(_etype724, _size721);
- this->events.resize(_size721);
- uint32_t _i725;
- for (_i725 = 0; _i725 < _size721; ++_i725)
+ uint32_t _size763;
+ ::apache::thrift::protocol::TType _etype766;
+ xfer += iprot->readListBegin(_etype766, _size763);
+ this->events.resize(_size763);
+ uint32_t _i767;
+ for (_i767 = 0; _i767 < _size763; ++_i767)
{
- xfer += this->events[_i725].read(iprot);
+ xfer += this->events[_i767].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -18018,10 +18843,10 @@ uint32_t NotificationEventResponse::write(::apache::thrift::protocol::TProtocol*
xfer += oprot->writeFieldBegin("events", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->events.size()));
- std::vector<NotificationEvent> ::const_iterator _iter726;
- for (_iter726 = this->events.begin(); _iter726 != this->events.end(); ++_iter726)
+ std::vector<NotificationEvent> ::const_iterator _iter768;
+ for (_iter768 = this->events.begin(); _iter768 != this->events.end(); ++_iter768)
{
- xfer += (*_iter726).write(oprot);
+ xfer += (*_iter768).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -18037,11 +18862,11 @@ void swap(NotificationEventResponse &a, NotificationEventResponse &b) {
swap(a.events, b.events);
}
-NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other727) {
- events = other727.events;
+NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other769) {
+ events = other769.events;
}
-NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other728) {
- events = other728.events;
+NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other770) {
+ events = other770.events;
return *this;
}
void NotificationEventResponse::printTo(std::ostream& out) const {
@@ -18123,11 +18948,11 @@ void swap(CurrentNotificationEventId &a, CurrentNotificationEventId &b) {
swap(a.eventId, b.eventId);
}
-CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other729) {
- eventId = other729.eventId;
+CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other771) {
+ eventId = other771.eventId;
}
-CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other730) {
- eventId = other730.eventId;
+CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other772) {
+ eventId = other772.eventId;
return *this;
}
void CurrentNotificationEventId::printTo(std::ostream& out) const {
@@ -18229,13 +19054,13 @@ void swap(NotificationEventsCountRequest &a, NotificationEventsCountRequest &b)
swap(a.dbName, b.dbName);
}
-NotificationEventsCountRequest::NotificationEventsCountRequest(const NotificationEventsCountRequest& other731) {
- fromEventId = other731.fromEventId;
- dbName = other731.dbName;
+NotificationEventsCountRequest::NotificationEventsCountRequest(const NotificationEventsCountRequest& other773) {
+ fromEventId = other773.fromEventId;
+ dbName = other773.dbName;
}
-NotificationEventsCountRequest& NotificationEventsCountRequest::operator=(const NotificationEventsCountRequest& other732) {
- fromEventId = other732.fromEventId;
- dbName = other732.dbName;
+NotificationEventsCountRequest& NotificationEventsCountRequest::operator=(const NotificationEventsCountRequest& other774) {
+ fromEventId = other774.fromEventId;
+ dbName = other774.dbName;
return *this;
}
void NotificationEventsCountRequest::printTo(std::ostream& out) const {
@@ -18318,11 +19143,11 @@ void swap(NotificationEventsCountResponse &a, NotificationEventsCountResponse &b
swap(a.eventsCount, b.eventsCount);
}
-NotificationEventsCountResponse::NotificationEventsCountResponse(const NotificationEventsCountResponse& other733) {
- eventsCount = other733.eventsCount;
+NotificationEventsCountResponse::NotificationEventsCountResponse(const NotificationEventsCountResponse& other775) {
+ eventsCount = other775.eventsCount;
}
-NotificationEventsCountResponse& NotificationEventsCountResponse::operator=(const NotificationEventsCountResponse& other734) {
- eventsCount = other734.eventsCount;
+NotificationEventsCountResponse& NotificationEventsCountResponse::operator=(const NotificationEventsCountResponse& other776) {
+ eventsCount = other776.eventsCount;
return *this;
}
void NotificationEventsCountResponse::printTo(std::ostream& out) const {
@@ -18385,14 +19210,14 @@ uint32_t InsertEventRequestData::read(::apache::thrift::protocol::TProtocol* ipr
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->filesAdded.clear();
- uint32_t _size735;
- ::apache::thrift::protocol::TType _etype738;
- xfer += iprot->readListBegin(_etype738, _size735);
- this->filesAdded.resize(_size735);
- uint32_t _i739;
- for (_i739 = 0; _i739 < _size735; ++_i739)
+ uint32_t _size777;
+ ::apache::thrift::protocol::TType _etype780;
+ xfer += iprot->readListBegin(_etype780, _size777);
+ this->filesAdded.resize(_size777);
+ uint32_t _i781;
+ for (_i781 = 0; _i781 < _size777; ++_i781)
{
- xfer += iprot->readString(this->filesAdded[_i739]);
+ xfer += iprot->readString(this->filesAdded[_i781]);
}
xfer += iprot->readListEnd();
}
@@ -18405,14 +19230,14 @@ uint32_t InsertEventRequestData::read(::apache::thrift::protocol::TProtocol* ipr
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->filesAddedChecksum.clear();
- uint32_t _size740;
- ::apache::thrift::protocol::TType _etype743;
- xfer += iprot->readListBegin(_etype743, _size740);
- this->filesAddedChecksum.resize(_size740);
- uint32_t _i744;
- for (_i744 = 0; _i744 < _size740; ++_i744)
+ uint32_t _size782;
+ ::apache::thrift::protocol::TType _etype785;
+ xfer += iprot->readListBegin(_etype785, _size782);
+ this->filesAddedChecksum.resize(_size782);
+ uint32_t _i786;
+ for (_i786 = 0; _i786 < _size782; ++_i786)
{
- xfer += iprot->readString(this->filesAddedChecksum[_i744]);
+ xfer += iprot->readString(this->filesAddedChecksum[_i786]);
}
xfer += iprot->readListEnd();
}
@@ -18448,10 +19273,10 @@ uint32_t InsertEventRequestData::write(::apache::thrift::protocol::TProtocol* op
xfer += oprot->writeFieldBegin("filesAdded", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->filesAdded.size()));
- std::vector<std::string> ::const_iterator _iter745;
- for (_iter745 = this->filesAdded.begin(); _iter745 != this->filesAdded.end(); ++_iter745)
+ std::vector<std::string> ::const_iterator _iter787;
+ for (_iter787 = this->filesAdded.begin(); _iter787 != this->filesAdded.end(); ++_iter787)
{
- xfer += oprot->writeString((*_iter745));
+ xfer += oprot->writeString((*_iter787));
}
xfer += oprot->writeListEnd();
}
@@ -18461,10 +19286,10 @@ uint32_t InsertEventRequestData::write(::apache::thrift::protocol::TProtocol* op
xfer += oprot->writeFieldBegin("filesAddedChecksum", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->filesAddedChecksum.size()));
- std::vector<std::string> ::const_iterator _iter746;
- for (_iter746 = this->filesAddedChecksum.begin(); _iter746 != this->filesAddedChecksum.end(); ++_iter746)
+ std::vector<std::string> ::const_iterator _iter788;
+ for (_iter788 = this->filesAddedChecksum.begin(); _iter788 != this->filesAddedChecksum.end(); ++_iter788)
{
- xfer += oprot->writeString((*_iter746));
+ xfer += oprot->writeString((*_iter788));
}
xfer += oprot->writeListEnd();
}
@@ -18483,17 +19308,17 @@ void swap(InsertEventRequestData &a, InsertEventRequestData &b) {
swap(a.__isset, b.__isset);
}
-InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other747) {
- replace = other747.replace;
- filesAdded = other747.filesAdded;
- filesAddedChecksum = other747.filesAddedChecksum;
- __isset = other747.__isset;
+InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other789) {
+ replace = other789.replace;
+ filesAdded = other789.filesAdded;
+ filesAddedChecksum = other789.filesAddedChecksum;
+ __isset = other789.__isset;
}
-InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other748) {
- replace = other748.replace;
- filesAdded = other748.filesAdded;
- filesAddedChecksum = other748.filesAddedChecksum;
- __isset = other748.__isset;
+InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other790) {
+ replace = other790.replace;
+ filesAdded = other790.filesAdded;
+ filesAddedChecksum = other790.filesAddedChecksum;
+ __isset = other790.__isset;
return *this;
}
void InsertEventRequestData::printTo(std::ostream& out) const {
@@ -18575,13 +19400,13 @@ void swap(FireEventRequestData &a, FireEventRequestData &b) {
swap(a.__isset, b.__isset);
}
-FireEventRequestData::FireEventRequestData(const FireEventRequestData& other749) {
- insertData = other749.insertData;
- __isset = other749.__isset;
+FireEventRequestData::FireEventRequestData(const FireEventRequestData& other791) {
+ insertData = other791.insertData;
+ __isset = other791.__isset;
}
-FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other750) {
- insertData = other750.insertData;
- __isset = other750.__isset;
+FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other792) {
+ insertData = other792.insertData;
+ __isset = other792.__isset;
return *this;
}
void FireEventRequestData::printTo(std::ostream& out) const {
@@ -18678,14 +19503,14 @@ uint32_t FireEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitionVals.clear();
- uint32_t _size751;
- ::apache::thrift::protocol::TType _etype754;
- xfer += iprot->readListBegin(_etype754, _size751);
- this->partitionVals.resize(_size751);
- uint32_t _i755;
- for (_i755 = 0; _i755 < _size751; ++_i755)
+ uint32_t _size793;
+ ::apache::thrift::protocol::TType _etype796;
+ xfer += iprot->readListBegin(_etype796, _size793);
+ this->partitionVals.resize(_size793);
+ uint32_t _i797;
+ for (_i797 = 0; _i797 < _size793; ++_i797)
{
- xfer += iprot->readString(this->partitionVals[_i755]);
+ xfer += iprot->readString(this->partitionVals[_i797]);
}
xfer += iprot->readListEnd();
}
@@ -18737,10 +19562,10 @@ uint32_t FireEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) c
xfer += oprot->writeFieldBegin("partitionVals", ::apache::thrift::protocol::T_LIST, 5);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionVals.size()));
- std::vector<std::string> ::const_iterator _iter756;
- for (_iter756 = this->partitionVals.begin(); _iter756 != this->partitionVals.end(); ++_iter756)
+ std::vector<std::string> ::const_iterator _iter798;
+ for (_iter798 = this->partitionVals.begin(); _iter798 != this->partitionVals.end(); ++_iter798)
{
- xfer += oprot->writeString((*_iter756));
+ xfer += oprot->writeString((*_iter798));
}
xfer += oprot->writeListEnd();
}
@@ -18761,21 +19586,21 @@ void swap(FireEventRequest &a, FireEventRequest &b) {
swap(a.__isset, b.__isset);
}
-FireEventRequest::FireEventRequest(const FireEventRequest& other757) {
- successful = other757.successful;
- data = other757.data;
- dbName = other757.dbName;
- tableName = other757.tableName;
- partitionVals = other757.partitionVals;
- __isset = other757.__isset;
-}
-FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other758) {
- successful = other758.successful;
- data = other758.data;
- dbName = other758.dbName;
- tableName = other758.tableName;
- partitionVals = other758.partitionVals;
- __isset = other758.__isset;
+FireEventRequest::FireEventRequest(const FireEventRequest& other799) {
+ successful = other799.successful;
+ data = other799.data;
+ dbName = other799.dbName;
+ tableName = other799.tableName;
+ partitionVals = other799.partitionVals;
+ __isset = other799.__isset;
+}
+FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other800) {
+ successful = other800.successful;
+ data = other800.data;
+ dbName = other800.dbName;
+ tableName = other800.tableName;
+ partitionVals = other800.partitionVals;
+ __isset = other800.__isset;
return *this;
}
void FireEventRequest::printTo(std::ostream& out) const {
@@ -18838,11 +19663,11 @@ void swap(FireEventResponse &a, FireEventResponse &b) {
(void) b;
}
-FireEventResponse::FireEventResponse(const FireEventResponse& other759) {
- (void) other759;
+FireEventResponse::FireEventResponse(const FireEventResponse& other801) {
+ (void) other801;
}
-FireEventResponse& FireEventResponse::operator=(const FireEventResponse& other760) {
- (void) other760;
+FireEventResponse& Fire
<TRUNCATED>
[21/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
HIVE-18192: Introduce WriteID per table rather than using global transaction ID (Sankar Hariappan, reviewed by Eugene Koifman)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/cbb9233a
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/cbb9233a
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/cbb9233a
Branch: refs/heads/master
Commit: cbb9233a3b39ab8489d777fc76f0758c49b69bef
Parents: f9768af
Author: Sankar Hariappan <sa...@apache.org>
Authored: Fri Feb 23 22:00:23 2018 +0530
Committer: Sankar Hariappan <sa...@apache.org>
Committed: Fri Feb 23 22:00:23 2018 +0530
----------------------------------------------------------------------
.../apache/hadoop/hive/common/JavaUtils.java | 11 +-
.../org/apache/hadoop/hive/conf/HiveConf.java | 2 +-
.../streaming/AbstractRecordWriter.java | 24 +-
.../streaming/DelimitedInputWriter.java | 8 +-
.../hive/hcatalog/streaming/HiveEndPoint.java | 77 +-
.../hive/hcatalog/streaming/RecordWriter.java | 12 +-
.../hcatalog/streaming/StrictJsonWriter.java | 8 +-
.../hcatalog/streaming/StrictRegexWriter.java | 8 +-
.../hcatalog/streaming/TransactionBatch.java | 47 +-
.../streaming/mutate/client/AcidTable.java | 14 +-
.../mutate/client/AcidTableSerializer.java | 10 +-
.../streaming/mutate/client/MutatorClient.java | 17 +-
.../mutate/worker/MutatorCoordinator.java | 22 +-
.../streaming/mutate/worker/MutatorFactory.java | 3 +-
.../streaming/mutate/worker/MutatorImpl.java | 18 +-
.../mutate/worker/SequenceValidator.java | 14 +-
.../hive/hcatalog/streaming/TestStreaming.java | 109 +-
.../mutate/ReflectiveMutatorFactory.java | 4 +-
.../streaming/mutate/StreamingAssert.java | 16 +-
.../mutate/client/TestAcidTableSerializer.java | 6 +-
.../mutate/client/TestMutatorClient.java | 12 +-
.../mutate/worker/TestMutatorCoordinator.java | 26 +-
.../mutate/worker/TestMutatorImpl.java | 14 +-
.../apache/hadoop/hive/ql/TestAcidOnTez.java | 64 +-
.../hive/ql/txn/compactor/TestCompactor.java | 106 +-
.../upgrade/derby/044-HIVE-16997.derby.sql | 1 -
.../upgrade/derby/050-HIVE-18192.derby.sql | 27 +
.../derby/hive-txn-schema-3.0.0.derby.sql | 27 +-
.../derby/upgrade-2.3.0-to-3.0.0.derby.sql | 1 +
.../java/org/apache/hadoop/hive/ql/Driver.java | 107 +-
.../hive/ql/exec/AbstractFileMergeOperator.java | 4 +-
.../org/apache/hadoop/hive/ql/exec/DDLTask.java | 12 +-
.../hadoop/hive/ql/exec/FetchOperator.java | 28 +-
.../apache/hadoop/hive/ql/exec/FetchTask.java | 4 +-
.../hadoop/hive/ql/exec/FileSinkOperator.java | 18 +-
.../hadoop/hive/ql/exec/ImportCommitTask.java | 2 +-
.../hadoop/hive/ql/exec/ImportCommitWork.java | 10 +-
.../apache/hadoop/hive/ql/exec/MoveTask.java | 6 +-
.../hadoop/hive/ql/exec/SMBMapJoinOperator.java | 1 +
.../apache/hadoop/hive/ql/exec/Utilities.java | 8 +-
.../hadoop/hive/ql/exec/mr/MapredLocalTask.java | 1 +
.../hadoop/hive/ql/io/AcidInputFormat.java | 34 +-
.../hadoop/hive/ql/io/AcidOutputFormat.java | 30 +-
.../org/apache/hadoop/hive/ql/io/AcidUtils.java | 234 +-
.../hadoop/hive/ql/io/HiveFileFormatUtils.java | 4 +-
.../hadoop/hive/ql/io/HiveInputFormat.java | 42 +-
.../hadoop/hive/ql/io/RecordIdentifier.java | 20 +-
.../apache/hadoop/hive/ql/io/RecordUpdater.java | 13 +-
.../hadoop/hive/ql/io/orc/OrcInputFormat.java | 41 +-
.../hadoop/hive/ql/io/orc/OrcOutputFormat.java | 14 +-
.../hive/ql/io/orc/OrcRawRecordMerger.java | 126 +-
.../hadoop/hive/ql/io/orc/OrcRecordUpdater.java | 92 +-
.../io/orc/VectorizedOrcAcidRowBatchReader.java | 144 +-
.../hadoop/hive/ql/lockmgr/DbTxnManager.java | 69 +-
.../hadoop/hive/ql/lockmgr/DummyTxnManager.java | 14 +-
.../hadoop/hive/ql/lockmgr/HiveTxnManager.java | 27 +-
.../apache/hadoop/hive/ql/metadata/Hive.java | 45 +-
.../hive/ql/optimizer/GenMapRedUtils.java | 8 +-
.../hive/ql/parse/DDLSemanticAnalyzer.java | 4 +-
.../hive/ql/parse/ImportSemanticAnalyzer.java | 82 +-
.../hive/ql/parse/LoadSemanticAnalyzer.java | 14 +-
.../hadoop/hive/ql/parse/SemanticAnalyzer.java | 59 +-
.../hadoop/hive/ql/plan/FileMergeDesc.java | 10 +-
.../hadoop/hive/ql/plan/FileSinkDesc.java | 14 +-
.../hadoop/hive/ql/plan/LoadTableDesc.java | 35 +-
.../hadoop/hive/ql/plan/TableScanDesc.java | 12 +-
.../hadoop/hive/ql/stats/ColStatsProcessor.java | 1 -
.../hadoop/hive/ql/txn/compactor/Cleaner.java | 21 +-
.../hive/ql/txn/compactor/CompactorMR.java | 54 +-
.../hadoop/hive/ql/txn/compactor/Initiator.java | 27 +-
.../hadoop/hive/ql/txn/compactor/Worker.java | 28 +-
.../metastore/txn/TestCompactionTxnHandler.java | 13 +-
.../hive/metastore/txn/TestTxnHandler.java | 12 +-
.../apache/hadoop/hive/ql/TestTxnCommands.java | 34 +-
.../apache/hadoop/hive/ql/TestTxnCommands2.java | 36 +-
.../apache/hadoop/hive/ql/TestTxnLoadData.java | 148 +-
.../apache/hadoop/hive/ql/TestTxnNoBuckets.java | 318 +-
.../hive/ql/exec/TestFileSinkOperator.java | 18 +-
.../hadoop/hive/ql/io/TestAcidInputFormat.java | 16 +-
.../apache/hadoop/hive/ql/io/TestAcidUtils.java | 73 +-
.../hive/ql/io/orc/TestInputOutputFormat.java | 26 +-
.../hive/ql/io/orc/TestOrcRawRecordMerger.java | 129 +-
.../hive/ql/io/orc/TestOrcRecordUpdater.java | 16 +-
.../TestVectorizedOrcAcidRowBatchReader.java | 14 +-
.../hive/ql/lockmgr/TestDbTxnManager2.java | 109 +-
...TestGenMapRedUtilsCreateConditionalTask.java | 2 +-
.../parse/TestUpdateDeleteSemanticAnalyzer.java | 1 +
.../hive/ql/txn/compactor/CompactorTest.java | 39 +-
.../hive/ql/txn/compactor/TestCleaner.java | 30 +-
.../hive/ql/txn/compactor/TestInitiator.java | 50 +-
.../hive/ql/txn/compactor/TestWorker.java | 45 +-
.../results/clientpositive/acid_nullscan.q.out | 8 +-
.../clientpositive/acid_table_stats.q.out | 14 +-
.../clientpositive/autoColumnStats_4.q.out | 2 +-
.../llap/acid_bucket_pruning.q.out | 4 +-
.../test/results/clientpositive/row__id.q.out | 22 +-
.../gen/thrift/gen-cpp/ThriftHiveMetastore.cpp | 3724 +++++++----
.../gen/thrift/gen-cpp/ThriftHiveMetastore.h | 292 +
.../ThriftHiveMetastore_server.skeleton.cpp | 10 +
.../gen/thrift/gen-cpp/hive_metastore_types.cpp | 3341 ++++++----
.../gen/thrift/gen-cpp/hive_metastore_types.h | 307 +-
.../metastore/api/AddDynamicPartitions.java | 159 +-
.../api/AllocateTableWriteIdsRequest.java | 640 ++
.../api/AllocateTableWriteIdsResponse.java | 443 ++
.../metastore/api/ClearFileMetadataRequest.java | 32 +-
.../hive/metastore/api/ClientCapabilities.java | 32 +-
.../hive/metastore/api/CompactionRequest.java | 44 +-
.../hive/metastore/api/CreationMetadata.java | 32 +-
.../hive/metastore/api/FireEventRequest.java | 32 +-
.../metastore/api/GetAllFunctionsResponse.java | 36 +-
.../api/GetFileMetadataByExprRequest.java | 32 +-
.../api/GetFileMetadataByExprResult.java | 48 +-
.../metastore/api/GetFileMetadataRequest.java | 32 +-
.../metastore/api/GetFileMetadataResult.java | 44 +-
.../hive/metastore/api/GetTablesRequest.java | 32 +-
.../hive/metastore/api/GetTablesResult.java | 36 +-
.../metastore/api/GetValidWriteIdsRequest.java | 539 ++
.../metastore/api/GetValidWriteIdsResponse.java | 443 ++
.../api/HeartbeatTxnRangeResponse.java | 64 +-
.../metastore/api/InsertEventRequestData.java | 64 +-
.../hadoop/hive/metastore/api/LockRequest.java | 36 +-
.../hive/metastore/api/Materialization.java | 32 +-
.../api/NotificationEventResponse.java | 36 +-
.../metastore/api/PutFileMetadataRequest.java | 64 +-
.../hive/metastore/api/ShowCompactResponse.java | 36 +-
.../hive/metastore/api/ShowLocksResponse.java | 36 +-
.../hive/metastore/api/TableValidWriteIds.java | 851 +++
.../hive/metastore/api/ThriftHiveMetastore.java | 6010 ++++++++++++------
.../hadoop/hive/metastore/api/TxnToWriteId.java | 482 ++
.../hive/metastore/api/WMFullResourcePlan.java | 144 +-
.../api/WMGetAllResourcePlanResponse.java | 36 +-
.../WMGetTriggersForResourePlanResponse.java | 36 +-
.../api/WMValidateResourcePlanResponse.java | 64 +-
.../gen-php/metastore/ThriftHiveMetastore.php | 1949 ++++--
.../src/gen/thrift/gen-php/metastore/Types.php | 1469 ++++-
.../hive_metastore/ThriftHiveMetastore-remote | 14 +
.../hive_metastore/ThriftHiveMetastore.py | 1397 ++--
.../gen/thrift/gen-py/hive_metastore/ttypes.py | 1023 ++-
.../gen/thrift/gen-rb/hive_metastore_types.rb | 136 +-
.../gen/thrift/gen-rb/thrift_hive_metastore.rb | 137 +
.../hadoop/hive/metastore/HiveMetaStore.java | 11 +
.../hive/metastore/HiveMetaStoreClient.java | 38 +-
.../hadoop/hive/metastore/IMetaStoreClient.java | 50 +-
.../hive/metastore/txn/CompactionInfo.java | 18 +-
.../metastore/txn/CompactionTxnHandler.java | 41 +-
.../hadoop/hive/metastore/txn/TxnDbUtil.java | 49 +-
.../hadoop/hive/metastore/txn/TxnHandler.java | 430 +-
.../hadoop/hive/metastore/txn/TxnStore.java | 33 +-
.../hadoop/hive/metastore/txn/TxnUtils.java | 129 +-
.../main/sql/derby/hive-schema-3.0.0.derby.sql | 27 +-
.../sql/derby/upgrade-2.3.0-to-3.0.0.derby.sql | 26 +
.../main/sql/mssql/hive-schema-3.0.0.mssql.sql | 27 +-
.../sql/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql | 26 +
.../main/sql/mysql/hive-schema-3.0.0.mysql.sql | 26 +-
.../sql/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql | 26 +
.../sql/oracle/hive-schema-3.0.0.oracle.sql | 27 +-
.../oracle/upgrade-2.3.0-to-3.0.0.oracle.sql | 26 +
.../sql/postgres/hive-schema-3.0.0.postgres.sql | 27 +-
.../upgrade-2.3.0-to-3.0.0.postgres.sql | 26 +
.../src/main/thrift/hive_metastore.thrift | 50 +-
.../hive/common/ValidCompactorTxnList.java | 89 -
.../hive/common/ValidCompactorWriteIdList.java | 93 +
.../hadoop/hive/common/ValidReadTxnList.java | 12 +-
.../hive/common/ValidReaderWriteIdList.java | 254 +
.../apache/hadoop/hive/common/ValidTxnList.java | 7 -
.../hadoop/hive/common/ValidTxnWriteIdList.java | 101 +
.../hadoop/hive/common/ValidWriteIdList.java | 118 +
.../hive/common/TestValidCompactorTxnList.java | 134 -
.../common/TestValidCompactorWriteIdList.java | 142 +
.../hive/common/TestValidReaderWriteIdList.java | 120 +
170 files changed, 21424 insertions(+), 8611 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java b/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java
index 57afbf8..de0c283 100644
--- a/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java
+++ b/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java
@@ -150,14 +150,15 @@ public final class JavaUtils {
public static String lockIdToString(long extLockId) {
return "lockid:" + extLockId;
}
- /**
- * Utility method for ACID to normalize logging info. Matches
- * org.apache.hadoop.hive.metastore.api.LockResponse#toString
- */
+
public static String txnIdToString(long txnId) {
return "txnid:" + txnId;
}
+ public static String writeIdToString(long writeId) {
+ return "writeid:" + writeId;
+ }
+
public static String txnIdsToString(List<Long> txnIds) {
return "Transactions requested to be aborted: " + txnIds.toString();
}
@@ -166,7 +167,7 @@ public final class JavaUtils {
// prevent instantiation
}
- public static Long extractTxnId(Path file) {
+ public static Long extractWriteId(Path file) {
String fileName = file.getName();
String[] parts = fileName.split("_", 4); // e.g. delta_0000001_0000001_0000 or base_0000022
if (parts.length < 2 || !(DELTA_PREFIX.equals(parts[0]) || BASE_PREFIX.equals(parts[0]))) {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index 169ddcb..0880a96 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -1094,7 +1094,7 @@ public class HiveConf extends Configuration {
HIVESCRIPTTRUNCATEENV("hive.script.operator.truncate.env", false,
"Truncate each environment variable for external script in scripts operator to 20KB (to fit system limits)"),
HIVESCRIPT_ENV_BLACKLIST("hive.script.operator.env.blacklist",
- "hive.txn.valid.txns,hive.script.operator.env.blacklist",
+ "hive.txn.valid.txns,hive.txn.tables.valid.writeids,hive.txn.valid.writeids,hive.script.operator.env.blacklist",
"Comma separated list of keys from the configuration file not to convert to environment " +
"variables when invoking the script operator"),
HIVE_STRICT_CHECKS_ORDERBY_NO_LIMIT("hive.strict.checks.orderby.no.limit", false,
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java
index 4ec10ad..924e233 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java
@@ -73,8 +73,8 @@ public abstract class AbstractRecordWriter implements RecordWriter {
private final AcidOutputFormat<?,?> outf;
private Object[] bucketFieldData; // Pre-allocated in constructor. Updated on each write.
- private Long curBatchMinTxnId;
- private Long curBatchMaxTxnId;
+ private Long curBatchMinWriteId;
+ private Long curBatchMaxWriteId;
private static final class TableWriterPair {
private final Table tbl;
@@ -143,7 +143,7 @@ public abstract class AbstractRecordWriter implements RecordWriter {
* used to tag error msgs to provied some breadcrumbs
*/
String getWatermark() {
- return partitionPath + " txnIds[" + curBatchMinTxnId + "," + curBatchMaxTxnId + "]";
+ return partitionPath + " writeIds[" + curBatchMinWriteId + "," + curBatchMaxWriteId + "]";
}
// return the column numbers of the bucketed columns
private List<Integer> getBucketColIDs(List<String> bucketCols, List<FieldSchema> cols) {
@@ -207,15 +207,15 @@ public abstract class AbstractRecordWriter implements RecordWriter {
/**
* Creates a new record updater for the new batch
- * @param minTxnId smallest Txnid in the batch
- * @param maxTxnID largest Txnid in the batch
+ * @param minWriteId smallest writeid in the batch
+ * @param maxWriteID largest writeid in the batch
* @throws StreamingIOFailure if failed to create record updater
*/
@Override
- public void newBatch(Long minTxnId, Long maxTxnID)
+ public void newBatch(Long minWriteId, Long maxWriteID)
throws StreamingIOFailure, SerializationError {
- curBatchMinTxnId = minTxnId;
- curBatchMaxTxnId = maxTxnID;
+ curBatchMinWriteId = minWriteId;
+ curBatchMaxWriteId = maxWriteID;
updaters = new ArrayList<RecordUpdater>(totalBuckets);
for (int bucket = 0; bucket < totalBuckets; bucket++) {
updaters.add(bucket, null);//so that get(i) returns null rather than ArrayOutOfBounds
@@ -265,7 +265,7 @@ public abstract class AbstractRecordWriter implements RecordWriter {
return bucketFieldData;
}
- private RecordUpdater createRecordUpdater(int bucketId, Long minTxnId, Long maxTxnID)
+ private RecordUpdater createRecordUpdater(int bucketId, Long minWriteId, Long maxWriteID)
throws IOException, SerializationError {
try {
// Initialize table properties from the table parameters. This is required because the table
@@ -278,8 +278,8 @@ public abstract class AbstractRecordWriter implements RecordWriter {
.inspector(getSerde().getObjectInspector())
.bucket(bucketId)
.tableProperties(tblProperties)
- .minimumTransactionId(minTxnId)
- .maximumTransactionId(maxTxnID)
+ .minimumWriteId(minWriteId)
+ .maximumWriteId(maxWriteID)
.statementId(-1)
.finalDestination(partitionPath));
} catch (SerDeException e) {
@@ -292,7 +292,7 @@ public abstract class AbstractRecordWriter implements RecordWriter {
RecordUpdater recordUpdater = updaters.get(bucketId);
if (recordUpdater == null) {
try {
- recordUpdater = createRecordUpdater(bucketId, curBatchMinTxnId, curBatchMaxTxnId);
+ recordUpdater = createRecordUpdater(bucketId, curBatchMinWriteId, curBatchMaxWriteId);
} catch (IOException e) {
String errMsg = "Failed creating RecordUpdater for " + getWatermark();
LOG.error(errMsg, e);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/DelimitedInputWriter.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/DelimitedInputWriter.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/DelimitedInputWriter.java
index 0a5492c..999c37e 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/DelimitedInputWriter.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/DelimitedInputWriter.java
@@ -255,16 +255,16 @@ public class DelimitedInputWriter extends AbstractRecordWriter {
}
@Override
- public void write(long transactionId, byte[] record)
+ public void write(long writeId, byte[] record)
throws SerializationError, StreamingIOFailure {
try {
byte[] orderedFields = reorderFields(record);
Object encodedRow = encode(orderedFields);
int bucket = getBucket(encodedRow);
- getRecordUpdater(bucket).insert(transactionId, encodedRow);
+ getRecordUpdater(bucket).insert(writeId, encodedRow);
} catch (IOException e) {
- throw new StreamingIOFailure("Error writing record in transaction ("
- + transactionId + ")", e);
+ throw new StreamingIOFailure("Error writing record in transaction write id ("
+ + writeId + ")", e);
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java
index 6793d09..90731dc 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java
@@ -40,6 +40,7 @@ import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
import org.apache.hadoop.hive.metastore.api.NoSuchTxnException;
import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.hive.metastore.api.TxnAbortedException;
+import org.apache.hadoop.hive.metastore.api.TxnToWriteId;
import org.apache.hadoop.hive.ql.DriverFactory;
import org.apache.hadoop.hive.ql.IDriver;
import org.apache.hadoop.hive.ql.session.SessionState;
@@ -551,7 +552,7 @@ public class HiveEndPoint {
private final IMetaStoreClient msClient;
private final IMetaStoreClient heartbeaterMSClient;
private final RecordWriter recordWriter;
- private final List<Long> txnIds;
+ private final List<TxnToWriteId> txnToWriteIds;
//volatile because heartbeat() may be in a "different" thread; updates of this are "piggybacking"
private volatile int currentTxnIndex = -1;
@@ -602,14 +603,19 @@ public class HiveEndPoint {
this.recordWriter = recordWriter;
this.agentInfo = agentInfo;
- txnIds = openTxnImpl(msClient, user, numTxns, ugi);
+ List<Long> txnIds = openTxnImpl(msClient, user, numTxns, ugi);
+ txnToWriteIds = allocateWriteIdsImpl(msClient, txnIds, ugi);
+ assert(txnToWriteIds.size() == numTxns);
+
txnStatus = new TxnState[numTxns];
for(int i = 0; i < txnStatus.length; i++) {
+ assert(txnToWriteIds.get(i).getTxnId() == txnIds.get(i));
txnStatus[i] = TxnState.OPEN;//Open matches Metastore state
}
-
this.state = TxnState.INACTIVE;
- recordWriter.newBatch(txnIds.get(0), txnIds.get(txnIds.size()-1));
+
+ // The Write Ids returned for the transaction batch is also sequential
+ recordWriter.newBatch(txnToWriteIds.get(0).getWriteId(), txnToWriteIds.get(numTxns-1).getWriteId());
success = true;
} catch (TException e) {
throw new TransactionBatchUnAvailable(endPt, e);
@@ -632,12 +638,26 @@ public class HiveEndPoint {
public Object run() throws Exception {
return msClient.openTxns(user, numTxns).getTxn_ids();
}
- }) ;
+ });
+ }
+
+ private List<TxnToWriteId> allocateWriteIdsImpl(final IMetaStoreClient msClient,
+ final List<Long> txnIds, UserGroupInformation ugi)
+ throws IOException, TException, InterruptedException {
+ if(ugi==null) {
+ return msClient.allocateTableWriteIdsBatch(txnIds, endPt.database, endPt.table);
+ }
+ return (List<TxnToWriteId>) ugi.doAs(new PrivilegedExceptionAction<Object>() {
+ @Override
+ public Object run() throws Exception {
+ return msClient.allocateTableWriteIdsBatch(txnIds, endPt.database, endPt.table);
+ }
+ });
}
@Override
public String toString() {
- if (txnIds==null || txnIds.isEmpty()) {
+ if (txnToWriteIds==null || txnToWriteIds.isEmpty()) {
return "{}";
}
StringBuilder sb = new StringBuilder(" TxnStatus[");
@@ -646,7 +666,11 @@ public class HiveEndPoint {
sb.append(state == null ? "N" : state);
}
sb.append("] LastUsed ").append(JavaUtils.txnIdToString(lastTxnUsed));
- return "TxnIds=[" + txnIds.get(0) + "..." + txnIds.get(txnIds.size()-1)
+ return "TxnId/WriteIds=[" + txnToWriteIds.get(0).getTxnId()
+ + "/" + txnToWriteIds.get(0).getWriteId()
+ + "..."
+ + txnToWriteIds.get(txnToWriteIds.size()-1).getTxnId()
+ + "/" + txnToWriteIds.get(txnToWriteIds.size()-1).getWriteId()
+ "] on endPoint = " + endPt + "; " + sb;
}
@@ -680,7 +704,8 @@ public class HiveEndPoint {
private void beginNextTransactionImpl() throws TransactionError {
state = TxnState.INACTIVE;//clear state from previous txn
- if ( currentTxnIndex + 1 >= txnIds.size() ) {
+
+ if ((currentTxnIndex + 1) >= txnToWriteIds.size()) {
throw new InvalidTrasactionState("No more transactions available in" +
" current batch for end point : " + endPt);
}
@@ -699,13 +724,25 @@ public class HiveEndPoint {
}
/**
- * Get Id of currently open transaction
+ * Get Id of currently open transaction.
* @return -1 if there is no open TX
*/
@Override
public Long getCurrentTxnId() {
- if(currentTxnIndex >= 0) {
- return txnIds.get(currentTxnIndex);
+ if (currentTxnIndex >= 0) {
+ return txnToWriteIds.get(currentTxnIndex).getTxnId();
+ }
+ return -1L;
+ }
+
+ /**
+ * Get Id of currently open transaction.
+ * @return -1 if there is no open TX
+ */
+ @Override
+ public Long getCurrentWriteId() {
+ if (currentTxnIndex >= 0) {
+ return txnToWriteIds.get(currentTxnIndex).getWriteId();
}
return -1L;
}
@@ -727,9 +764,9 @@ public class HiveEndPoint {
@Override
public int remainingTransactions() {
if (currentTxnIndex>=0) {
- return txnIds.size() - currentTxnIndex -1;
+ return txnToWriteIds.size() - currentTxnIndex -1;
}
- return txnIds.size();
+ return txnToWriteIds.size();
}
@@ -824,7 +861,7 @@ public class HiveEndPoint {
private void writeImpl(Collection<byte[]> records)
throws StreamingException {
for (byte[] record : records) {
- recordWriter.write(getCurrentTxnId(), record);
+ recordWriter.write(getCurrentWriteId(), record);
}
}
@@ -869,7 +906,7 @@ public class HiveEndPoint {
private void commitImpl() throws TransactionError, StreamingException {
try {
recordWriter.flush();
- msClient.commitTxn(txnIds.get(currentTxnIndex));
+ msClient.commitTxn(txnToWriteIds.get(currentTxnIndex).getTxnId());
state = TxnState.COMMITTED;
txnStatus[currentTxnIndex] = TxnState.COMMITTED;
} catch (NoSuchTxnException e) {
@@ -932,8 +969,8 @@ public class HiveEndPoint {
int minOpenTxnIndex = Math.max(currentTxnIndex +
(state == TxnState.ABORTED || state == TxnState.COMMITTED ? 1 : 0), 0);
for(currentTxnIndex = minOpenTxnIndex;
- currentTxnIndex < txnIds.size(); currentTxnIndex++) {
- msClient.rollbackTxn(txnIds.get(currentTxnIndex));
+ currentTxnIndex < txnToWriteIds.size(); currentTxnIndex++) {
+ msClient.rollbackTxn(txnToWriteIds.get(currentTxnIndex).getTxnId());
txnStatus[currentTxnIndex] = TxnState.ABORTED;
}
currentTxnIndex--;//since the loop left it == txnId.size()
@@ -960,15 +997,15 @@ public class HiveEndPoint {
if(isClosed) {
return;
}
- if(state != TxnState.OPEN && currentTxnIndex >= txnIds.size() - 1) {
+ if(state != TxnState.OPEN && currentTxnIndex >= txnToWriteIds.size() - 1) {
//here means last txn in the batch is resolved but the close() hasn't been called yet so
//there is nothing to heartbeat
return;
}
//if here after commit()/abort() but before next beginNextTransaction(), currentTxnIndex still
//points at the last txn which we don't want to heartbeat
- Long first = txnIds.get(state == TxnState.OPEN ? currentTxnIndex : currentTxnIndex + 1);
- Long last = txnIds.get(txnIds.size()-1);
+ Long first = txnToWriteIds.get(state == TxnState.OPEN ? currentTxnIndex : currentTxnIndex + 1).getTxnId();
+ Long last = txnToWriteIds.get(txnToWriteIds.size()-1).getTxnId();
try {
HeartbeatTxnRangeResponse resp = heartbeaterMSClient.heartbeatTxnRange(first, last);
if (!resp.getAborted().isEmpty() || !resp.getNosuch().isEmpty()) {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/RecordWriter.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/RecordWriter.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/RecordWriter.java
index cddb8de..a9bcd9f 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/RecordWriter.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/RecordWriter.java
@@ -23,21 +23,21 @@ public interface RecordWriter {
/** Writes using a hive RecordUpdater
*
- * @param transactionId the ID of the Txn in which the write occurs
+ * @param writeId the write ID of the table mapping to Txn in which the write occurs
* @param record the record to be written
*/
- public void write(long transactionId, byte[] record) throws StreamingException;
+ void write(long writeId, byte[] record) throws StreamingException;
/** Flush records from buffer. Invoked by TransactionBatch.commit() */
- public void flush() throws StreamingException;
+ void flush() throws StreamingException;
/** Clear bufferred writes. Invoked by TransactionBatch.abort() */
- public void clear() throws StreamingException;
+ void clear() throws StreamingException;
/** Acquire a new RecordUpdater. Invoked when
* StreamingConnection.fetchTransactionBatch() is called */
- public void newBatch(Long minTxnId, Long maxTxnID) throws StreamingException;
+ void newBatch(Long minWriteId, Long maxWriteID) throws StreamingException;
/** Close the RecordUpdater. Invoked by TransactionBatch.close() */
- public void closeBatch() throws StreamingException;
+ void closeBatch() throws StreamingException;
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictJsonWriter.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictJsonWriter.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictJsonWriter.java
index 357c537..4d92c55 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictJsonWriter.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictJsonWriter.java
@@ -117,15 +117,15 @@ public class StrictJsonWriter extends AbstractRecordWriter {
@Override
- public void write(long transactionId, byte[] record)
+ public void write(long writeId, byte[] record)
throws StreamingIOFailure, SerializationError {
try {
Object encodedRow = encode(record);
int bucket = getBucket(encodedRow);
- getRecordUpdater(bucket).insert(transactionId, encodedRow);
+ getRecordUpdater(bucket).insert(writeId, encodedRow);
} catch (IOException e) {
- throw new StreamingIOFailure("Error writing record in transaction("
- + transactionId + ")", e);
+ throw new StreamingIOFailure("Error writing record in transaction write id("
+ + writeId + ")", e);
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictRegexWriter.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictRegexWriter.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictRegexWriter.java
index 58db252..ae25662 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictRegexWriter.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/StrictRegexWriter.java
@@ -124,15 +124,15 @@ public class StrictRegexWriter extends AbstractRecordWriter {
@Override
- public void write(long transactionId, byte[] record)
+ public void write(long writeId, byte[] record)
throws StreamingIOFailure, SerializationError {
try {
Object encodedRow = encode(record);
int bucket = getBucket(encodedRow);
- getRecordUpdater(bucket).insert(transactionId, encodedRow);
+ getRecordUpdater(bucket).insert(writeId, encodedRow);
} catch (IOException e) {
- throw new StreamingIOFailure("Error writing record in transaction("
- + transactionId + ")", e);
+ throw new StreamingIOFailure("Error writing record in transaction write id("
+ + writeId + ")", e);
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/TransactionBatch.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/TransactionBatch.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/TransactionBatch.java
index e5ad475..1208377 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/TransactionBatch.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/TransactionBatch.java
@@ -46,73 +46,80 @@ public interface TransactionBatch {
}
/**
- * Activate the next available transaction in the current transaction batch
+ * Activate the next available transaction in the current transaction batch.
* @throws StreamingException if not able to switch to next Txn
* @throws InterruptedException if call in interrupted
*/
- public void beginNextTransaction() throws StreamingException, InterruptedException;
+ void beginNextTransaction() throws StreamingException, InterruptedException;
/**
- * Get Id of currently open transaction
+ * Get Id of currently open transaction.
* @return transaction id
*/
- public Long getCurrentTxnId();
+ Long getCurrentTxnId();
+
+
+ /**
+ * Get write Id mapping to currently open transaction.
+ * @return write id
+ */
+ Long getCurrentWriteId();
/**
- * get state of current transaction
+ * get state of current transaction.
*/
- public TxnState getCurrentTransactionState();
+ TxnState getCurrentTransactionState();
/**
- * Commit the currently open transaction
+ * Commit the currently open transaction.
* @throws StreamingException if there are errors committing
* @throws InterruptedException if call in interrupted
*/
- public void commit() throws StreamingException, InterruptedException;
+ void commit() throws StreamingException, InterruptedException;
/**
- * Abort the currently open transaction
+ * Abort the currently open transaction.
* @throws StreamingException if there are errors
* @throws InterruptedException if call in interrupted
*/
- public void abort() throws StreamingException, InterruptedException;
+ void abort() throws StreamingException, InterruptedException;
/**
* Remaining transactions are the ones that are not committed or aborted or open.
* Current open transaction is not considered part of remaining txns.
* @return number of transactions remaining this batch.
*/
- public int remainingTransactions();
+ int remainingTransactions();
/**
- * Write record using RecordWriter
+ * Write record using RecordWriter.
* @param record the data to be written
* @throws StreamingException if there are errors when writing
* @throws InterruptedException if call in interrupted
*/
- public void write(byte[] record) throws StreamingException, InterruptedException;
+ void write(byte[] record) throws StreamingException, InterruptedException;
/**
- * Write records using RecordWriter
+ * Write records using RecordWriter.
* @throws StreamingException if there are errors when writing
* @throws InterruptedException if call in interrupted
*/
- public void write(Collection<byte[]> records) throws StreamingException, InterruptedException;
+ void write(Collection<byte[]> records) throws StreamingException, InterruptedException;
/**
* Issues a heartbeat to hive metastore on the current and remaining txn ids
- * to keep them from expiring
+ * to keep them from expiring.
* @throws StreamingException if there are errors
*/
- public void heartbeat() throws StreamingException;
+ void heartbeat() throws StreamingException;
/**
- * Close the TransactionBatch
+ * Close the TransactionBatch.
* @throws StreamingException if there are errors closing batch
* @throws InterruptedException if call in interrupted
*/
- public void close() throws StreamingException, InterruptedException;
- public boolean isClosed();
+ void close() throws StreamingException, InterruptedException;
+ boolean isClosed();
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTable.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTable.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTable.java
index 5b371e3..50ba0c7 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTable.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTable.java
@@ -34,7 +34,7 @@ public class AcidTable implements Serializable {
private final String tableName;
private final boolean createPartitions;
private final TableType tableType;
- private long transactionId;
+ private long writeId;
private Table table;
@@ -48,10 +48,10 @@ public class AcidTable implements Serializable {
/**
* Returns {@code 0} until such a time that a {@link Transaction} has been acquired (when
* {@link MutatorClient#newTransaction()} exits), at which point this will return the
- * {@link Transaction#getTransactionId() transaction id}.
+ * write id.
*/
- public long getTransactionId() {
- return transactionId;
+ public long getWriteId() {
+ return writeId;
}
public String getDatabaseName() {
@@ -105,8 +105,8 @@ public class AcidTable implements Serializable {
return table;
}
- void setTransactionId(long transactionId) {
- this.transactionId = transactionId;
+ void setWriteId(long writeId) {
+ this.writeId = writeId;
}
void setTable(Table table) {
@@ -123,7 +123,7 @@ public class AcidTable implements Serializable {
public String toString() {
return "AcidTable [databaseName=" + databaseName + ", tableName=" + tableName + ", createPartitions="
+ createPartitions + ", tableType=" + tableType + ", outputFormatName=" + getOutputFormatName()
- + ", totalBuckets=" + getTotalBuckets() + ", transactionId=" + transactionId + "]";
+ + ", totalBuckets=" + getTotalBuckets() + ", writeId=" + writeId + "]";
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTableSerializer.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTableSerializer.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTableSerializer.java
index 32db5e3..98f9f40 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTableSerializer.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/AcidTableSerializer.java
@@ -54,10 +54,10 @@ public class AcidTableSerializer {
data.writeUTF(table.getDatabaseName());
data.writeUTF(table.getTableName());
data.writeBoolean(table.createPartitions());
- if (table.getTransactionId() <= 0) {
- LOG.warn("Transaction ID <= 0. The recipient is probably expecting a transaction ID.");
+ if (table.getWriteId() <= 0) {
+ LOG.warn("Write ID <= 0. The recipient is probably expecting a table write ID.");
}
- data.writeLong(table.getTransactionId());
+ data.writeLong(table.getWriteId());
data.writeByte(table.getTableType().getId());
Table metaTable = table.getTable();
@@ -91,12 +91,12 @@ public class AcidTableSerializer {
String databaseName = in.readUTF();
String tableName = in.readUTF();
boolean createPartitions = in.readBoolean();
- long transactionId = in.readLong();
+ long writeId = in.readLong();
TableType tableType = TableType.valueOf(in.readByte());
int thriftLength = in.readInt();
table = new AcidTable(databaseName, tableName, createPartitions, tableType);
- table.setTransactionId(transactionId);
+ table.setWriteId(writeId);
Table metaTable = null;
if (thriftLength > 0) {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/MutatorClient.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/MutatorClient.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/MutatorClient.java
index 645274e..8ba6cf6 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/MutatorClient.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/MutatorClient.java
@@ -29,6 +29,7 @@ import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.IMetaStoreClient;
import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
import org.apache.hadoop.hive.metastore.api.Table;
+import org.apache.hadoop.hive.ql.io.AcidUtils;
import org.apache.hive.hcatalog.streaming.mutate.client.lock.Lock;
import org.apache.hive.hcatalog.streaming.mutate.client.lock.LockFailureListener;
import org.apache.thrift.TException;
@@ -94,8 +95,22 @@ public class MutatorClient implements Closeable {
throw new TransactionException("Not connected - cannot create transaction.");
}
Transaction transaction = new Transaction(metaStoreClient, lockOptions);
+ long txnId = transaction.getTransactionId();
for (AcidTable table : tables) {
- table.setTransactionId(transaction.getTransactionId());
+ try {
+ table.setWriteId(metaStoreClient.allocateTableWriteId(txnId,
+ table.getDatabaseName(), table.getTableName()));
+ } catch (TException ex) {
+ try {
+ metaStoreClient.rollbackTxn(txnId);
+ } catch (TException e) {
+ LOG.warn("Allocation of write id failed for table {} and rollback transaction {} failed due to {}",
+ AcidUtils.getFullTableName(table.getDatabaseName(), table.getTableName()), txnId, e.getMessage());
+ }
+ throw new TransactionException("Unable to allocate table write ID for table "
+ + AcidUtils.getFullTableName(table.getDatabaseName(), table.getTableName())
+ + " under txn " + txnId, ex);
+ }
}
LOG.debug("Created transaction {}", transaction);
return transaction;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorCoordinator.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorCoordinator.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorCoordinator.java
index ae23153..5e804d7 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorCoordinator.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorCoordinator.java
@@ -98,11 +98,11 @@ public class MutatorCoordinator implements Closeable, Flushable {
}
/**
- * We expect records grouped by (partitionValues,bucketId) and ordered by (origTxnId,rowId).
+ * We expect records grouped by (partitionValues,bucketId) and ordered by (origWriteId,rowId).
*
* @throws BucketIdException The bucket ID in the {@link RecordIdentifier} of the record does not match that computed
* using the values in the record's bucketed columns.
- * @throws RecordSequenceException The record was submitted that was not in the correct ascending (origTxnId, rowId)
+ * @throws RecordSequenceException The record was submitted that was not in the correct ascending (origWriteId, rowId)
* sequence.
* @throws GroupRevisitedException If an event was submitted for a (partition, bucketId) combination that has already
* been closed.
@@ -120,11 +120,11 @@ public class MutatorCoordinator implements Closeable, Flushable {
}
/**
- * We expect records grouped by (partitionValues,bucketId) and ordered by (origTxnId,rowId).
+ * We expect records grouped by (partitionValues,bucketId) and ordered by (origWriteId,rowId).
*
* @throws BucketIdException The bucket ID in the {@link RecordIdentifier} of the record does not match that computed
* using the values in the record's bucketed columns.
- * @throws RecordSequenceException The record was submitted that was not in the correct ascending (origTxnId, rowId)
+ * @throws RecordSequenceException The record was submitted that was not in the correct ascending (origWriteId, rowId)
* sequence.
* @throws GroupRevisitedException If an event was submitted for a (partition, bucketId) combination that has already
* been closed.
@@ -142,11 +142,11 @@ public class MutatorCoordinator implements Closeable, Flushable {
}
/**
- * We expect records grouped by (partitionValues,bucketId) and ordered by (origTxnId,rowId).
+ * We expect records grouped by (partitionValues,bucketId) and ordered by (origWriteId,rowId).
*
* @throws BucketIdException The bucket ID in the {@link RecordIdentifier} of the record does not match that computed
* using the values in the record's bucketed columns.
- * @throws RecordSequenceException The record was submitted that was not in the correct ascending (origTxnId, rowId)
+ * @throws RecordSequenceException The record was submitted that was not in the correct ascending (origWriteId, rowId)
* sequence.
* @throws GroupRevisitedException If an event was submitted for a (partition, bucketId) combination that has already
* been closed.
@@ -229,9 +229,9 @@ public class MutatorCoordinator implements Closeable, Flushable {
sequenceValidator.reset();
if (deleteDeltaIfExists) {
// TODO: Should this be the concern of the mutator?
- deleteDeltaIfExists(newPartitionPath, table.getTransactionId(), newBucketId);
+ deleteDeltaIfExists(newPartitionPath, table.getWriteId(), newBucketId);
}
- mutator = mutatorFactory.newMutator(outputFormat, table.getTransactionId(), newPartitionPath, newBucketId);
+ mutator = mutatorFactory.newMutator(outputFormat, table.getWriteId(), newPartitionPath, newBucketId);
bucketId = newBucketId;
partitionValues = newPartitionValues;
partitionPath = newPartitionPath;
@@ -282,12 +282,12 @@ public class MutatorCoordinator implements Closeable, Flushable {
}
/* A delta may be present from a previous failed task attempt. */
- private void deleteDeltaIfExists(Path partitionPath, long transactionId, int bucketId) throws IOException {
+ private void deleteDeltaIfExists(Path partitionPath, long writeId, int bucketId) throws IOException {
Path deltaPath = AcidUtils.createFilename(partitionPath,
new AcidOutputFormat.Options(configuration)
.bucket(bucketId)
- .minimumTransactionId(transactionId)
- .maximumTransactionId(transactionId));
+ .minimumWriteId(writeId)
+ .maximumWriteId(writeId));
FileSystem fileSystem = deltaPath.getFileSystem(configuration);
if (fileSystem.exists(deltaPath)) {
LOG.info("Deleting existing delta path: {}", deltaPath);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorFactory.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorFactory.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorFactory.java
index 22cd9b7..da7558f 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorFactory.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorFactory.java
@@ -24,7 +24,8 @@ import org.apache.hadoop.hive.ql.io.AcidOutputFormat;
public interface MutatorFactory {
- Mutator newMutator(AcidOutputFormat<?, ?> outputFormat, long transactionId, Path partitionPath, int bucketId) throws IOException;
+ Mutator newMutator(AcidOutputFormat<?, ?> outputFormat, long writeId, Path partitionPath, int bucketId)
+ throws IOException;
RecordInspector newRecordInspector();
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorImpl.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorImpl.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorImpl.java
index 05cf8b7..84c477f 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorImpl.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/MutatorImpl.java
@@ -31,7 +31,7 @@ import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
/** Base {@link Mutator} implementation. Creates a suitable {@link RecordUpdater} and delegates mutation events. */
public class MutatorImpl implements Mutator {
- private final long transactionId;
+ private final long writeId;
private final Path partitionPath;
private final int bucketProperty;
private final Configuration configuration;
@@ -44,11 +44,11 @@ public class MutatorImpl implements Mutator {
* @throws IOException
*/
public MutatorImpl(Configuration configuration, int recordIdColumn, ObjectInspector objectInspector,
- AcidOutputFormat<?, ?> outputFormat, long transactionId, Path partitionPath, int bucketProperty) throws IOException {
+ AcidOutputFormat<?, ?> outputFormat, long writeId, Path partitionPath, int bucketProperty) throws IOException {
this.configuration = configuration;
this.recordIdColumn = recordIdColumn;
this.objectInspector = objectInspector;
- this.transactionId = transactionId;
+ this.writeId = writeId;
this.partitionPath = partitionPath;
this.bucketProperty = bucketProperty;
@@ -57,17 +57,17 @@ public class MutatorImpl implements Mutator {
@Override
public void insert(Object record) throws IOException {
- updater.insert(transactionId, record);
+ updater.insert(writeId, record);
}
@Override
public void update(Object record) throws IOException {
- updater.update(transactionId, record);
+ updater.update(writeId, record);
}
@Override
public void delete(Object record) throws IOException {
- updater.delete(transactionId, record);
+ updater.delete(writeId, record);
}
/**
@@ -89,7 +89,7 @@ public class MutatorImpl implements Mutator {
@Override
public String toString() {
- return "ObjectInspectorMutator [transactionId=" + transactionId + ", partitionPath=" + partitionPath
+ return "ObjectInspectorMutator [writeId=" + writeId + ", partitionPath=" + partitionPath
+ ", bucketId=" + bucketProperty + "]";
}
@@ -101,8 +101,8 @@ public class MutatorImpl implements Mutator {
new AcidOutputFormat.Options(configuration)
.inspector(objectInspector)
.bucket(bucketId)
- .minimumTransactionId(transactionId)
- .maximumTransactionId(transactionId)
+ .minimumWriteId(writeId)
+ .maximumWriteId(writeId)
.recordIdColumn(recordIdColumn)
.finalDestination(partitionPath)
.statementId(-1));
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/SequenceValidator.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/SequenceValidator.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/SequenceValidator.java
index 5cd8081..320b987 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/SequenceValidator.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/SequenceValidator.java
@@ -29,22 +29,22 @@ class SequenceValidator {
private static final Logger LOG = LoggerFactory.getLogger(SequenceValidator.class);
- private Long lastTxId;
+ private Long lastWriteId;
private Long lastRowId;
SequenceValidator() {
}
boolean isInSequence(RecordIdentifier recordIdentifier) {
- if (lastTxId != null && recordIdentifier.getTransactionId() < lastTxId) {
- LOG.debug("Non-sequential transaction ID. Expected >{}, recordIdentifier={}", lastTxId, recordIdentifier);
+ if (lastWriteId != null && recordIdentifier.getWriteId() < lastWriteId) {
+ LOG.debug("Non-sequential write ID. Expected >{}, recordIdentifier={}", lastWriteId, recordIdentifier);
return false;
- } else if (lastTxId != null && recordIdentifier.getTransactionId() == lastTxId && lastRowId != null
+ } else if (lastWriteId != null && recordIdentifier.getWriteId() == lastWriteId && lastRowId != null
&& recordIdentifier.getRowId() <= lastRowId) {
LOG.debug("Non-sequential row ID. Expected >{}, recordIdentifier={}", lastRowId, recordIdentifier);
return false;
}
- lastTxId = recordIdentifier.getTransactionId();
+ lastWriteId = recordIdentifier.getWriteId();
lastRowId = recordIdentifier.getRowId();
return true;
}
@@ -53,14 +53,14 @@ class SequenceValidator {
* Validator must be reset for each new partition and or bucket.
*/
void reset() {
- lastTxId = null;
+ lastWriteId = null;
lastRowId = null;
LOG.debug("reset");
}
@Override
public String toString() {
- return "SequenceValidator [lastTxId=" + lastTxId + ", lastRowId=" + lastRowId + "]";
+ return "SequenceValidator [lastWriteId=" + lastWriteId + ", lastRowId=" + lastRowId + "]";
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
index da2ca72..b042049 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
@@ -45,7 +45,7 @@ import org.apache.hadoop.fs.RawLocalFileSystem;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.hive.cli.CliSessionState;
import org.apache.hadoop.hive.common.JavaUtils;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.Validator;
import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
@@ -374,16 +374,16 @@ public class TestStreaming {
Assert.assertEquals("", 0, BucketCodec.determineVersion(536870912).decodeWriterId(536870912));
rs = queryTable(driver,"select ROW__ID, a, b, INPUT__FILE__NAME from default.streamingnobuckets order by ROW__ID");
- Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":16,\"bucketid\":536870912,\"rowid\":0}\tfoo\tbar"));
- Assert.assertTrue(rs.get(0), rs.get(0).endsWith("streamingnobuckets/delta_0000016_0000016_0000/bucket_00000"));
- Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":18,\"bucketid\":536870912,\"rowid\":0}\ta1\tb2"));
- Assert.assertTrue(rs.get(1), rs.get(1).endsWith("streamingnobuckets/delta_0000018_0000019/bucket_00000"));
- Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":18,\"bucketid\":536870912,\"rowid\":1}\ta3\tb4"));
- Assert.assertTrue(rs.get(2), rs.get(2).endsWith("streamingnobuckets/delta_0000018_0000019/bucket_00000"));
- Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":0}\ta5\tb6"));
- Assert.assertTrue(rs.get(3), rs.get(3).endsWith("streamingnobuckets/delta_0000018_0000019/bucket_00000"));
- Assert.assertTrue(rs.get(4), rs.get(4).startsWith("{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":1}\ta7\tb8"));
- Assert.assertTrue(rs.get(4), rs.get(4).endsWith("streamingnobuckets/delta_0000018_0000019/bucket_00000"));
+ Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\tfoo\tbar"));
+ Assert.assertTrue(rs.get(0), rs.get(0).endsWith("streamingnobuckets/delta_0000001_0000001_0000/bucket_00000"));
+ Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\ta1\tb2"));
+ Assert.assertTrue(rs.get(1), rs.get(1).endsWith("streamingnobuckets/delta_0000002_0000003/bucket_00000"));
+ Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\ta3\tb4"));
+ Assert.assertTrue(rs.get(2), rs.get(2).endsWith("streamingnobuckets/delta_0000002_0000003/bucket_00000"));
+ Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":0}\ta5\tb6"));
+ Assert.assertTrue(rs.get(3), rs.get(3).endsWith("streamingnobuckets/delta_0000002_0000003/bucket_00000"));
+ Assert.assertTrue(rs.get(4), rs.get(4).startsWith("{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":1}\ta7\tb8"));
+ Assert.assertTrue(rs.get(4), rs.get(4).endsWith("streamingnobuckets/delta_0000002_0000003/bucket_00000"));
queryTable(driver, "update default.streamingnobuckets set a=0, b=0 where a='a7'");
queryTable(driver, "delete from default.streamingnobuckets where a='a1'");
@@ -398,14 +398,14 @@ public class TestStreaming {
runWorker(conf);
rs = queryTable(driver,"select ROW__ID, a, b, INPUT__FILE__NAME from default.streamingnobuckets order by ROW__ID");
- Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":16,\"bucketid\":536870912,\"rowid\":0}\tfoo\tbar"));
- Assert.assertTrue(rs.get(0), rs.get(0).endsWith("streamingnobuckets/base_0000022/bucket_00000"));
- Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":18,\"bucketid\":536870912,\"rowid\":1}\ta3\tb4"));
- Assert.assertTrue(rs.get(1), rs.get(1).endsWith("streamingnobuckets/base_0000022/bucket_00000"));
- Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":19,\"bucketid\":536870912,\"rowid\":0}\ta5\tb6"));
- Assert.assertTrue(rs.get(2), rs.get(2).endsWith("streamingnobuckets/base_0000022/bucket_00000"));
- Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t0\t0"));
- Assert.assertTrue(rs.get(3), rs.get(3).endsWith("streamingnobuckets/base_0000022/bucket_00000"));
+ Assert.assertTrue(rs.get(0), rs.get(0).startsWith("{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\tfoo\tbar"));
+ Assert.assertTrue(rs.get(0), rs.get(0).endsWith("streamingnobuckets/base_0000005/bucket_00000"));
+ Assert.assertTrue(rs.get(1), rs.get(1).startsWith("{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":1}\ta3\tb4"));
+ Assert.assertTrue(rs.get(1), rs.get(1).endsWith("streamingnobuckets/base_0000005/bucket_00000"));
+ Assert.assertTrue(rs.get(2), rs.get(2).startsWith("{\"transactionid\":3,\"bucketid\":536870912,\"rowid\":0}\ta5\tb6"));
+ Assert.assertTrue(rs.get(2), rs.get(2).endsWith("streamingnobuckets/base_0000005/bucket_00000"));
+ Assert.assertTrue(rs.get(3), rs.get(3).startsWith("{\"transactionid\":4,\"bucketid\":536870912,\"rowid\":0}\t0\t0"));
+ Assert.assertTrue(rs.get(3), rs.get(3).endsWith("streamingnobuckets/base_0000005/bucket_00000"));
}
/**
@@ -540,8 +540,8 @@ public class TestStreaming {
@Deprecated
private void checkDataWritten(Path partitionPath, long minTxn, long maxTxn, int buckets, int numExpectedFiles,
String... records) throws Exception {
- ValidTxnList txns = msClient.getValidTxns();
- AcidUtils.Directory dir = AcidUtils.getAcidState(partitionPath, conf, txns);
+ ValidWriteIdList writeIds = msClient.getValidWriteIds(AcidUtils.getFullTableName(dbName, tblName));
+ AcidUtils.Directory dir = AcidUtils.getAcidState(partitionPath, conf, writeIds);
Assert.assertEquals(0, dir.getObsolete().size());
Assert.assertEquals(0, dir.getOriginalFiles().size());
List<AcidUtils.ParsedDelta> current = dir.getCurrentDirectories();
@@ -555,11 +555,11 @@ public class TestStreaming {
long min = Long.MAX_VALUE;
long max = Long.MIN_VALUE;
for (AcidUtils.ParsedDelta pd : current) {
- if (pd.getMaxTransaction() > max) {
- max = pd.getMaxTransaction();
+ if (pd.getMaxWriteId() > max) {
+ max = pd.getMaxWriteId();
}
- if (pd.getMinTransaction() < min) {
- min = pd.getMinTransaction();
+ if (pd.getMinWriteId() < min) {
+ min = pd.getMinWriteId();
}
}
Assert.assertEquals(minTxn, min);
@@ -573,7 +573,7 @@ public class TestStreaming {
job.set(IOConstants.SCHEMA_EVOLUTION_COLUMNS_TYPES, "bigint:string");
AcidUtils.setAcidOperationalProperties(job, true, null);
job.setBoolean(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL, true);
- job.set(ValidTxnList.VALID_TXNS_KEY, txns.toString());
+ job.set(ValidWriteIdList.VALID_WRITEIDS_KEY, writeIds.toString());
InputSplit[] splits = inf.getSplits(job, buckets);
Assert.assertEquals(numExpectedFiles, splits.length);
org.apache.hadoop.mapred.RecordReader<NullWritable, OrcStruct> rr =
@@ -593,7 +593,7 @@ public class TestStreaming {
*/
private void checkDataWritten2(Path partitionPath, long minTxn, long maxTxn, int numExpectedFiles,
String validationQuery, boolean vectorize, String... records) throws Exception {
- ValidTxnList txns = msClient.getValidTxns();
+ ValidWriteIdList txns = msClient.getValidWriteIds(AcidUtils.getFullTableName(dbName, tblName));
AcidUtils.Directory dir = AcidUtils.getAcidState(partitionPath, conf, txns);
Assert.assertEquals(0, dir.getObsolete().size());
Assert.assertEquals(0, dir.getOriginalFiles().size());
@@ -608,11 +608,11 @@ public class TestStreaming {
long min = Long.MAX_VALUE;
long max = Long.MIN_VALUE;
for (AcidUtils.ParsedDelta pd : current) {
- if (pd.getMaxTransaction() > max) {
- max = pd.getMaxTransaction();
+ if (pd.getMaxWriteId() > max) {
+ max = pd.getMaxWriteId();
}
- if (pd.getMinTransaction() < min) {
- min = pd.getMinTransaction();
+ if (pd.getMinWriteId() < min) {
+ min = pd.getMinWriteId();
}
}
Assert.assertEquals(minTxn, min);
@@ -637,8 +637,8 @@ public class TestStreaming {
}
private void checkNothingWritten(Path partitionPath) throws Exception {
- ValidTxnList txns = msClient.getValidTxns();
- AcidUtils.Directory dir = AcidUtils.getAcidState(partitionPath, conf, txns);
+ ValidWriteIdList writeIds = msClient.getValidWriteIds(AcidUtils.getFullTableName(dbName, tblName));
+ AcidUtils.Directory dir = AcidUtils.getAcidState(partitionPath, conf, writeIds);
Assert.assertEquals(0, dir.getObsolete().size());
Assert.assertEquals(0, dir.getOriginalFiles().size());
List<AcidUtils.ParsedDelta> current = dir.getCurrentDirectories();
@@ -877,7 +877,7 @@ public class TestStreaming {
txnBatch.write("1,Hello streaming".getBytes());
txnBatch.commit();
- checkDataWritten(partLoc, 15, 24, 1, 1, "{1, Hello streaming}");
+ checkDataWritten(partLoc, 1, 10, 1, 1, "{1, Hello streaming}");
Assert.assertEquals(TransactionBatch.TxnState.COMMITTED
, txnBatch.getCurrentTransactionState());
@@ -889,11 +889,11 @@ public class TestStreaming {
txnBatch.write("2,Welcome to streaming".getBytes());
// data should not be visible
- checkDataWritten(partLoc, 15, 24, 1, 1, "{1, Hello streaming}");
+ checkDataWritten(partLoc, 1, 10, 1, 1, "{1, Hello streaming}");
txnBatch.commit();
- checkDataWritten(partLoc, 15, 24, 1, 1, "{1, Hello streaming}",
+ checkDataWritten(partLoc, 1, 10, 1, 1, "{1, Hello streaming}",
"{2, Welcome to streaming}");
txnBatch.close();
@@ -945,7 +945,7 @@ public class TestStreaming {
txnBatch.write("1,Hello streaming".getBytes());
txnBatch.commit();
- checkDataWritten(partLoc, 15, 24, 1, 1, "{1, Hello streaming}");
+ checkDataWritten(partLoc, 1, 10, 1, 1, "{1, Hello streaming}");
Assert.assertEquals(TransactionBatch.TxnState.COMMITTED
, txnBatch.getCurrentTransactionState());
@@ -957,11 +957,11 @@ public class TestStreaming {
txnBatch.write("2,Welcome to streaming".getBytes());
// data should not be visible
- checkDataWritten(partLoc, 15, 24, 1, 1, "{1, Hello streaming}");
+ checkDataWritten(partLoc, 1, 10, 1, 1, "{1, Hello streaming}");
txnBatch.commit();
- checkDataWritten(partLoc, 15, 24, 1, 1, "{1, Hello streaming}",
+ checkDataWritten(partLoc, 1, 10, 1, 1, "{1, Hello streaming}",
"{2, Welcome to streaming}");
txnBatch.close();
@@ -1007,7 +1007,7 @@ public class TestStreaming {
txnBatch.write(rec1.getBytes());
txnBatch.commit();
- checkDataWritten(partLoc, 15, 24, 1, 1, "{1, Hello streaming}");
+ checkDataWritten(partLoc, 1, 10, 1, 1, "{1, Hello streaming}");
Assert.assertEquals(TransactionBatch.TxnState.COMMITTED
, txnBatch.getCurrentTransactionState());
@@ -1134,7 +1134,7 @@ public class TestStreaming {
txnBatch.write("2,Welcome to streaming".getBytes());
txnBatch.commit();
- checkDataWritten(partLoc, 14, 23, 1, 1, "{1, Hello streaming}",
+ checkDataWritten(partLoc, 1, 10, 1, 1, "{1, Hello streaming}",
"{2, Welcome to streaming}");
txnBatch.close();
@@ -1153,13 +1153,13 @@ public class TestStreaming {
txnBatch.write("1,Hello streaming".getBytes());
txnBatch.commit();
String validationQuery = "select id, msg from " + dbName + "." + tblName + " order by id, msg";
- checkDataWritten2(partLoc, 15, 24, 1, validationQuery, false, "1\tHello streaming");
+ checkDataWritten2(partLoc, 1, 10, 1, validationQuery, false, "1\tHello streaming");
txnBatch.beginNextTransaction();
txnBatch.write("2,Welcome to streaming".getBytes());
txnBatch.commit();
- checkDataWritten2(partLoc, 15, 24, 1, validationQuery, true, "1\tHello streaming",
+ checkDataWritten2(partLoc, 1, 10, 1, validationQuery, true, "1\tHello streaming",
"2\tWelcome to streaming");
txnBatch.close();
@@ -1170,14 +1170,14 @@ public class TestStreaming {
txnBatch.write("3,Hello streaming - once again".getBytes());
txnBatch.commit();
- checkDataWritten2(partLoc, 15, 40, 2, validationQuery, false, "1\tHello streaming",
+ checkDataWritten2(partLoc, 1, 20, 2, validationQuery, false, "1\tHello streaming",
"2\tWelcome to streaming", "3\tHello streaming - once again");
txnBatch.beginNextTransaction();
txnBatch.write("4,Welcome to streaming - once again".getBytes());
txnBatch.commit();
- checkDataWritten2(partLoc, 15, 40, 2, validationQuery, true, "1\tHello streaming",
+ checkDataWritten2(partLoc, 1, 20, 2, validationQuery, true, "1\tHello streaming",
"2\tWelcome to streaming", "3\tHello streaming - once again",
"4\tWelcome to streaming - once again");
@@ -1214,14 +1214,15 @@ public class TestStreaming {
txnBatch2.commit();
String validationQuery = "select id, msg from " + dbName + "." + tblName + " order by id, msg";
- checkDataWritten2(partLoc, 24, 33, 1,
+ checkDataWritten2(partLoc, 11, 20, 1,
validationQuery, true, "3\tHello streaming - once again");
txnBatch1.commit();
/*now both batches have committed (but not closed) so we for each primary file we expect a side
file to exist and indicate the true length of primary file*/
FileSystem fs = partLoc.getFileSystem(conf);
- AcidUtils.Directory dir = AcidUtils.getAcidState(partLoc, conf, msClient.getValidTxns());
+ AcidUtils.Directory dir = AcidUtils.getAcidState(partLoc, conf,
+ msClient.getValidWriteIds(AcidUtils.getFullTableName(dbName, tblName)));
for(AcidUtils.ParsedDelta pd : dir.getCurrentDirectories()) {
for(FileStatus stat : fs.listStatus(pd.getPath(), AcidUtils.bucketFileFilter)) {
Path lengthFile = OrcAcidUtils.getSideFile(stat.getPath());
@@ -1234,7 +1235,7 @@ public class TestStreaming {
Assert.assertTrue("", logicalLength == actualLength);
}
}
- checkDataWritten2(partLoc, 14, 33, 2,
+ checkDataWritten2(partLoc, 1, 20, 2,
validationQuery, false,"1\tHello streaming", "3\tHello streaming - once again");
txnBatch1.beginNextTransaction();
@@ -1246,7 +1247,7 @@ public class TestStreaming {
//so each of 2 deltas has 1 bucket0 and 1 bucket0_flush_length. Furthermore, each bucket0
//has now received more data(logically - it's buffered) but it is not yet committed.
//lets check that side files exist, etc
- dir = AcidUtils.getAcidState(partLoc, conf, msClient.getValidTxns());
+ dir = AcidUtils.getAcidState(partLoc, conf, msClient.getValidWriteIds(AcidUtils.getFullTableName(dbName, tblName)));
for(AcidUtils.ParsedDelta pd : dir.getCurrentDirectories()) {
for(FileStatus stat : fs.listStatus(pd.getPath(), AcidUtils.bucketFileFilter)) {
Path lengthFile = OrcAcidUtils.getSideFile(stat.getPath());
@@ -1259,19 +1260,19 @@ public class TestStreaming {
Assert.assertTrue("", logicalLength <= actualLength);
}
}
- checkDataWritten2(partLoc, 14, 33, 2,
+ checkDataWritten2(partLoc, 1, 20, 2,
validationQuery, true,"1\tHello streaming", "3\tHello streaming - once again");
txnBatch1.commit();
- checkDataWritten2(partLoc, 14, 33, 2,
+ checkDataWritten2(partLoc, 1, 20, 2,
validationQuery, false, "1\tHello streaming",
"2\tWelcome to streaming",
"3\tHello streaming - once again");
txnBatch2.commit();
- checkDataWritten2(partLoc, 14, 33, 2,
+ checkDataWritten2(partLoc, 1, 20, 2,
validationQuery, true, "1\tHello streaming",
"2\tWelcome to streaming",
"3\tHello streaming - once again",
@@ -2281,8 +2282,8 @@ public class TestStreaming {
this.delegate = delegate;
}
@Override
- public void write(long transactionId, byte[] record) throws StreamingException {
- delegate.write(transactionId, record);
+ public void write(long writeId, byte[] record) throws StreamingException {
+ delegate.write(writeId, record);
produceFault();
}
@Override
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/ReflectiveMutatorFactory.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/ReflectiveMutatorFactory.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/ReflectiveMutatorFactory.java
index e057da7..c05ddcf 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/ReflectiveMutatorFactory.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/ReflectiveMutatorFactory.java
@@ -49,9 +49,9 @@ public class ReflectiveMutatorFactory implements MutatorFactory {
}
@Override
- public Mutator newMutator(AcidOutputFormat<?, ?> outputFormat, long transactionId, Path partitionPath, int bucketId)
+ public Mutator newMutator(AcidOutputFormat<?, ?> outputFormat, long writeId, Path partitionPath, int bucketId)
throws IOException {
- return new MutatorImpl(configuration, recordIdColumn, objectInspector, outputFormat, transactionId, partitionPath,
+ return new MutatorImpl(configuration, recordIdColumn, objectInspector, outputFormat, writeId, partitionPath,
bucketId);
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/StreamingAssert.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/StreamingAssert.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/StreamingAssert.java
index 873cddf..2aa8674 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/StreamingAssert.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/StreamingAssert.java
@@ -25,7 +25,7 @@ import java.util.Collections;
import java.util.List;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.IMetaStoreClient;
import org.apache.hadoop.hive.metastore.api.MetaException;
@@ -71,7 +71,7 @@ public class StreamingAssert {
private List<String> partition;
private IMetaStoreClient metaStoreClient;
private Directory dir;
- private ValidTxnList txns;
+ private ValidWriteIdList writeIds;
private List<AcidUtils.ParsedDelta> currentDeltas;
private long min;
private long max;
@@ -83,9 +83,9 @@ public class StreamingAssert {
this.table = table;
this.partition = partition;
- txns = metaStoreClient.getValidTxns();
+ writeIds = metaStoreClient.getValidWriteIds(AcidUtils.getFullTableName(table.getDbName(), table.getTableName()));
partitionLocation = getPartitionLocation();
- dir = AcidUtils.getAcidState(partitionLocation, conf, txns);
+ dir = AcidUtils.getAcidState(partitionLocation, conf, writeIds);
assertEquals(0, dir.getObsolete().size());
assertEquals(0, dir.getOriginalFiles().size());
@@ -95,8 +95,8 @@ public class StreamingAssert {
System.out.println("Files found: ");
for (AcidUtils.ParsedDelta parsedDelta : currentDeltas) {
System.out.println(parsedDelta.getPath().toString());
- max = Math.max(parsedDelta.getMaxTransaction(), max);
- min = Math.min(parsedDelta.getMinTransaction(), min);
+ max = Math.max(parsedDelta.getMaxWriteId(), max);
+ min = Math.min(parsedDelta.getMinWriteId(), min);
}
}
@@ -145,7 +145,7 @@ public class StreamingAssert {
job.set(IOConstants.SCHEMA_EVOLUTION_COLUMNS_TYPES, "bigint:string");
AcidUtils.setAcidOperationalProperties(job, true, null);
job.setBoolean(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL, true);
- job.set(ValidTxnList.VALID_TXNS_KEY, txns.toString());
+ job.set(ValidWriteIdList.VALID_WRITEIDS_KEY, writeIds.toString());
InputSplit[] splits = inputFormat.getSplits(job, 1);
assertEquals(numSplitsExpected, splits.length);
@@ -160,7 +160,7 @@ public class StreamingAssert {
while (recordReader.next(key, value)) {
RecordIdentifier recordIdentifier = recordReader.getRecordIdentifier();
- Record record = new Record(new RecordIdentifier(recordIdentifier.getTransactionId(),
+ Record record = new Record(new RecordIdentifier(recordIdentifier.getWriteId(),
recordIdentifier.getBucketProperty(), recordIdentifier.getRowId()), value.toString());
System.out.println(record);
records.add(record);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestAcidTableSerializer.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestAcidTableSerializer.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestAcidTableSerializer.java
index 7876e8d..1523a10 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestAcidTableSerializer.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestAcidTableSerializer.java
@@ -45,7 +45,7 @@ public class TestAcidTableSerializer {
AcidTable acidTable = new AcidTable("db_1", "table_1", true, TableType.SINK);
acidTable.setTable(table);
- acidTable.setTransactionId(42L);
+ acidTable.setWriteId(42L);
String encoded = AcidTableSerializer.encode(acidTable);
System.out.println(encoded);
@@ -57,7 +57,7 @@ public class TestAcidTableSerializer {
assertThat(decoded.getOutputFormatName(), is("org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"));
assertThat(decoded.getTotalBuckets(), is(10));
assertThat(decoded.getQualifiedName(), is("DB_1.TABLE_1"));
- assertThat(decoded.getTransactionId(), is(42L));
+ assertThat(decoded.getWriteId(), is(42L));
assertThat(decoded.getTableType(), is(TableType.SINK));
assertThat(decoded.getTable(), is(table));
}
@@ -75,7 +75,7 @@ public class TestAcidTableSerializer {
assertThat(decoded.getOutputFormatName(), is(nullValue()));
assertThat(decoded.getTotalBuckets(), is(0));
assertThat(decoded.getQualifiedName(), is("DB_1.TABLE_1"));
- assertThat(decoded.getTransactionId(), is(0L));
+ assertThat(decoded.getWriteId(), is(0L));
assertThat(decoded.getTableType(), is(TableType.SINK));
assertThat(decoded.getTable(), is(nullValue()));
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestMutatorClient.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestMutatorClient.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestMutatorClient.java
index cfe3a96..91b90ed 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestMutatorClient.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/TestMutatorClient.java
@@ -48,6 +48,8 @@ import org.mockito.runners.MockitoJUnitRunner;
public class TestMutatorClient {
private static final long TRANSACTION_ID = 42L;
+ private static final long WRITE_ID1 = 78L;
+ private static final long WRITE_ID2 = 33L;
private static final String TABLE_NAME_1 = "TABLE_1";
private static final String TABLE_NAME_2 = "TABLE_2";
private static final String DB_NAME = "DB_1";
@@ -89,6 +91,8 @@ public class TestMutatorClient {
when(mockParameters.get("transactional")).thenReturn(Boolean.TRUE.toString());
when(mockMetaStoreClient.openTxn(USER)).thenReturn(TRANSACTION_ID);
+ when(mockMetaStoreClient.allocateTableWriteId(TRANSACTION_ID, DB_NAME, TABLE_NAME_1)).thenReturn(WRITE_ID1);
+ when(mockMetaStoreClient.allocateTableWriteId(TRANSACTION_ID, DB_NAME, TABLE_NAME_2)).thenReturn(WRITE_ID2);
client = new MutatorClient(mockMetaStoreClient, mockConfiguration, mockLockFailureListener, USER,
Collections.singletonList(TABLE_1));
@@ -110,13 +114,13 @@ public class TestMutatorClient {
assertThat(outTables.get(0).getTableName(), is(TABLE_NAME_1));
assertThat(outTables.get(0).getTotalBuckets(), is(2));
assertThat(outTables.get(0).getOutputFormatName(), is(OrcOutputFormat.class.getName()));
- assertThat(outTables.get(0).getTransactionId(), is(0L));
+ assertThat(outTables.get(0).getWriteId(), is(0L));
assertThat(outTables.get(0).getTable(), is(mockTable1));
assertThat(outTables.get(1).getDatabaseName(), is(DB_NAME));
assertThat(outTables.get(1).getTableName(), is(TABLE_NAME_2));
assertThat(outTables.get(1).getTotalBuckets(), is(2));
assertThat(outTables.get(1).getOutputFormatName(), is(OrcOutputFormat.class.getName()));
- assertThat(outTables.get(1).getTransactionId(), is(0L));
+ assertThat(outTables.get(1).getWriteId(), is(0L));
assertThat(outTables.get(1).getTable(), is(mockTable2));
}
@@ -179,8 +183,8 @@ public class TestMutatorClient {
assertThat(transaction.getTransactionId(), is(TRANSACTION_ID));
assertThat(transaction.getState(), is(TxnState.INACTIVE));
- assertThat(outTables.get(0).getTransactionId(), is(TRANSACTION_ID));
- assertThat(outTables.get(1).getTransactionId(), is(TRANSACTION_ID));
+ assertThat(outTables.get(0).getWriteId(), is(WRITE_ID1));
+ assertThat(outTables.get(1).getWriteId(), is(WRITE_ID2));
}
@Test
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorCoordinator.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorCoordinator.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorCoordinator.java
index d897477..fab56b3 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorCoordinator.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorCoordinator.java
@@ -49,7 +49,7 @@ public class TestMutatorCoordinator {
private static final List<String> UNPARTITIONED = Collections.<String> emptyList();
private static final List<String> PARTITION_B = Arrays.asList("B");
private static final List<String> PARTITION_A = Arrays.asList("A");
- private static final long TRANSACTION_ID = 2L;
+ private static final long WRITE_ID = 2L;
private static final int BUCKET_ID = 0;
private static final Path PATH_A = new Path("X");
private static final Path PATH_B = new Path("B");
@@ -84,7 +84,7 @@ public class TestMutatorCoordinator {
public void createCoordinator() throws Exception {
when(mockAcidTable.getOutputFormatName()).thenReturn(OrcOutputFormat.class.getName());
when(mockAcidTable.getTotalBuckets()).thenReturn(1);
- when(mockAcidTable.getTransactionId()).thenReturn(TRANSACTION_ID);
+ when(mockAcidTable.getWriteId()).thenReturn(WRITE_ID);
when(mockAcidTable.createPartitions()).thenReturn(true);
when(mockMutatorFactory.newRecordInspector()).thenReturn(mockRecordInspector);
when(mockMutatorFactory.newBucketIdResolver(anyInt())).thenReturn(mockBucketIdResolver);
@@ -104,7 +104,7 @@ public class TestMutatorCoordinator {
coordinator.insert(UNPARTITIONED, RECORD);
verify(mockPartitionHelper).createPartitionIfNotExists(UNPARTITIONED);
- verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_A), eq(BUCKET_ID));
+ verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_A), eq(BUCKET_ID));
verify(mockMutator).insert(RECORD);
}
@@ -115,7 +115,7 @@ public class TestMutatorCoordinator {
coordinator.insert(UNPARTITIONED, RECORD);
verify(mockPartitionHelper).createPartitionIfNotExists(UNPARTITIONED);
- verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_A), eq(BUCKET_ID));
+ verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_A), eq(BUCKET_ID));
verify(mockMutator, times(3)).insert(RECORD);
}
@@ -129,8 +129,8 @@ public class TestMutatorCoordinator {
verify(mockPartitionHelper).createPartitionIfNotExists(PARTITION_A);
verify(mockPartitionHelper).createPartitionIfNotExists(PARTITION_B);
- verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_A), eq(BUCKET_ID));
- verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_B), eq(BUCKET_ID));
+ verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_A), eq(BUCKET_ID));
+ verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_B), eq(BUCKET_ID));
verify(mockMutator, times(2)).insert(RECORD);
}
@@ -143,9 +143,9 @@ public class TestMutatorCoordinator {
coordinator.update(UNPARTITIONED, RECORD);
coordinator.delete(UNPARTITIONED, RECORD);
- verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_A), eq(BUCKET_ID));
+ verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_A), eq(BUCKET_ID));
verify(mockMutatorFactory)
- .newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_A), eq(BUCKET_ID + 1));
+ .newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_A), eq(BUCKET_ID + 1));
verify(mockMutator).update(RECORD);
verify(mockMutator).delete(RECORD);
}
@@ -166,11 +166,11 @@ public class TestMutatorCoordinator {
coordinator.update(PARTITION_B, RECORD); /* PbB1 */
verify(mockPartitionHelper).createPartitionIfNotExists(PARTITION_B);
- verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_A), eq(BUCKET_ID));
- verify(mockMutatorFactory, times(2)).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_B),
+ verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_A), eq(BUCKET_ID));
+ verify(mockMutatorFactory, times(2)).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_B),
eq(BUCKET_ID));
verify(mockMutatorFactory)
- .newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_B), eq(BUCKET_ID + 1));
+ .newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_B), eq(BUCKET_ID + 1));
verify(mockMutator, times(2)).update(RECORD);
verify(mockMutator).delete(RECORD);
verify(mockMutator).insert(RECORD);
@@ -197,7 +197,7 @@ public class TestMutatorCoordinator {
coordinator.delete(UNPARTITIONED, RECORD);
verify(mockPartitionHelper).createPartitionIfNotExists(UNPARTITIONED);
- verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_A), eq(BUCKET_ID));
+ verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_A), eq(BUCKET_ID));
verify(mockMutator).update(RECORD);
verify(mockMutator).delete(RECORD);
}
@@ -210,7 +210,7 @@ public class TestMutatorCoordinator {
coordinator.delete(UNPARTITIONED, RECORD);
verify(mockPartitionHelper).createPartitionIfNotExists(UNPARTITIONED);
- verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(TRANSACTION_ID), eq(PATH_A), eq(BUCKET_ID));
+ verify(mockMutatorFactory).newMutator(any(OrcOutputFormat.class), eq(WRITE_ID), eq(PATH_A), eq(BUCKET_ID));
verify(mockMutator).update(RECORD);
verify(mockMutator).delete(RECORD);
}
[20/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorImpl.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorImpl.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorImpl.java
index 2273e06..d2c89e5 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorImpl.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestMutatorImpl.java
@@ -49,7 +49,7 @@ public class TestMutatorImpl {
private static final int RECORD_ID_COLUMN = 2;
private static final int BUCKET_ID = 0;
private static final Path PATH = new Path("X");
- private static final long TRANSACTION_ID = 1L;
+ private static final long WRITE_ID = 1L;
@Mock
private AcidOutputFormat<?, ?> mockOutputFormat;
@@ -67,7 +67,7 @@ public class TestMutatorImpl {
@Before
public void injectMocks() throws IOException {
when(mockOutputFormat.getRecordUpdater(eq(PATH), any(Options.class))).thenReturn(mockRecordUpdater);
- mutator = new MutatorImpl(configuration, RECORD_ID_COLUMN, mockObjectInspector, mockOutputFormat, TRANSACTION_ID,
+ mutator = new MutatorImpl(configuration, RECORD_ID_COLUMN, mockObjectInspector, mockOutputFormat, WRITE_ID,
PATH, BUCKET_ID);
}
@@ -79,26 +79,26 @@ public class TestMutatorImpl {
assertThat(options.getConfiguration(), is((Configuration) configuration));
assertThat(options.getInspector(), is(mockObjectInspector));
assertThat(options.getRecordIdColumn(), is(RECORD_ID_COLUMN));
- assertThat(options.getMinimumTransactionId(), is(TRANSACTION_ID));
- assertThat(options.getMaximumTransactionId(), is(TRANSACTION_ID));
+ assertThat(options.getMinimumWriteId(), is(WRITE_ID));
+ assertThat(options.getMaximumWriteId(), is(WRITE_ID));
}
@Test
public void testInsertDelegates() throws IOException {
mutator.insert(RECORD);
- verify(mockRecordUpdater).insert(TRANSACTION_ID, RECORD);
+ verify(mockRecordUpdater).insert(WRITE_ID, RECORD);
}
@Test
public void testUpdateDelegates() throws IOException {
mutator.update(RECORD);
- verify(mockRecordUpdater).update(TRANSACTION_ID, RECORD);
+ verify(mockRecordUpdater).update(WRITE_ID, RECORD);
}
@Test
public void testDeleteDelegates() throws IOException {
mutator.delete(RECORD);
- verify(mockRecordUpdater).delete(TRANSACTION_ID, RECORD);
+ verify(mockRecordUpdater).delete(WRITE_ID, RECORD);
}
@Test
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestAcidOnTez.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestAcidOnTez.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestAcidOnTez.java
index 7967a24..53ae2c0 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestAcidOnTez.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestAcidOnTez.java
@@ -244,7 +244,7 @@ public class TestAcidOnTez {
{"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":0}\t1\t2", AbstractFileMergeOperator.UNION_SUDBIR_PREFIX + "1/000000_0"},
{"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":1}\t3\t4", AbstractFileMergeOperator.UNION_SUDBIR_PREFIX + "1/000000_0"},
{"{\"transactionid\":0,\"bucketid\":536870912,\"rowid\":3}\t9\t10", AbstractFileMergeOperator.UNION_SUDBIR_PREFIX + "2/000000_0"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t70\t80", "delta_0000021_0000021_0000/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t70\t80", "delta_0000001_0000001_0000/bucket_00000"}
};
Assert.assertEquals("Unexpected row count after update", expected2.length, rs.size());
//verify data and layout
@@ -256,7 +256,7 @@ public class TestAcidOnTez {
FileSystem fs = FileSystem.get(hiveConf);
FileStatus[] status = fs.listStatus(new Path(TEST_WAREHOUSE_DIR + "/" +
(Table.NONACIDNONBUCKET).toString().toLowerCase()), FileUtils.STAGING_DIR_PATH_FILTER);
- String[] expectedDelDelta = {"delete_delta_0000021_0000021_0000", "delete_delta_0000022_0000022_0000"};
+ String[] expectedDelDelta = {"delete_delta_0000001_0000001_0000", "delete_delta_0000002_0000002_0000"};
for(FileStatus stat : status) {
for(int i = 0; i < expectedDelDelta.length; i++) {
if(expectedDelDelta[i] != null && stat.getPath().toString().endsWith(expectedDelDelta[i])) {
@@ -285,7 +285,7 @@ public class TestAcidOnTez {
//check we have right delete delta files after minor compaction
status = fs.listStatus(new Path(TEST_WAREHOUSE_DIR + "/" +
(Table.NONACIDNONBUCKET).toString().toLowerCase()), FileUtils.STAGING_DIR_PATH_FILTER);
- String[] expectedDelDelta2 = {"delete_delta_0000021_0000021_0000", "delete_delta_0000022_0000022_0000", "delete_delta_0000021_0000022"};
+ String[] expectedDelDelta2 = {"delete_delta_0000001_0000001_0000", "delete_delta_0000002_0000002_0000", "delete_delta_0000001_0000002"};
for(FileStatus stat : status) {
for(int i = 0; i < expectedDelDelta2.length; i++) {
if(expectedDelDelta2[i] != null && stat.getPath().toString().endsWith(expectedDelDelta2[i])) {
@@ -309,7 +309,7 @@ public class TestAcidOnTez {
for(int i = 0; i < expected2.length; i++) {
Assert.assertTrue("Actual line " + i + " bc: " + rs.get(i), rs.get(i).startsWith(expected2[i][0]));
//everything is now in base/
- Assert.assertTrue("Actual line(file) " + i + " bc: " + rs.get(i), rs.get(i).endsWith("base_0000022/bucket_00000"));
+ Assert.assertTrue("Actual line(file) " + i + " bc: " + rs.get(i), rs.get(i).endsWith("base_0000002/bucket_00000"));
}
}
/**
@@ -453,12 +453,12 @@ public class TestAcidOnTez {
/*
* Expected result 0th entry is the RecordIdentifier + data. 1st entry file before compact*/
String expected[][] = {
- {"{\"transactionid\":18,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "/delta_0000018_0000018_0001/bucket_00000"},
- {"{\"transactionid\":18,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "/delta_0000018_0000018_0001/bucket_00000"},
- {"{\"transactionid\":18,\"bucketid\":536870913,\"rowid\":2}\t5\t6", "/delta_0000018_0000018_0001/bucket_00000"},
- {"{\"transactionid\":18,\"bucketid\":536870914,\"rowid\":0}\t9\t10", "/delta_0000018_0000018_0002/bucket_00000"},
- {"{\"transactionid\":18,\"bucketid\":536870914,\"rowid\":1}\t7\t8", "/delta_0000018_0000018_0002/bucket_00000"},
- {"{\"transactionid\":18,\"bucketid\":536870914,\"rowid\":2}\t5\t6", "/delta_0000018_0000018_0002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":2}\t5\t6", "/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870914,\"rowid\":0}\t9\t10", "/delta_0000001_0000001_0002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870914,\"rowid\":1}\t7\t8", "/delta_0000001_0000001_0002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870914,\"rowid\":2}\t5\t6", "/delta_0000001_0000001_0002/bucket_00000"},
};
Assert.assertEquals("Unexpected row count after ctas", expected.length, rs.size());
//verify data and layout
@@ -475,10 +475,10 @@ public class TestAcidOnTez {
LOG.warn(s);
}
String[][] expected2 = {
- {"{\"transactionid\":18,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "/delta_0000018_0000018_0001/bucket_00000"},
- {"{\"transactionid\":18,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "/delta_0000018_0000018_0001/bucket_00000"},
- {"{\"transactionid\":18,\"bucketid\":536870914,\"rowid\":0}\t9\t10", "/delta_0000018_0000018_0002/bucket_00000"},
- {"{\"transactionid\":20,\"bucketid\":536870912,\"rowid\":0}\t70\t80", "delta_0000020_0000020_0000/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870914,\"rowid\":0}\t9\t10", "/delta_0000001_0000001_0002/bucket_00000"},
+ {"{\"transactionid\":2,\"bucketid\":536870912,\"rowid\":0}\t70\t80", "/delta_0000002_0000002_0000/bucket_00000"}
};
Assert.assertEquals("Unexpected row count after update", expected2.length, rs.size());
//verify data and layout
@@ -490,7 +490,7 @@ public class TestAcidOnTez {
FileSystem fs = FileSystem.get(hiveConf);
FileStatus[] status = fs.listStatus(new Path(TEST_WAREHOUSE_DIR + "/" +
(Table.ACIDNOBUCKET).toString().toLowerCase()), FileUtils.STAGING_DIR_PATH_FILTER);
- String[] expectedDelDelta = {"delete_delta_0000020_0000020_0000", "delete_delta_0000021_0000021_0000"};
+ String[] expectedDelDelta = {"delete_delta_0000002_0000002_0000", "delete_delta_0000003_0000003_0000"};
for(FileStatus stat : status) {
for(int i = 0; i < expectedDelDelta.length; i++) {
if(expectedDelDelta[i] != null && stat.getPath().toString().endsWith(expectedDelDelta[i])) {
@@ -519,7 +519,7 @@ public class TestAcidOnTez {
//check we have right delete delta files after minor compaction
status = fs.listStatus(new Path(TEST_WAREHOUSE_DIR + "/" +
(Table.ACIDNOBUCKET).toString().toLowerCase()), FileUtils.STAGING_DIR_PATH_FILTER);
- String[] expectedDelDelta2 = { "delete_delta_0000020_0000020_0000", "delete_delta_0000021_0000021_0000", "delete_delta_0000018_0000021"};
+ String[] expectedDelDelta2 = { "delete_delta_0000002_0000002_0000", "delete_delta_0000003_0000003_0000", "delete_delta_0000001_0000003"};
for(FileStatus stat : status) {
for(int i = 0; i < expectedDelDelta2.length; i++) {
if(expectedDelDelta2[i] != null && stat.getPath().toString().endsWith(expectedDelDelta2[i])) {
@@ -543,7 +543,7 @@ public class TestAcidOnTez {
for(int i = 0; i < expected2.length; i++) {
Assert.assertTrue("Actual line " + i + " bc: " + rs.get(i), rs.get(i).startsWith(expected2[i][0]));
//everything is now in base/
- Assert.assertTrue("Actual line(file) " + i + " bc: " + rs.get(i), rs.get(i).endsWith("base_0000021/bucket_00000"));
+ Assert.assertTrue("Actual line(file) " + i + " bc: " + rs.get(i), rs.get(i).endsWith("base_0000003/bucket_00000"));
}
}
/**
@@ -638,17 +638,17 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree ~/dev/hiverwgit/itests/h
├── HIVE_UNION_SUBDIR_1
│  └── 000000_0
│  ├── _orc_acid_version
- │  └── delta_0000019_0000019_0001
+ │  └── delta_0000001_0000001_0001
│  └── bucket_00000
├── HIVE_UNION_SUBDIR_2
│  └── 000000_0
│  ├── _orc_acid_version
- │  └── delta_0000019_0000019_0002
+ │  └── delta_0000001_0000001_0002
│  └── bucket_00000
└── HIVE_UNION_SUBDIR_3
└── 000000_0
├── _orc_acid_version
- └── delta_0000019_0000019_0003
+ └── delta_0000001_0000001_0003
└── bucket_00000
10 directories, 6 files */
@@ -660,11 +660,11 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree ~/dev/hiverwgit/itests/h
}
String[][] expected2 = {
- {"{\"transactionid\":19,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "warehouse/t/delta_0000019_0000019_0001/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "warehouse/t/delta_0000019_0000019_0001/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870914,\"rowid\":0}\t5\t6", "warehouse/t/delta_0000019_0000019_0002/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870914,\"rowid\":1}\t7\t8", "warehouse/t/delta_0000019_0000019_0002/bucket_00000"},
- {"{\"transactionid\":19,\"bucketid\":536870915,\"rowid\":0}\t9\t10", "warehouse/t/delta_0000019_0000019_0003/bucket_00000"}
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "warehouse/t/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "warehouse/t/delta_0000001_0000001_0001/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870914,\"rowid\":0}\t5\t6", "warehouse/t/delta_0000001_0000001_0002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870914,\"rowid\":1}\t7\t8", "warehouse/t/delta_0000001_0000001_0002/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536870915,\"rowid\":0}\t9\t10", "warehouse/t/delta_0000001_0000001_0003/bucket_00000"}
};
Assert.assertEquals("Unexpected row count", expected2.length, rs.size());
for(int i = 0; i < expected2.length; i++) {
@@ -688,11 +688,11 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree ~/dev/hiverwgit/itests/h
└── -ext-10000
├── 000000_0
│  ├── _orc_acid_version
- │  └── delta_0000021_0000021_0000
+ │  └── delta_0000001_0000001_0000
│  └── bucket_00000
└── 000001_0
├── _orc_acid_version
- └── delta_0000021_0000021_0000
+ └── delta_0000001_0000001_0000
└── bucket_00001
5 directories, 4 files
@@ -705,11 +705,11 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree ~/dev/hiverwgit/itests/h
LOG.warn(s);
}
String[][] expected2 = {
- {"{\"transactionid\":21,\"bucketid\":536936448,\"rowid\":0}\t1\t2", "warehouse/t/delta_0000021_0000021_0000/bucket_00001"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":0}\t2\t4", "warehouse/t/delta_0000021_0000021_0000/bucket_00000"},
- {"{\"transactionid\":21,\"bucketid\":536936448,\"rowid\":2}\t5\t6", "warehouse/t/delta_0000021_0000021_0000/bucket_00001"},
- {"{\"transactionid\":21,\"bucketid\":536870912,\"rowid\":1}\t6\t8", "warehouse/t/delta_0000021_0000021_0000/bucket_00000"},
- {"{\"transactionid\":21,\"bucketid\":536936448,\"rowid\":1}\t9\t10", "warehouse/t/delta_0000021_0000021_0000/bucket_00001"}
+ {"{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t2", "warehouse/t/delta_0000001_0000001_0000/bucket_00001"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":0}\t2\t4", "warehouse/t/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":2}\t5\t6", "warehouse/t/delta_0000001_0000001_0000/bucket_00001"},
+ {"{\"transactionid\":1,\"bucketid\":536870912,\"rowid\":1}\t6\t8", "warehouse/t/delta_0000001_0000001_0000/bucket_00000"},
+ {"{\"transactionid\":1,\"bucketid\":536936448,\"rowid\":1}\t9\t10", "warehouse/t/delta_0000001_0000001_0000/bucket_00001"}
};
Assert.assertEquals("Unexpected row count", expected2.length, rs.size());
for(int i = 0; i < expected2.length; i++) {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java
index 6dd7305..0410fb0 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java
@@ -36,7 +36,7 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.cli.CliSessionState;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
import org.apache.hadoop.hive.metastore.IMetaStoreClient;
@@ -661,17 +661,18 @@ public class TestCompactor {
Path resultFile = null;
for (int i = 0; i < names.length; i++) {
names[i] = stat[i].getPath().getName();
- if (names[i].equals("delta_0000003_0000006")) {
+ if (names[i].equals("delta_0000001_0000004")) {
resultFile = stat[i].getPath();
}
}
Arrays.sort(names);
- String[] expected = new String[]{"delta_0000003_0000004",
- "delta_0000003_0000006", "delta_0000005_0000006", "delta_0000007_0000008"};
+ String[] expected = new String[]{"delta_0000001_0000002",
+ "delta_0000001_0000004", "delta_0000003_0000004", "delta_0000005_0000006"};
if (!Arrays.deepEquals(expected, names)) {
Assert.fail("Expected: " + Arrays.toString(expected) + ", found: " + Arrays.toString(names));
}
- checkExpectedTxnsPresent(null, new Path[]{resultFile},columnNamesProperty, columnTypesProperty, 0, 3L, 6L, 1);
+ checkExpectedTxnsPresent(null, new Path[]{resultFile}, columnNamesProperty, columnTypesProperty,
+ 0, 1L, 4L, 1);
} finally {
connection.close();
@@ -721,11 +722,11 @@ public class TestCompactor {
FileStatus[] stat =
fs.listStatus(new Path(table.getSd().getLocation()), AcidUtils.baseFileFilter);
if (1 != stat.length) {
- Assert.fail("Expecting 1 file \"base_0000006\" and found " + stat.length + " files " + Arrays.toString(stat));
+ Assert.fail("Expecting 1 file \"base_0000004\" and found " + stat.length + " files " + Arrays.toString(stat));
}
String name = stat[0].getPath().getName();
- Assert.assertEquals(name, "base_0000006");
- checkExpectedTxnsPresent(stat[0].getPath(), null, columnNamesProperty, columnTypesProperty, 0, 3L, 6L, 1);
+ Assert.assertEquals(name, "base_0000004");
+ checkExpectedTxnsPresent(stat[0].getPath(), null, columnNamesProperty, columnTypesProperty, 0, 1L, 4L, 1);
} finally {
connection.close();
}
@@ -781,17 +782,17 @@ public class TestCompactor {
Path resultDelta = null;
for (int i = 0; i < names.length; i++) {
names[i] = stat[i].getPath().getName();
- if (names[i].equals("delta_0000003_0000006")) {
+ if (names[i].equals("delta_0000001_0000004")) {
resultDelta = stat[i].getPath();
}
}
Arrays.sort(names);
- String[] expected = new String[]{"delta_0000003_0000004",
- "delta_0000003_0000006", "delta_0000005_0000006"};
+ String[] expected = new String[]{"delta_0000001_0000002",
+ "delta_0000001_0000004", "delta_0000003_0000004"};
if (!Arrays.deepEquals(expected, names)) {
Assert.fail("Expected: " + Arrays.toString(expected) + ", found: " + Arrays.toString(names));
}
- checkExpectedTxnsPresent(null, new Path[]{resultDelta}, columnNamesProperty, columnTypesProperty, 0, 3L, 6L, 1);
+ checkExpectedTxnsPresent(null, new Path[]{resultDelta}, columnNamesProperty, columnTypesProperty, 0, 1L, 4L, 1);
} finally {
connection.close();
}
@@ -847,13 +848,13 @@ public class TestCompactor {
Assert.fail("majorCompactAfterAbort FileStatus[] stat " + Arrays.toString(stat));
}
if (1 != stat.length) {
- Assert.fail("Expecting 1 file \"base_0000006\" and found " + stat.length + " files " + Arrays.toString(stat));
+ Assert.fail("Expecting 1 file \"base_0000004\" and found " + stat.length + " files " + Arrays.toString(stat));
}
String name = stat[0].getPath().getName();
- if (!name.equals("base_0000006")) {
- Assert.fail("majorCompactAfterAbort name " + name + " not equals to base_0000006");
+ if (!name.equals("base_0000004")) {
+ Assert.fail("majorCompactAfterAbort name " + name + " not equals to base_0000004");
}
- checkExpectedTxnsPresent(stat[0].getPath(), null, columnNamesProperty, columnTypesProperty, 0, 3L, 6L, 1);
+ checkExpectedTxnsPresent(stat[0].getPath(), null, columnNamesProperty, columnTypesProperty, 0, 1L, 4L, 1);
} finally {
connection.close();
}
@@ -902,11 +903,11 @@ public class TestCompactor {
FileStatus[] stat =
fs.listStatus(new Path(table.getSd().getLocation()), AcidUtils.baseFileFilter);
if (1 != stat.length) {
- Assert.fail("Expecting 1 file \"base_0000006\" and found " + stat.length + " files " + Arrays.toString(stat));
+ Assert.fail("Expecting 1 file \"base_0000004\" and found " + stat.length + " files " + Arrays.toString(stat));
}
String name = stat[0].getPath().getName();
- Assert.assertEquals(name, "base_0000006");
- checkExpectedTxnsPresent(stat[0].getPath(), null, columnNamesProperty, columnTypesProperty, 0, 3L, 6L, 2);
+ Assert.assertEquals(name, "base_0000004");
+ checkExpectedTxnsPresent(stat[0].getPath(), null, columnNamesProperty, columnTypesProperty, 0, 1L, 4L, 2);
} finally {
connection.close();
}
@@ -960,16 +961,17 @@ public class TestCompactor {
Path minorCompactedDelta = null;
for (int i = 0; i < deltas.length; i++) {
deltas[i] = stat[i].getPath().getName();
- if (deltas[i].equals("delta_0000003_0000005")) {
+ if (deltas[i].equals("delta_0000001_0000003")) {
minorCompactedDelta = stat[i].getPath();
}
}
Arrays.sort(deltas);
- String[] expectedDeltas = new String[]{"delta_0000003_0000003_0000", "delta_0000003_0000005", "delta_0000004_0000004_0000"};
+ String[] expectedDeltas = new String[]{"delta_0000001_0000001_0000", "delta_0000001_0000003", "delta_0000002_0000002_0000"};
if (!Arrays.deepEquals(expectedDeltas, deltas)) {
Assert.fail("Expected: " + Arrays.toString(expectedDeltas) + ", found: " + Arrays.toString(deltas));
}
- checkExpectedTxnsPresent(null, new Path[]{minorCompactedDelta}, columnNamesProperty, columnTypesProperty, 0, 3L, 4L, 1);
+ checkExpectedTxnsPresent(null, new Path[]{minorCompactedDelta}, columnNamesProperty, columnTypesProperty,
+ 0, 1L, 2L, 1);
// Verify that we have got correct set of delete_deltas.
FileStatus[] deleteDeltaStat =
@@ -978,16 +980,17 @@ public class TestCompactor {
Path minorCompactedDeleteDelta = null;
for (int i = 0; i < deleteDeltas.length; i++) {
deleteDeltas[i] = deleteDeltaStat[i].getPath().getName();
- if (deleteDeltas[i].equals("delete_delta_0000003_0000005")) {
+ if (deleteDeltas[i].equals("delete_delta_0000001_0000003")) {
minorCompactedDeleteDelta = deleteDeltaStat[i].getPath();
}
}
Arrays.sort(deleteDeltas);
- String[] expectedDeleteDeltas = new String[]{"delete_delta_0000003_0000005", "delete_delta_0000005_0000005_0000"};
+ String[] expectedDeleteDeltas = new String[]{"delete_delta_0000001_0000003", "delete_delta_0000003_0000003_0000"};
if (!Arrays.deepEquals(expectedDeleteDeltas, deleteDeltas)) {
Assert.fail("Expected: " + Arrays.toString(expectedDeleteDeltas) + ", found: " + Arrays.toString(deleteDeltas));
}
- checkExpectedTxnsPresent(null, new Path[]{minorCompactedDeleteDelta}, columnNamesProperty, columnTypesProperty, 0, 4L, 4L, 1);
+ checkExpectedTxnsPresent(null, new Path[]{minorCompactedDeleteDelta}, columnNamesProperty, columnTypesProperty,
+ 0, 2L, 2L, 1);
}
@Test
@@ -1037,16 +1040,17 @@ public class TestCompactor {
Path minorCompactedDelta = null;
for (int i = 0; i < deltas.length; i++) {
deltas[i] = stat[i].getPath().getName();
- if (deltas[i].equals("delta_0000003_0000004")) {
+ if (deltas[i].equals("delta_0000001_0000002")) {
minorCompactedDelta = stat[i].getPath();
}
}
Arrays.sort(deltas);
- String[] expectedDeltas = new String[]{"delta_0000003_0000003_0000", "delta_0000003_0000004", "delta_0000004_0000004_0000"};
+ String[] expectedDeltas = new String[]{"delta_0000001_0000001_0000", "delta_0000001_0000002", "delta_0000002_0000002_0000"};
if (!Arrays.deepEquals(expectedDeltas, deltas)) {
Assert.fail("Expected: " + Arrays.toString(expectedDeltas) + ", found: " + Arrays.toString(deltas));
}
- checkExpectedTxnsPresent(null, new Path[]{minorCompactedDelta}, columnNamesProperty, columnTypesProperty, 0, 3L, 4L, 1);
+ checkExpectedTxnsPresent(null, new Path[]{minorCompactedDelta}, columnNamesProperty, columnTypesProperty,
+ 0, 1L, 2L, 1);
// Verify that we have got correct set of delete_deltas.
FileStatus[] deleteDeltaStat =
@@ -1055,12 +1059,12 @@ public class TestCompactor {
Path minorCompactedDeleteDelta = null;
for (int i = 0; i < deleteDeltas.length; i++) {
deleteDeltas[i] = deleteDeltaStat[i].getPath().getName();
- if (deleteDeltas[i].equals("delete_delta_0000003_0000004")) {
+ if (deleteDeltas[i].equals("delete_delta_0000001_0000002")) {
minorCompactedDeleteDelta = deleteDeltaStat[i].getPath();
}
}
Arrays.sort(deleteDeltas);
- String[] expectedDeleteDeltas = new String[]{"delete_delta_0000003_0000004"};
+ String[] expectedDeleteDeltas = new String[]{"delete_delta_0000001_0000002"};
if (!Arrays.deepEquals(expectedDeleteDeltas, deleteDeltas)) {
Assert.fail("Expected: " + Arrays.toString(expectedDeleteDeltas) + ", found: " + Arrays.toString(deleteDeltas));
}
@@ -1114,17 +1118,18 @@ public class TestCompactor {
Path resultFile = null;
for (int i = 0; i < names.length; i++) {
names[i] = stat[i].getPath().getName();
- if (names[i].equals("delta_0000003_0000006")) {
+ if (names[i].equals("delta_0000001_0000004")) {
resultFile = stat[i].getPath();
}
}
Arrays.sort(names);
- String[] expected = new String[]{"delta_0000003_0000004",
- "delta_0000003_0000006", "delta_0000005_0000006", "delta_0000007_0000008"};
+ String[] expected = new String[]{"delta_0000001_0000002",
+ "delta_0000001_0000004", "delta_0000003_0000004", "delta_0000005_0000006"};
if (!Arrays.deepEquals(expected, names)) {
Assert.fail("Expected: " + Arrays.toString(expected) + ", found: " + Arrays.toString(names));
}
- checkExpectedTxnsPresent(null, new Path[]{resultFile},columnNamesProperty, columnTypesProperty, 0, 3L, 6L, 1);
+ checkExpectedTxnsPresent(null, new Path[]{resultFile}, columnNamesProperty, columnTypesProperty,
+ 0, 1L, 4L, 1);
// Verify that we have got correct set of delete_deltas also
FileStatus[] deleteDeltaStat =
@@ -1133,12 +1138,12 @@ public class TestCompactor {
Path minorCompactedDeleteDelta = null;
for (int i = 0; i < deleteDeltas.length; i++) {
deleteDeltas[i] = deleteDeltaStat[i].getPath().getName();
- if (deleteDeltas[i].equals("delete_delta_0000003_0000006")) {
+ if (deleteDeltas[i].equals("delete_delta_0000001_0000004")) {
minorCompactedDeleteDelta = deleteDeltaStat[i].getPath();
}
}
Arrays.sort(deleteDeltas);
- String[] expectedDeleteDeltas = new String[]{"delete_delta_0000003_0000006"};
+ String[] expectedDeleteDeltas = new String[]{"delete_delta_0000001_0000004"};
if (!Arrays.deepEquals(expectedDeleteDeltas, deleteDeltas)) {
Assert.fail("Expected: " + Arrays.toString(expectedDeleteDeltas) + ", found: " + Arrays.toString(deleteDeltas));
}
@@ -1330,14 +1335,19 @@ public class TestCompactor {
private void checkExpectedTxnsPresent(Path base, Path[] deltas, String columnNamesProperty,
String columnTypesProperty, int bucket, long min, long max, int numBuckets)
throws IOException {
- ValidTxnList txnList = new ValidTxnList() {
+ ValidWriteIdList writeIdList = new ValidWriteIdList() {
@Override
- public boolean isTxnValid(long txnid) {
+ public String getTableName() {
+ return "AcidTable";
+ }
+
+ @Override
+ public boolean isWriteIdValid(long writeid) {
return true;
}
@Override
- public RangeResponse isTxnRangeValid(long minTxnId, long maxTxnId) {
+ public RangeResponse isWriteIdRangeValid(long minWriteId, long maxWriteId) {
return RangeResponse.ALL;
}
@@ -1352,7 +1362,9 @@ public class TestCompactor {
}
@Override
- public Long getMinOpenTxn() { return null; }
+ public Long getMinOpenWriteId() {
+ return null;
+ }
@Override
public long getHighWatermark() {
@@ -1360,7 +1372,7 @@ public class TestCompactor {
}
@Override
- public long[] getInvalidTransactions() {
+ public long[] getInvalidWriteIds() {
return new long[0];
}
@Override
@@ -1369,12 +1381,12 @@ public class TestCompactor {
}
@Override
- public boolean isTxnAborted(long txnid) {
+ public boolean isWriteIdAborted(long txnid) {
return true;
}
@Override
- public RangeResponse isTxnRangeAborted(long minTxnId, long maxTxnId) {
+ public RangeResponse isWriteIdRangeAborted(long minWriteId, long maxWriteId) {
return RangeResponse.ALL;
}
};
@@ -1387,18 +1399,18 @@ public class TestCompactor {
conf.set(hive_metastoreConstants.BUCKET_COUNT, Integer.toString(numBuckets));
HiveConf.setBoolVar(conf, HiveConf.ConfVars.HIVE_TRANSACTIONAL_TABLE_SCAN, true);
AcidInputFormat.RawReader<OrcStruct> reader =
- aif.getRawReader(conf, true, bucket, txnList, base, deltas);
+ aif.getRawReader(conf, true, bucket, writeIdList, base, deltas);
RecordIdentifier identifier = reader.createKey();
OrcStruct value = reader.createValue();
long currentTxn = min;
boolean seenCurrentTxn = false;
while (reader.next(identifier, value)) {
if (!seenCurrentTxn) {
- Assert.assertEquals(currentTxn, identifier.getTransactionId());
+ Assert.assertEquals(currentTxn, identifier.getWriteId());
seenCurrentTxn = true;
}
- if (currentTxn != identifier.getTransactionId()) {
- Assert.assertEquals(currentTxn + 1, identifier.getTransactionId());
+ if (currentTxn != identifier.getWriteId()) {
+ Assert.assertEquals(currentTxn + 1, identifier.getWriteId());
currentTxn++;
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/metastore/scripts/upgrade/derby/044-HIVE-16997.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/044-HIVE-16997.derby.sql b/metastore/scripts/upgrade/derby/044-HIVE-16997.derby.sql
index ae9649c..2c2177b 100644
--- a/metastore/scripts/upgrade/derby/044-HIVE-16997.derby.sql
+++ b/metastore/scripts/upgrade/derby/044-HIVE-16997.derby.sql
@@ -1,2 +1 @@
ALTER TABLE "APP"."PART_COL_STATS" ADD COLUMN "BIT_VECTOR" BLOB;
-ALTER TABLE "APP"."TAB_COL_STATS" ADD COLUMN "BIT_VECTOR" BLOB;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/metastore/scripts/upgrade/derby/050-HIVE-18192.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/050-HIVE-18192.derby.sql b/metastore/scripts/upgrade/derby/050-HIVE-18192.derby.sql
new file mode 100644
index 0000000..b0bc5b1
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/050-HIVE-18192.derby.sql
@@ -0,0 +1,27 @@
+-- Add new tables/index for per table write id support
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
+-- Modify txn_components/completed_txn_components tables to add write id.
+ALTER TABLE TXN_COMPONENTS ADD TC_WRITEID bigint;
+ALTER TABLE COMPLETED_TXN_COMPONENTS ADD CTC_WRITEID bigint;
+
+-- Modify Compaction related tables to use write id instead of txn id
+RENAME COLUMN COMPACTION_QUEUE.CQ_HIGHEST_TXN_ID TO CQ_HIGHEST_WRITE_ID;
+RENAME COLUMN COMPLETED_COMPACTIONS.CC_HIGHEST_TXN_ID TO CC_HIGHEST_WRITE_ID;
+
+
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/metastore/scripts/upgrade/derby/hive-txn-schema-3.0.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/hive-txn-schema-3.0.0.derby.sql b/metastore/scripts/upgrade/derby/hive-txn-schema-3.0.0.derby.sql
index 85d593f..2033bdc 100644
--- a/metastore/scripts/upgrade/derby/hive-txn-schema-3.0.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/hive-txn-schema-3.0.0.derby.sql
@@ -33,7 +33,8 @@ CREATE TABLE TXN_COMPONENTS (
TC_DATABASE varchar(128) NOT NULL,
TC_TABLE varchar(128),
TC_PARTITION varchar(767),
- TC_OPERATION_TYPE char(1) NOT NULL
+ TC_OPERATION_TYPE char(1) NOT NULL,
+ TC_WRITEID bigint
);
CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);
@@ -43,7 +44,8 @@ CREATE TABLE COMPLETED_TXN_COMPONENTS (
CTC_DATABASE varchar(128) NOT NULL,
CTC_TABLE varchar(256),
CTC_PARTITION varchar(767),
- CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL
+ CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CTC_WRITEID bigint
);
CREATE INDEX COMPLETED_TXN_COMPONENTS_IDX ON COMPLETED_TXN_COMPONENTS (CTC_DATABASE, CTC_TABLE, CTC_PARTITION);
@@ -53,6 +55,23 @@ CREATE TABLE NEXT_TXN_ID (
);
INSERT INTO NEXT_TXN_ID VALUES(1);
+CREATE TABLE TXN_TO_WRITE_ID (
+ T2W_TXNID bigint NOT NULL,
+ T2W_DATABASE varchar(128) NOT NULL,
+ T2W_TABLE varchar(256) NOT NULL,
+ T2W_WRITEID bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX TXN_TO_WRITE_ID_IDX ON TXN_TO_WRITE_ID (T2W_DATABASE, T2W_TABLE, T2W_TXNID);
+
+CREATE TABLE NEXT_WRITE_ID (
+ NWI_DATABASE varchar(128) NOT NULL,
+ NWI_TABLE varchar(256) NOT NULL,
+ NWI_NEXT bigint NOT NULL
+);
+
+CREATE UNIQUE INDEX NEXT_WRITE_ID_IDX ON NEXT_WRITE_ID (NWI_DATABASE, NWI_TABLE);
+
CREATE TABLE HIVE_LOCKS (
HL_LOCK_EXT_ID bigint NOT NULL,
HL_LOCK_INT_ID bigint NOT NULL,
@@ -91,7 +110,7 @@ CREATE TABLE COMPACTION_QUEUE (
CQ_WORKER_ID varchar(128),
CQ_START bigint,
CQ_RUN_AS varchar(128),
- CQ_HIGHEST_TXN_ID bigint,
+ CQ_HIGHEST_WRITE_ID bigint,
CQ_META_INFO varchar(2048) for bit data,
CQ_HADOOP_JOB_ID varchar(32)
);
@@ -113,7 +132,7 @@ CREATE TABLE COMPLETED_COMPACTIONS (
CC_START bigint,
CC_END bigint,
CC_RUN_AS varchar(128),
- CC_HIGHEST_TXN_ID bigint,
+ CC_HIGHEST_WRITE_ID bigint,
CC_META_INFO varchar(2048) for bit data,
CC_HADOOP_JOB_ID varchar(32)
);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql b/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
index 3a11881..55b89e7 100644
--- a/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
@@ -7,5 +7,6 @@ RUN '045-HIVE-16886.derby.sql';
RUN '046-HIVE-17566.derby.sql';
RUN '048-HIVE-14498.derby.sql';
RUN '049-HIVE-18489.derby.sql';
+RUN '050-HIVE-18192.derby.sql';
UPDATE "APP".VERSION SET SCHEMA_VERSION='3.0.0', VERSION_COMMENT='Hive release version 3.0.0' where VER_ID=1;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
index d00e639..94999fe 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
@@ -44,8 +44,9 @@ import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.conf.Configurable;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.hive.common.JavaUtils;
-import org.apache.hadoop.hive.common.ValidReadTxnList;
import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.common.metrics.common.Metrics;
import org.apache.hadoop.hive.common.metrics.common.MetricsConstant;
import org.apache.hadoop.hive.common.metrics.common.MetricsFactory;
@@ -64,6 +65,7 @@ import org.apache.hadoop.hive.ql.exec.ConditionalTask;
import org.apache.hadoop.hive.ql.exec.DagUtils;
import org.apache.hadoop.hive.ql.exec.ExplainTask;
import org.apache.hadoop.hive.ql.exec.FetchTask;
+import org.apache.hadoop.hive.ql.exec.Operator;
import org.apache.hadoop.hive.ql.exec.TableScanOperator;
import org.apache.hadoop.hive.ql.exec.Task;
import org.apache.hadoop.hive.ql.exec.TaskFactory;
@@ -76,6 +78,7 @@ import org.apache.hadoop.hive.ql.hooks.HookContext;
import org.apache.hadoop.hive.ql.hooks.HookUtils;
import org.apache.hadoop.hive.ql.hooks.ReadEntity;
import org.apache.hadoop.hive.ql.hooks.WriteEntity;
+import org.apache.hadoop.hive.ql.io.AcidUtils;
import org.apache.hadoop.hive.ql.lockmgr.HiveLock;
import org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager;
import org.apache.hadoop.hive.ql.lockmgr.LockException;
@@ -1190,30 +1193,85 @@ public class Driver implements IDriver {
return fetchTask;
}
- // Write the current set of valid transactions into the conf file so that it can be read by
- // the input format.
+ // Write the current set of valid transactions into the conf file
private void recordValidTxns(HiveTxnManager txnMgr) throws LockException {
- ValidTxnList oldList = null;
- String s = conf.get(ValidTxnList.VALID_TXNS_KEY);
- if(s != null && s.length() > 0) {
- oldList = new ValidReadTxnList(s);
- }
- ValidTxnList txns = txnMgr.getValidTxns();
- if(oldList != null) {
+ String oldTxnString = conf.get(ValidTxnList.VALID_TXNS_KEY);
+ if ((oldTxnString != null) && (oldTxnString.length() > 0)) {
throw new IllegalStateException("calling recordValidTxn() more than once in the same " +
- JavaUtils.txnIdToString(txnMgr.getCurrentTxnId()));
+ JavaUtils.txnIdToString(txnMgr.getCurrentTxnId()));
}
- String txnStr = txns.toString();
+ ValidTxnList txnList = txnMgr.getValidTxns();
+ String txnStr = txnList.toString();
conf.set(ValidTxnList.VALID_TXNS_KEY, txnStr);
- if(plan.getFetchTask() != null) {
+ LOG.debug("Encoding valid txns info " + txnStr + " txnid:" + txnMgr.getCurrentTxnId());
+ }
+
+ // Write the current set of valid write ids for the operated acid tables into the conf file so
+ // that it can be read by the input format.
+ private void recordValidWriteIds(HiveTxnManager txnMgr) throws LockException {
+ String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY);
+ if ((txnString == null) || (txnString.isEmpty())) {
+ throw new IllegalStateException("calling recordValidWritsIdss() without initializing ValidTxnList " +
+ JavaUtils.txnIdToString(txnMgr.getCurrentTxnId()));
+ }
+ ValidTxnWriteIdList txnWriteIds = txnMgr.getValidWriteIds(getTransactionalTableList(plan), txnString);
+ String writeIdStr = txnWriteIds.toString();
+ conf.set(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY, writeIdStr);
+ if (plan.getFetchTask() != null) {
/**
* This is needed for {@link HiveConf.ConfVars.HIVEFETCHTASKCONVERSION} optimization which
* initializes JobConf in FetchOperator before recordValidTxns() but this has to be done
* after locks are acquired to avoid race conditions in ACID.
+ * This case is supported only for single source query.
*/
- plan.getFetchTask().setValidTxnList(txnStr);
+ Operator<?> source = plan.getFetchTask().getWork().getSource();
+ if (source instanceof TableScanOperator) {
+ TableScanOperator tsOp = (TableScanOperator)source;
+ String fullTableName = AcidUtils.getFullTableName(tsOp.getConf().getDatabaseName(),
+ tsOp.getConf().getTableName());
+ ValidWriteIdList writeIdList = txnWriteIds.getTableValidWriteIdList(fullTableName);
+ if (tsOp.getConf().isTranscationalTable() && (writeIdList == null)) {
+ throw new IllegalStateException("ACID table: " + fullTableName
+ + " is missing from the ValidWriteIdList config: " + writeIdStr);
+ }
+ if (writeIdList != null) {
+ plan.getFetchTask().setValidWriteIdList(writeIdList.toString());
+ }
+ }
+ }
+ LOG.debug("Encoding valid txn write ids info " + writeIdStr + " txnid:" + txnMgr.getCurrentTxnId());
+ }
+
+ // Make the list of transactional tables list which are getting read or written by current txn
+ private List<String> getTransactionalTableList(QueryPlan plan) {
+ List<String> tableList = new ArrayList<>();
+
+ for (ReadEntity input : plan.getInputs()) {
+ addTableFromEntity(input, tableList);
+ }
+ return tableList;
+ }
+
+ private void addTableFromEntity(Entity entity, List<String> tableList) {
+ Table tbl;
+ switch (entity.getType()) {
+ case TABLE: {
+ tbl = entity.getTable();
+ break;
+ }
+ case PARTITION:
+ case DUMMYPARTITION: {
+ tbl = entity.getPartition().getTable();
+ break;
+ }
+ default: {
+ return;
+ }
+ }
+ String fullTableName = AcidUtils.getFullTableName(tbl.getDbName(), tbl.getTableName());
+ if (AcidUtils.isTransactionalTable(tbl) && !tableList.contains(fullTableName)) {
+ tableList.add(fullTableName);
}
- LOG.debug("Encoding valid txns info " + txnStr + " txnid:" + txnMgr.getCurrentTxnId());
}
private String getUserFromUGI() {
@@ -1256,7 +1314,7 @@ public class Driver implements IDriver {
if(userFromUGI == null) {
throw createProcessorResponse(10);
}
- // Set the transaction id in all of the acid file sinks
+ // Set the table write id in all of the acid file sinks
if (haveAcidWrite()) {
List<FileSinkDesc> acidSinks = new ArrayList<>(plan.getAcidSinks());
//sorting makes tests easier to write since file names and ROW__IDs depend on statementId
@@ -1264,18 +1322,25 @@ public class Driver implements IDriver {
acidSinks.sort((FileSinkDesc fsd1, FileSinkDesc fsd2) ->
fsd1.getDirName().compareTo(fsd2.getDirName()));
for (FileSinkDesc desc : acidSinks) {
- desc.setTransactionId(queryTxnMgr.getCurrentTxnId());
+ TableDesc tableInfo = desc.getTableInfo();
+ long writeId = queryTxnMgr.getTableWriteId(Utilities.getDatabaseName(tableInfo.getTableName()),
+ Utilities.getTableName(tableInfo.getTableName()));
+ desc.setTableWriteId(writeId);
+
//it's possible to have > 1 FileSink writing to the same table/partition
//e.g. Merge stmt, multi-insert stmt when mixing DP and SP writes
- desc.setStatementId(queryTxnMgr.getWriteIdAndIncrement());
+ desc.setStatementId(queryTxnMgr.getStmtIdAndIncrement());
}
}
/*It's imperative that {@code acquireLocks()} is called for all commands so that
HiveTxnManager can transition its state machine correctly*/
queryTxnMgr.acquireLocks(plan, ctx, userFromUGI, lDrvState);
- if(queryTxnMgr.recordSnapshot(plan)) {
+ if (queryTxnMgr.recordSnapshot(plan)) {
recordValidTxns(queryTxnMgr);
}
+ if (plan.hasAcidResourcesInQuery()) {
+ recordValidWriteIds(queryTxnMgr);
+ }
} catch (Exception e) {
errorMessage = "FAILED: Error in acquiring locks: " + e.getMessage();
SQLState = ErrorMsg.findSQLState(e.getMessage());
@@ -1317,6 +1382,7 @@ public class Driver implements IDriver {
// If we've opened a transaction we need to commit or rollback rather than explicitly
// releasing the locks.
conf.unset(ValidTxnList.VALID_TXNS_KEY);
+ conf.unset(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY);
if(!checkConcurrency()) {
return;
}
@@ -1456,8 +1522,6 @@ public class Driver implements IDriver {
private static final ReentrantLock globalCompileLock = new ReentrantLock();
private void compileInternal(String command, boolean deferClose) throws CommandProcessorResponse {
- int ret;
-
Metrics metrics = MetricsFactory.getInstance();
if (metrics != null) {
metrics.incrementCounter(MetricsConstant.WAITING_COMPILE_OPS, 1);
@@ -1626,7 +1690,6 @@ public class Driver implements IDriver {
throw cpr;
}
-
//if needRequireLock is false, the release here will do nothing because there is no lock
try {
//since set autocommit starts an implicit txn, close it
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java
index cf19351..df84417 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java
@@ -260,7 +260,7 @@ public abstract class AbstractFileMergeOperator<T extends FileMergeDesc>
// There's always just one file that we have merged.
// The union/DP/etc. should already be account for in the path.
Utilities.writeMmCommitManifest(Lists.newArrayList(outPath),
- tmpPath.getParent(), fs, taskId, conf.getTxnId(), conf.getStmtId(), null, false);
+ tmpPath.getParent(), fs, taskId, conf.getWriteId(), conf.getStmtId(), null, false);
LOG.info("Merged into " + finalPath + "(" + fss.getLen() + " bytes).");
}
}
@@ -322,7 +322,7 @@ public abstract class AbstractFileMergeOperator<T extends FileMergeDesc>
try {
Path outputDir = conf.getOutputPath();
FileSystem fs = outputDir.getFileSystem(hconf);
- Long mmWriteId = conf.getTxnId();
+ Long mmWriteId = conf.getWriteId();
int stmtId = conf.getStmtId();
if (!isMmTable) {
Path backupPath = backupOutputPath(fs, outputDir);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
index 16b9107..f99178d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
@@ -63,6 +63,7 @@ import org.apache.hadoop.hive.common.FileUtils;
import org.apache.hadoop.hive.common.JavaUtils;
import org.apache.hadoop.hive.common.StatsSetupConst;
import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.common.type.HiveDecimal;
import org.apache.hadoop.hive.conf.Constants;
import org.apache.hadoop.hive.conf.HiveConf;
@@ -4264,7 +4265,7 @@ public class DDLTask extends Task<DDLWork> implements Serializable {
}
private void handleRemoveMm(
- Path path, ValidTxnList validTxnList, List<Path> result) throws HiveException {
+ Path path, ValidWriteIdList validWriteIdList, List<Path> result) throws HiveException {
// Note: doesn't take LB into account; that is not presently supported here (throws above).
try {
FileSystem fs = path.getFileSystem(conf);
@@ -4274,10 +4275,10 @@ public class DDLTask extends Task<DDLWork> implements Serializable {
ensureDelete(fs, childPath, "a non-directory file");
continue;
}
- Long writeId = JavaUtils.extractTxnId(childPath);
+ Long writeId = JavaUtils.extractWriteId(childPath);
if (writeId == null) {
ensureDelete(fs, childPath, "an unknown directory");
- } else if (!validTxnList.isTxnValid(writeId)) {
+ } else if (!validWriteIdList.isWriteIdValid(writeId)) {
// Assume no concurrent active writes - we rely on locks here. We could check and fail.
ensureDelete(fs, childPath, "an uncommitted directory");
} else {
@@ -4312,9 +4313,10 @@ public class DDLTask extends Task<DDLWork> implements Serializable {
try {
HiveTxnManager txnManager = SessionState.get().getTxnMgr();
if (txnManager.isTxnOpen()) {
- mmWriteId = txnManager.getCurrentTxnId();
+ mmWriteId = txnManager.getTableWriteId(tbl.getDbName(), tbl.getTableName());
} else {
- mmWriteId = txnManager.openTxn(new Context(conf), conf.getUser());
+ txnManager.openTxn(new Context(conf), conf.getUser());
+ mmWriteId = txnManager.getTableWriteId(tbl.getDbName(), tbl.getTableName());
txnManager.commitTxn();
}
} catch (Exception e) {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
index 97e1e36..969c591 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
@@ -37,8 +37,8 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.common.FileUtils;
-import org.apache.hadoop.hive.common.ValidReadTxnList;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidReaderWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.exec.mr.ExecMapperContext;
import org.apache.hadoop.hive.ql.io.AcidUtils;
@@ -151,8 +151,9 @@ public class FetchOperator implements Serializable {
initialize();
}
- public void setValidTxnList(String txnStr) {
- job.set(ValidTxnList.VALID_TXNS_KEY, txnStr);
+ public void setValidWriteIdList(String writeIdStr) {
+ job.set(ValidWriteIdList.VALID_WRITEIDS_KEY, writeIdStr);
+ LOG.debug("FetchOperator set writeIdStr: " + writeIdStr);
}
private void initialize() throws HiveException {
if (isStatReader) {
@@ -274,7 +275,7 @@ public class FetchOperator implements Serializable {
}
FileSystem fs = currPath.getFileSystem(job);
if (fs.exists(currPath)) {
- if (extractValidTxnList() != null &&
+ if (extractValidWriteIdList() != null &&
AcidUtils.isInsertOnlyTable(currDesc.getTableDesc().getProperties())) {
return true;
}
@@ -407,17 +408,17 @@ public class FetchOperator implements Serializable {
if (inputFormat instanceof HiveInputFormat) {
return StringUtils.escapeString(currPath.toString()); // No need to process here.
}
- ValidTxnList validTxnList;
+ ValidWriteIdList validWriteIdList;
if (AcidUtils.isInsertOnlyTable(currDesc.getTableDesc().getProperties())) {
- validTxnList = extractValidTxnList();
+ validWriteIdList = extractValidWriteIdList();
} else {
- validTxnList = null; // non-MM case
+ validWriteIdList = null; // non-MM case
}
- if (validTxnList != null) {
+ if (validWriteIdList != null) {
Utilities.FILE_OP_LOGGER.info("Processing " + currDesc.getTableName() + " for MM paths");
}
- Path[] dirs = HiveInputFormat.processPathsForMmRead(Lists.newArrayList(currPath), job, validTxnList);
+ Path[] dirs = HiveInputFormat.processPathsForMmRead(Lists.newArrayList(currPath), job, validWriteIdList);
if (dirs == null || dirs.length == 0) {
return null; // No valid inputs. This condition is logged inside the call.
}
@@ -428,10 +429,11 @@ public class FetchOperator implements Serializable {
return str.toString();
}
- private ValidTxnList extractValidTxnList() {
+ private ValidWriteIdList extractValidWriteIdList() {
if (currDesc.getTableName() == null || !org.apache.commons.lang.StringUtils.isBlank(currDesc.getTableName())) {
- String txnString = job.get(ValidTxnList.VALID_TXNS_KEY);
- return txnString == null ? new ValidReadTxnList() : new ValidReadTxnList(txnString);
+ String txnString = job.get(ValidWriteIdList.VALID_WRITEIDS_KEY);
+ LOG.debug("FetchOperator get writeIdStr: " + txnString);
+ return txnString == null ? new ValidReaderWriteIdList() : new ValidReaderWriteIdList(txnString);
}
return null; // not fetching from a table directly but from a temp location
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java
index ada4aba..e555aec 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java
@@ -56,8 +56,8 @@ public class FetchTask extends Task<FetchWork> implements Serializable {
super();
}
- public void setValidTxnList(String txnStr) {
- fetch.setValidTxnList(txnStr);
+ public void setValidWriteIdList(String writeIdStr) {
+ fetch.setValidWriteIdList(writeIdStr);
}
@Override
public void initialize(QueryState queryState, QueryPlan queryPlan, DriverContext ctx,
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
index 98bb938..ff62863 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
@@ -173,7 +173,7 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
int acidLastBucket = -1;
int acidFileOffset = -1;
private boolean isMmTable;
- private Long txnId;
+ private Long writeId;
private int stmtId;
String dpDir;
@@ -185,7 +185,7 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
} else {
tmpPath = specPath;
taskOutputTempPath = null; // Should not be used.
- txnId = conf.getTransactionId();
+ writeId = conf.getTableWriteId();
stmtId = conf.getStatementId();
}
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
@@ -337,7 +337,7 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
}
outPaths[filesIdx] = getTaskOutPath(taskId);
} else {
- String subdirPath = AcidUtils.baseOrDeltaSubdir(conf.getInsertOverwrite(), txnId, txnId, stmtId);
+ String subdirPath = AcidUtils.baseOrDeltaSubdir(conf.getInsertOverwrite(), writeId, writeId, stmtId);
if (unionPath != null) {
// Create the union directory inside the MM directory.
subdirPath += Path.SEPARATOR + unionPath;
@@ -961,7 +961,7 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
if (conf.getWriteType() == AcidUtils.Operation.NOT_ACID || conf.isMmTable()) {
rowOutWriters[findWriterOffset(row)].write(recordValue);
} else if (conf.getWriteType() == AcidUtils.Operation.INSERT) {
- fpaths.updaters[findWriterOffset(row)].insert(conf.getTransactionId(), row);
+ fpaths.updaters[findWriterOffset(row)].insert(conf.getTableWriteId(), row);
} else {
// TODO I suspect we could skip much of the stuff above this in the function in the case
// of update and delete. But I don't understand all of the side effects of the above
@@ -1018,9 +1018,9 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
}
}
if (conf.getWriteType() == AcidUtils.Operation.UPDATE) {
- fpaths.updaters[writerOffset].update(conf.getTransactionId(), row);
+ fpaths.updaters[writerOffset].update(conf.getTableWriteId(), row);
} else if (conf.getWriteType() == AcidUtils.Operation.DELETE) {
- fpaths.updaters[writerOffset].delete(conf.getTransactionId(), row);
+ fpaths.updaters[writerOffset].delete(conf.getTableWriteId(), row);
} else {
throw new HiveException("Unknown write type " + conf.getWriteType().toString());
}
@@ -1321,8 +1321,8 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
}
}
if (conf.isMmTable()) {
- Utilities.writeMmCommitManifest(
- commitPaths, specPath, fs, taskId, conf.getTransactionId(), conf.getStatementId(), unionPath, conf.getInsertOverwrite());
+ Utilities.writeMmCommitManifest(commitPaths, specPath, fs, taskId,
+ conf.getTableWriteId(), conf.getStatementId(), unionPath, conf.getInsertOverwrite());
}
// Only publish stats if this operator's flag was set to gather stats
if (conf.isGatherStats()) {
@@ -1380,7 +1380,7 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
MissingBucketsContext mbc = new MissingBucketsContext(
conf.getTableInfo(), numBuckets, conf.getCompressed());
Utilities.handleMmTableFinalPath(specPath, unionSuffix, hconf, success,
- dpLevels, lbLevels, mbc, conf.getTransactionId(), conf.getStatementId(), reporter,
+ dpLevels, lbLevels, mbc, conf.getTableWriteId(), conf.getStatementId(), reporter,
conf.isMmTable(), conf.isMmCtas(), conf.getInsertOverwrite());
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitTask.java
index e092795..b3c62ad 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitTask.java
@@ -34,7 +34,7 @@ public class ImportCommitTask extends Task<ImportCommitWork> {
@Override
public int execute(DriverContext driverContext) {
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
- Utilities.FILE_OP_LOGGER.trace("Executing ImportCommit for " + work.getTxnId());
+ Utilities.FILE_OP_LOGGER.trace("Executing ImportCommit for " + work.getWriteId());
}
try {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitWork.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitWork.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitWork.java
index 649b8e6..a119250 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitWork.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ImportCommitWork.java
@@ -26,18 +26,18 @@ import org.apache.hadoop.hive.ql.plan.Explain.Level;
public class ImportCommitWork implements Serializable {
private static final long serialVersionUID = 1L;
private String dbName, tblName;
- private long txnId;
+ private long writeId;
private int stmtId;
- public ImportCommitWork(String dbName, String tblName, long txnId, int stmtId) {
- this.txnId = txnId;
+ public ImportCommitWork(String dbName, String tblName, long writeId, int stmtId) {
+ this.writeId = writeId;
this.stmtId = stmtId;
this.dbName = dbName;
this.tblName = tblName;
}
- public long getTxnId() {
- return txnId;
+ public long getWriteId() {
+ return writeId;
}
public int getStmtId() {
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
index 40eb659..b490325 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
@@ -369,7 +369,7 @@ public class MoveTask extends Task<MoveWork> implements Serializable {
}
db.loadTable(tbd.getSourcePath(), tbd.getTable().getTableName(), tbd.getLoadFileType(),
work.isSrcLocal(), isSkewedStoredAsDirs(tbd), isFullAcidOp, hasFollowingStatsTask(),
- tbd.getTxnId(), tbd.getStmtId());
+ tbd.getWriteId(), tbd.getStmtId());
if (work.getOutputs() != null) {
DDLTask.addIfAbsentByName(new WriteEntity(table,
getWriteType(tbd, work.getLoadTableWork().getWriteType())), work.getOutputs());
@@ -469,7 +469,7 @@ public class MoveTask extends Task<MoveWork> implements Serializable {
tbd.getInheritTableSpecs(), isSkewedStoredAsDirs(tbd), work.isSrcLocal(),
work.getLoadTableWork().getWriteType() != AcidUtils.Operation.NOT_ACID &&
!tbd.isMmTable(),
- hasFollowingStatsTask(), tbd.getTxnId(), tbd.getStmtId());
+ hasFollowingStatsTask(), tbd.getWriteId(), tbd.getStmtId());
Partition partn = db.getPartition(table, tbd.getPartitionSpec(), false);
// See the comment inside updatePartitionBucketSortColumns.
@@ -512,7 +512,7 @@ public class MoveTask extends Task<MoveWork> implements Serializable {
(tbd.getLbCtx() == null) ? 0 : tbd.getLbCtx().calculateListBucketingLevel(),
work.getLoadTableWork().getWriteType() != AcidUtils.Operation.NOT_ACID &&
!tbd.isMmTable(),
- work.getLoadTableWork().getTxnId(),
+ work.getLoadTableWork().getWriteId(),
tbd.getStmtId(),
hasFollowingStatsTask(),
work.getLoadTableWork().getWriteType(),
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java
index 4732da4..bfdb7d2 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java
@@ -211,6 +211,7 @@ public class SMBMapJoinOperator extends AbstractMapJoinOperator<SMBJoinDesc> imp
AcidUtils.setAcidOperationalProperties(jobClone, ts.getConf().isTranscationalTable(),
ts.getConf().getAcidOperationalProperties());
+ AcidUtils.setValidWriteIdList(jobClone, ts.getConf());
ts.passExecContext(getExecContext());
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
index 8248442..fd84231 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
@@ -100,7 +100,7 @@ import org.apache.hadoop.hive.common.HiveStatsUtils;
import org.apache.hadoop.hive.common.JavaUtils;
import org.apache.hadoop.hive.common.StatsSetupConst;
import org.apache.hadoop.hive.common.StringInternUtils;
-import org.apache.hadoop.hive.common.ValidTxnList;
+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.Warehouse;
@@ -4393,7 +4393,7 @@ public final class Utilities {
* if the entire directory is valid (has no uncommitted/temporary files).
*/
public static List<Path> getValidMmDirectoriesFromTableOrPart(Path path, Configuration conf,
- ValidTxnList validTxnList, int lbLevels) throws IOException {
+ ValidWriteIdList validWriteIdList, int lbLevels) throws IOException {
Utilities.FILE_OP_LOGGER.trace("Looking for valid MM paths under {}", path);
// NULL means this directory is entirely valid.
List<Path> result = null;
@@ -4403,8 +4403,8 @@ public final class Utilities {
for (int i = 0; i < children.length; ++i) {
FileStatus file = children[i];
Path childPath = file.getPath();
- Long txnId = JavaUtils.extractTxnId(childPath);
- if (!file.isDirectory() || txnId == null || !validTxnList.isTxnValid(txnId)) {
+ Long writeId = JavaUtils.extractWriteId(childPath);
+ if (!file.isDirectory() || writeId == null || !validWriteIdList.isWriteIdValid(writeId)) {
Utilities.FILE_OP_LOGGER.debug("Skipping path {}", childPath);
if (result == null) {
result = new ArrayList<>(children.length - 1);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
index 30bf534..4bc7568 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
@@ -487,6 +487,7 @@ public class MapredLocalTask extends Task<MapredLocalWork> implements Serializab
AcidUtils.setAcidOperationalProperties(jobClone, ts.getConf().isTranscationalTable(),
ts.getConf().getAcidOperationalProperties());
+ AcidUtils.setValidWriteIdList(jobClone, ts.getConf());
// create a fetch operator
FetchOperator fetchOp = new FetchOperator(entry.getValue(), jobClone);
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidInputFormat.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidInputFormat.java b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidInputFormat.java
index 65eb434..1ed35b3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidInputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidInputFormat.java
@@ -20,7 +20,7 @@ package org.apache.hadoop.hive.ql.io;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.common.ValidTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;
@@ -109,8 +109,8 @@ public interface AcidInputFormat<KEY extends WritableComparable, VALUE>
extends InputFormat<KEY, VALUE>, InputFormatChecker {
static final class DeltaMetaData implements Writable {
- private long minTxnId;
- private long maxTxnId;
+ private long minWriteId;
+ private long maxWriteId;
private List<Integer> stmtIds;
//would be useful to have enum for Type: insert/delete/load data
@@ -120,27 +120,27 @@ public interface AcidInputFormat<KEY extends WritableComparable, VALUE>
/**
* @param stmtIds delta dir suffixes when a single txn writes > 1 delta in the same partition
*/
- DeltaMetaData(long minTxnId, long maxTxnId, List<Integer> stmtIds) {
- this.minTxnId = minTxnId;
- this.maxTxnId = maxTxnId;
+ DeltaMetaData(long minWriteId, long maxWriteId, List<Integer> stmtIds) {
+ this.minWriteId = minWriteId;
+ this.maxWriteId = maxWriteId;
if (stmtIds == null) {
throw new IllegalArgumentException("stmtIds == null");
}
this.stmtIds = stmtIds;
}
- long getMinTxnId() {
- return minTxnId;
+ long getMinWriteId() {
+ return minWriteId;
}
- long getMaxTxnId() {
- return maxTxnId;
+ long getMaxWriteId() {
+ return maxWriteId;
}
List<Integer> getStmtIds() {
return stmtIds;
}
@Override
public void write(DataOutput out) throws IOException {
- out.writeLong(minTxnId);
- out.writeLong(maxTxnId);
+ out.writeLong(minWriteId);
+ out.writeLong(maxWriteId);
out.writeInt(stmtIds.size());
for(Integer id : stmtIds) {
out.writeInt(id);
@@ -148,8 +148,8 @@ public interface AcidInputFormat<KEY extends WritableComparable, VALUE>
}
@Override
public void readFields(DataInput in) throws IOException {
- minTxnId = in.readLong();
- maxTxnId = in.readLong();
+ minWriteId = in.readLong();
+ maxWriteId = in.readLong();
stmtIds.clear();
int numStatements = in.readInt();
for(int i = 0; i < numStatements; i++) {
@@ -159,7 +159,7 @@ public interface AcidInputFormat<KEY extends WritableComparable, VALUE>
@Override
public String toString() {
//? is Type - when implemented
- return "Delta(?," + minTxnId + "," + maxTxnId + "," + stmtIds + ")";
+ return "Delta(?," + minWriteId + "," + maxWriteId + "," + stmtIds + ")";
}
}
/**
@@ -227,7 +227,7 @@ public interface AcidInputFormat<KEY extends WritableComparable, VALUE>
* @param collapseEvents should the ACID events be collapsed so that only
* the last version of the row is kept.
* @param bucket the bucket to read
- * @param validTxnList the list of valid transactions to use
+ * @param validWriteIdList the list of valid write ids to use
* @param baseDirectory the base directory to read or the root directory for
* old style files
* @param deltaDirectory a list of delta files to include in the merge
@@ -237,7 +237,7 @@ public interface AcidInputFormat<KEY extends WritableComparable, VALUE>
RawReader<VALUE> getRawReader(Configuration conf,
boolean collapseEvents,
int bucket,
- ValidTxnList validTxnList,
+ ValidWriteIdList validWriteIdList,
Path baseDirectory,
Path[] deltaDirectory
) throws IOException;
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidOutputFormat.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidOutputFormat.java b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidOutputFormat.java
index 26d4dc6..05beafe 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidOutputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidOutputFormat.java
@@ -49,8 +49,8 @@ public interface AcidOutputFormat<K extends WritableComparable, V> extends HiveO
private boolean isCompressed = false;
private Properties properties;
private Reporter reporter;
- private long minimumTransactionId;
- private long maximumTransactionId;
+ private long minimumWriteId;
+ private long maximumWriteId;
private int bucketId;
/**
* Based on {@link org.apache.hadoop.hive.ql.metadata.Hive#mvFile(HiveConf, FileSystem, Path, FileSystem, Path, boolean, boolean)}
@@ -156,22 +156,22 @@ public interface AcidOutputFormat<K extends WritableComparable, V> extends HiveO
}
/**
- * The minimum transaction id that is included in this file.
- * @param min minimum transaction id
+ * The minimum write id that is included in this file.
+ * @param min minimum write id
* @return this
*/
- public Options minimumTransactionId(long min) {
- this.minimumTransactionId = min;
+ public Options minimumWriteId(long min) {
+ this.minimumWriteId = min;
return this;
}
/**
- * The maximum transaction id that is included in this file.
- * @param max maximum transaction id
+ * The maximum write id that is included in this file.
+ * @param max maximum write id
* @return this
*/
- public Options maximumTransactionId(long max) {
- this.maximumTransactionId = max;
+ public Options maximumWriteId(long max) {
+ this.maximumWriteId = max;
return this;
}
@@ -236,7 +236,7 @@ public interface AcidOutputFormat<K extends WritableComparable, V> extends HiveO
*/
public Options statementId(int id) {
if(id >= AcidUtils.MAX_STATEMENTS_PER_TXN) {
- throw new RuntimeException("Too many statements for transactionId: " + maximumTransactionId);
+ throw new RuntimeException("Too many statements for writeId: " + maximumWriteId);
}
if(id < -1) {
throw new IllegalArgumentException("Illegal statementId value: " + id);
@@ -277,12 +277,12 @@ public interface AcidOutputFormat<K extends WritableComparable, V> extends HiveO
return reporter;
}
- public long getMinimumTransactionId() {
- return minimumTransactionId;
+ public long getMinimumWriteId() {
+ return minimumWriteId;
}
- public long getMaximumTransactionId() {
- return maximumTransactionId;
+ public long getMaximumWriteId() {
+ return maximumWriteId;
}
public boolean isWritingBase() {
[05/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php b/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php
index e76eb24..a6047bf 100644
--- a/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php
+++ b/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php
@@ -14336,6 +14336,774 @@ class CommitTxnRequest {
}
+class GetValidWriteIdsRequest {
+ static $_TSPEC;
+
+ /**
+ * @var string[]
+ */
+ public $fullTableNames = null;
+ /**
+ * @var string
+ */
+ public $validTxnList = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'fullTableNames',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 2 => array(
+ 'var' => 'validTxnList',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['fullTableNames'])) {
+ $this->fullTableNames = $vals['fullTableNames'];
+ }
+ if (isset($vals['validTxnList'])) {
+ $this->validTxnList = $vals['validTxnList'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'GetValidWriteIdsRequest';
+ }
+
+ 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::LST) {
+ $this->fullTableNames = array();
+ $_size490 = 0;
+ $_etype493 = 0;
+ $xfer += $input->readListBegin($_etype493, $_size490);
+ for ($_i494 = 0; $_i494 < $_size490; ++$_i494)
+ {
+ $elem495 = null;
+ $xfer += $input->readString($elem495);
+ $this->fullTableNames []= $elem495;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->validTxnList);
+ } 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('GetValidWriteIdsRequest');
+ if ($this->fullTableNames !== null) {
+ if (!is_array($this->fullTableNames)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('fullTableNames', TType::LST, 1);
+ {
+ $output->writeListBegin(TType::STRING, count($this->fullTableNames));
+ {
+ foreach ($this->fullTableNames as $iter496)
+ {
+ $xfer += $output->writeString($iter496);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->validTxnList !== null) {
+ $xfer += $output->writeFieldBegin('validTxnList', TType::STRING, 2);
+ $xfer += $output->writeString($this->validTxnList);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TableValidWriteIds {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $fullTableName = null;
+ /**
+ * @var int
+ */
+ public $writeIdHighWaterMark = null;
+ /**
+ * @var int[]
+ */
+ public $invalidWriteIds = null;
+ /**
+ * @var int
+ */
+ public $minOpenWriteId = null;
+ /**
+ * @var string
+ */
+ public $abortedBits = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'fullTableName',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'writeIdHighWaterMark',
+ 'type' => TType::I64,
+ ),
+ 3 => array(
+ 'var' => 'invalidWriteIds',
+ 'type' => TType::LST,
+ 'etype' => TType::I64,
+ 'elem' => array(
+ 'type' => TType::I64,
+ ),
+ ),
+ 4 => array(
+ 'var' => 'minOpenWriteId',
+ 'type' => TType::I64,
+ ),
+ 5 => array(
+ 'var' => 'abortedBits',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['fullTableName'])) {
+ $this->fullTableName = $vals['fullTableName'];
+ }
+ if (isset($vals['writeIdHighWaterMark'])) {
+ $this->writeIdHighWaterMark = $vals['writeIdHighWaterMark'];
+ }
+ if (isset($vals['invalidWriteIds'])) {
+ $this->invalidWriteIds = $vals['invalidWriteIds'];
+ }
+ if (isset($vals['minOpenWriteId'])) {
+ $this->minOpenWriteId = $vals['minOpenWriteId'];
+ }
+ if (isset($vals['abortedBits'])) {
+ $this->abortedBits = $vals['abortedBits'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TableValidWriteIds';
+ }
+
+ 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->fullTableName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->writeIdHighWaterMark);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::LST) {
+ $this->invalidWriteIds = array();
+ $_size497 = 0;
+ $_etype500 = 0;
+ $xfer += $input->readListBegin($_etype500, $_size497);
+ for ($_i501 = 0; $_i501 < $_size497; ++$_i501)
+ {
+ $elem502 = null;
+ $xfer += $input->readI64($elem502);
+ $this->invalidWriteIds []= $elem502;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->minOpenWriteId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->abortedBits);
+ } 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('TableValidWriteIds');
+ if ($this->fullTableName !== null) {
+ $xfer += $output->writeFieldBegin('fullTableName', TType::STRING, 1);
+ $xfer += $output->writeString($this->fullTableName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->writeIdHighWaterMark !== null) {
+ $xfer += $output->writeFieldBegin('writeIdHighWaterMark', TType::I64, 2);
+ $xfer += $output->writeI64($this->writeIdHighWaterMark);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->invalidWriteIds !== null) {
+ if (!is_array($this->invalidWriteIds)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('invalidWriteIds', TType::LST, 3);
+ {
+ $output->writeListBegin(TType::I64, count($this->invalidWriteIds));
+ {
+ foreach ($this->invalidWriteIds as $iter503)
+ {
+ $xfer += $output->writeI64($iter503);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->minOpenWriteId !== null) {
+ $xfer += $output->writeFieldBegin('minOpenWriteId', TType::I64, 4);
+ $xfer += $output->writeI64($this->minOpenWriteId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->abortedBits !== null) {
+ $xfer += $output->writeFieldBegin('abortedBits', TType::STRING, 5);
+ $xfer += $output->writeString($this->abortedBits);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class GetValidWriteIdsResponse {
+ static $_TSPEC;
+
+ /**
+ * @var \metastore\TableValidWriteIds[]
+ */
+ public $tblValidWriteIds = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'tblValidWriteIds',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\metastore\TableValidWriteIds',
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['tblValidWriteIds'])) {
+ $this->tblValidWriteIds = $vals['tblValidWriteIds'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'GetValidWriteIdsResponse';
+ }
+
+ 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::LST) {
+ $this->tblValidWriteIds = array();
+ $_size504 = 0;
+ $_etype507 = 0;
+ $xfer += $input->readListBegin($_etype507, $_size504);
+ for ($_i508 = 0; $_i508 < $_size504; ++$_i508)
+ {
+ $elem509 = null;
+ $elem509 = new \metastore\TableValidWriteIds();
+ $xfer += $elem509->read($input);
+ $this->tblValidWriteIds []= $elem509;
+ }
+ $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('GetValidWriteIdsResponse');
+ if ($this->tblValidWriteIds !== null) {
+ if (!is_array($this->tblValidWriteIds)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('tblValidWriteIds', TType::LST, 1);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->tblValidWriteIds));
+ {
+ foreach ($this->tblValidWriteIds as $iter510)
+ {
+ $xfer += $iter510->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class AllocateTableWriteIdsRequest {
+ static $_TSPEC;
+
+ /**
+ * @var int[]
+ */
+ public $txnIds = null;
+ /**
+ * @var string
+ */
+ public $dbName = null;
+ /**
+ * @var string
+ */
+ public $tableName = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'txnIds',
+ 'type' => TType::LST,
+ 'etype' => TType::I64,
+ 'elem' => array(
+ 'type' => TType::I64,
+ ),
+ ),
+ 2 => array(
+ 'var' => 'dbName',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'tableName',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['txnIds'])) {
+ $this->txnIds = $vals['txnIds'];
+ }
+ if (isset($vals['dbName'])) {
+ $this->dbName = $vals['dbName'];
+ }
+ if (isset($vals['tableName'])) {
+ $this->tableName = $vals['tableName'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'AllocateTableWriteIdsRequest';
+ }
+
+ 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::LST) {
+ $this->txnIds = array();
+ $_size511 = 0;
+ $_etype514 = 0;
+ $xfer += $input->readListBegin($_etype514, $_size511);
+ for ($_i515 = 0; $_i515 < $_size511; ++$_i515)
+ {
+ $elem516 = null;
+ $xfer += $input->readI64($elem516);
+ $this->txnIds []= $elem516;
+ }
+ $xfer += $input->readListEnd();
+ } 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;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('AllocateTableWriteIdsRequest');
+ if ($this->txnIds !== null) {
+ if (!is_array($this->txnIds)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('txnIds', TType::LST, 1);
+ {
+ $output->writeListBegin(TType::I64, count($this->txnIds));
+ {
+ foreach ($this->txnIds as $iter517)
+ {
+ $xfer += $output->writeI64($iter517);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $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();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TxnToWriteId {
+ static $_TSPEC;
+
+ /**
+ * @var int
+ */
+ public $txnId = null;
+ /**
+ * @var int
+ */
+ public $writeId = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'txnId',
+ 'type' => TType::I64,
+ ),
+ 2 => array(
+ 'var' => 'writeId',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['txnId'])) {
+ $this->txnId = $vals['txnId'];
+ }
+ if (isset($vals['writeId'])) {
+ $this->writeId = $vals['writeId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TxnToWriteId';
+ }
+
+ 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->txnId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->writeId);
+ } 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('TxnToWriteId');
+ if ($this->txnId !== null) {
+ $xfer += $output->writeFieldBegin('txnId', TType::I64, 1);
+ $xfer += $output->writeI64($this->txnId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->writeId !== null) {
+ $xfer += $output->writeFieldBegin('writeId', TType::I64, 2);
+ $xfer += $output->writeI64($this->writeId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class AllocateTableWriteIdsResponse {
+ static $_TSPEC;
+
+ /**
+ * @var \metastore\TxnToWriteId[]
+ */
+ public $txnToWriteIds = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'txnToWriteIds',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\metastore\TxnToWriteId',
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['txnToWriteIds'])) {
+ $this->txnToWriteIds = $vals['txnToWriteIds'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'AllocateTableWriteIdsResponse';
+ }
+
+ 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::LST) {
+ $this->txnToWriteIds = array();
+ $_size518 = 0;
+ $_etype521 = 0;
+ $xfer += $input->readListBegin($_etype521, $_size518);
+ for ($_i522 = 0; $_i522 < $_size518; ++$_i522)
+ {
+ $elem523 = null;
+ $elem523 = new \metastore\TxnToWriteId();
+ $xfer += $elem523->read($input);
+ $this->txnToWriteIds []= $elem523;
+ }
+ $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('AllocateTableWriteIdsResponse');
+ if ($this->txnToWriteIds !== null) {
+ if (!is_array($this->txnToWriteIds)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('txnToWriteIds', TType::LST, 1);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->txnToWriteIds));
+ {
+ foreach ($this->txnToWriteIds as $iter524)
+ {
+ $xfer += $iter524->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class LockComponent {
static $_TSPEC;
@@ -14667,15 +15435,15 @@ class LockRequest {
case 1:
if ($ftype == TType::LST) {
$this->component = array();
- $_size490 = 0;
- $_etype493 = 0;
- $xfer += $input->readListBegin($_etype493, $_size490);
- for ($_i494 = 0; $_i494 < $_size490; ++$_i494)
+ $_size525 = 0;
+ $_etype528 = 0;
+ $xfer += $input->readListBegin($_etype528, $_size525);
+ for ($_i529 = 0; $_i529 < $_size525; ++$_i529)
{
- $elem495 = null;
- $elem495 = new \metastore\LockComponent();
- $xfer += $elem495->read($input);
- $this->component []= $elem495;
+ $elem530 = null;
+ $elem530 = new \metastore\LockComponent();
+ $xfer += $elem530->read($input);
+ $this->component []= $elem530;
}
$xfer += $input->readListEnd();
} else {
@@ -14731,9 +15499,9 @@ class LockRequest {
{
$output->writeListBegin(TType::STRUCT, count($this->component));
{
- foreach ($this->component as $iter496)
+ foreach ($this->component as $iter531)
{
- $xfer += $iter496->write($output);
+ $xfer += $iter531->write($output);
}
}
$output->writeListEnd();
@@ -15676,15 +16444,15 @@ class ShowLocksResponse {
case 1:
if ($ftype == TType::LST) {
$this->locks = array();
- $_size497 = 0;
- $_etype500 = 0;
- $xfer += $input->readListBegin($_etype500, $_size497);
- for ($_i501 = 0; $_i501 < $_size497; ++$_i501)
+ $_size532 = 0;
+ $_etype535 = 0;
+ $xfer += $input->readListBegin($_etype535, $_size532);
+ for ($_i536 = 0; $_i536 < $_size532; ++$_i536)
{
- $elem502 = null;
- $elem502 = new \metastore\ShowLocksResponseElement();
- $xfer += $elem502->read($input);
- $this->locks []= $elem502;
+ $elem537 = null;
+ $elem537 = new \metastore\ShowLocksResponseElement();
+ $xfer += $elem537->read($input);
+ $this->locks []= $elem537;
}
$xfer += $input->readListEnd();
} else {
@@ -15712,9 +16480,9 @@ class ShowLocksResponse {
{
$output->writeListBegin(TType::STRUCT, count($this->locks));
{
- foreach ($this->locks as $iter503)
+ foreach ($this->locks as $iter538)
{
- $xfer += $iter503->write($output);
+ $xfer += $iter538->write($output);
}
}
$output->writeListEnd();
@@ -15989,17 +16757,17 @@ class HeartbeatTxnRangeResponse {
case 1:
if ($ftype == TType::SET) {
$this->aborted = array();
- $_size504 = 0;
- $_etype507 = 0;
- $xfer += $input->readSetBegin($_etype507, $_size504);
- for ($_i508 = 0; $_i508 < $_size504; ++$_i508)
+ $_size539 = 0;
+ $_etype542 = 0;
+ $xfer += $input->readSetBegin($_etype542, $_size539);
+ for ($_i543 = 0; $_i543 < $_size539; ++$_i543)
{
- $elem509 = null;
- $xfer += $input->readI64($elem509);
- if (is_scalar($elem509)) {
- $this->aborted[$elem509] = true;
+ $elem544 = null;
+ $xfer += $input->readI64($elem544);
+ if (is_scalar($elem544)) {
+ $this->aborted[$elem544] = true;
} else {
- $this->aborted []= $elem509;
+ $this->aborted []= $elem544;
}
}
$xfer += $input->readSetEnd();
@@ -16010,17 +16778,17 @@ class HeartbeatTxnRangeResponse {
case 2:
if ($ftype == TType::SET) {
$this->nosuch = array();
- $_size510 = 0;
- $_etype513 = 0;
- $xfer += $input->readSetBegin($_etype513, $_size510);
- for ($_i514 = 0; $_i514 < $_size510; ++$_i514)
+ $_size545 = 0;
+ $_etype548 = 0;
+ $xfer += $input->readSetBegin($_etype548, $_size545);
+ for ($_i549 = 0; $_i549 < $_size545; ++$_i549)
{
- $elem515 = null;
- $xfer += $input->readI64($elem515);
- if (is_scalar($elem515)) {
- $this->nosuch[$elem515] = true;
+ $elem550 = null;
+ $xfer += $input->readI64($elem550);
+ if (is_scalar($elem550)) {
+ $this->nosuch[$elem550] = true;
} else {
- $this->nosuch []= $elem515;
+ $this->nosuch []= $elem550;
}
}
$xfer += $input->readSetEnd();
@@ -16049,12 +16817,12 @@ class HeartbeatTxnRangeResponse {
{
$output->writeSetBegin(TType::I64, count($this->aborted));
{
- foreach ($this->aborted as $iter516 => $iter517)
+ foreach ($this->aborted as $iter551 => $iter552)
{
- if (is_scalar($iter517)) {
- $xfer += $output->writeI64($iter516);
+ if (is_scalar($iter552)) {
+ $xfer += $output->writeI64($iter551);
} else {
- $xfer += $output->writeI64($iter517);
+ $xfer += $output->writeI64($iter552);
}
}
}
@@ -16070,12 +16838,12 @@ class HeartbeatTxnRangeResponse {
{
$output->writeSetBegin(TType::I64, count($this->nosuch));
{
- foreach ($this->nosuch as $iter518 => $iter519)
+ foreach ($this->nosuch as $iter553 => $iter554)
{
- if (is_scalar($iter519)) {
- $xfer += $output->writeI64($iter518);
+ if (is_scalar($iter554)) {
+ $xfer += $output->writeI64($iter553);
} else {
- $xfer += $output->writeI64($iter519);
+ $xfer += $output->writeI64($iter554);
}
}
}
@@ -16234,17 +17002,17 @@ class CompactionRequest {
case 6:
if ($ftype == TType::MAP) {
$this->properties = array();
- $_size520 = 0;
- $_ktype521 = 0;
- $_vtype522 = 0;
- $xfer += $input->readMapBegin($_ktype521, $_vtype522, $_size520);
- for ($_i524 = 0; $_i524 < $_size520; ++$_i524)
+ $_size555 = 0;
+ $_ktype556 = 0;
+ $_vtype557 = 0;
+ $xfer += $input->readMapBegin($_ktype556, $_vtype557, $_size555);
+ for ($_i559 = 0; $_i559 < $_size555; ++$_i559)
{
- $key525 = '';
- $val526 = '';
- $xfer += $input->readString($key525);
- $xfer += $input->readString($val526);
- $this->properties[$key525] = $val526;
+ $key560 = '';
+ $val561 = '';
+ $xfer += $input->readString($key560);
+ $xfer += $input->readString($val561);
+ $this->properties[$key560] = $val561;
}
$xfer += $input->readMapEnd();
} else {
@@ -16297,10 +17065,10 @@ class CompactionRequest {
{
$output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties));
{
- foreach ($this->properties as $kiter527 => $viter528)
+ foreach ($this->properties as $kiter562 => $viter563)
{
- $xfer += $output->writeString($kiter527);
- $xfer += $output->writeString($viter528);
+ $xfer += $output->writeString($kiter562);
+ $xfer += $output->writeString($viter563);
}
}
$output->writeMapEnd();
@@ -16887,15 +17655,15 @@ class ShowCompactResponse {
case 1:
if ($ftype == TType::LST) {
$this->compacts = array();
- $_size529 = 0;
- $_etype532 = 0;
- $xfer += $input->readListBegin($_etype532, $_size529);
- for ($_i533 = 0; $_i533 < $_size529; ++$_i533)
+ $_size564 = 0;
+ $_etype567 = 0;
+ $xfer += $input->readListBegin($_etype567, $_size564);
+ for ($_i568 = 0; $_i568 < $_size564; ++$_i568)
{
- $elem534 = null;
- $elem534 = new \metastore\ShowCompactResponseElement();
- $xfer += $elem534->read($input);
- $this->compacts []= $elem534;
+ $elem569 = null;
+ $elem569 = new \metastore\ShowCompactResponseElement();
+ $xfer += $elem569->read($input);
+ $this->compacts []= $elem569;
}
$xfer += $input->readListEnd();
} else {
@@ -16923,9 +17691,9 @@ class ShowCompactResponse {
{
$output->writeListBegin(TType::STRUCT, count($this->compacts));
{
- foreach ($this->compacts as $iter535)
+ foreach ($this->compacts as $iter570)
{
- $xfer += $iter535->write($output);
+ $xfer += $iter570->write($output);
}
}
$output->writeListEnd();
@@ -16947,6 +17715,10 @@ class AddDynamicPartitions {
*/
public $txnid = null;
/**
+ * @var int
+ */
+ public $writeid = null;
+ /**
* @var string
*/
public $dbname = null;
@@ -16971,14 +17743,18 @@ class AddDynamicPartitions {
'type' => TType::I64,
),
2 => array(
+ 'var' => 'writeid',
+ 'type' => TType::I64,
+ ),
+ 3 => array(
'var' => 'dbname',
'type' => TType::STRING,
),
- 3 => array(
+ 4 => array(
'var' => 'tablename',
'type' => TType::STRING,
),
- 4 => array(
+ 5 => array(
'var' => 'partitionnames',
'type' => TType::LST,
'etype' => TType::STRING,
@@ -16986,7 +17762,7 @@ class AddDynamicPartitions {
'type' => TType::STRING,
),
),
- 5 => array(
+ 6 => array(
'var' => 'operationType',
'type' => TType::I32,
),
@@ -16996,6 +17772,9 @@ class AddDynamicPartitions {
if (isset($vals['txnid'])) {
$this->txnid = $vals['txnid'];
}
+ if (isset($vals['writeid'])) {
+ $this->writeid = $vals['writeid'];
+ }
if (isset($vals['dbname'])) {
$this->dbname = $vals['dbname'];
}
@@ -17038,37 +17817,44 @@ class AddDynamicPartitions {
}
break;
case 2:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->writeid);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->dbname);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 3:
+ case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->tablename);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 4:
+ case 5:
if ($ftype == TType::LST) {
$this->partitionnames = array();
- $_size536 = 0;
- $_etype539 = 0;
- $xfer += $input->readListBegin($_etype539, $_size536);
- for ($_i540 = 0; $_i540 < $_size536; ++$_i540)
+ $_size571 = 0;
+ $_etype574 = 0;
+ $xfer += $input->readListBegin($_etype574, $_size571);
+ for ($_i575 = 0; $_i575 < $_size571; ++$_i575)
{
- $elem541 = null;
- $xfer += $input->readString($elem541);
- $this->partitionnames []= $elem541;
+ $elem576 = null;
+ $xfer += $input->readString($elem576);
+ $this->partitionnames []= $elem576;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
- case 5:
+ case 6:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->operationType);
} else {
@@ -17093,13 +17879,18 @@ class AddDynamicPartitions {
$xfer += $output->writeI64($this->txnid);
$xfer += $output->writeFieldEnd();
}
+ if ($this->writeid !== null) {
+ $xfer += $output->writeFieldBegin('writeid', TType::I64, 2);
+ $xfer += $output->writeI64($this->writeid);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->dbname !== null) {
- $xfer += $output->writeFieldBegin('dbname', TType::STRING, 2);
+ $xfer += $output->writeFieldBegin('dbname', TType::STRING, 3);
$xfer += $output->writeString($this->dbname);
$xfer += $output->writeFieldEnd();
}
if ($this->tablename !== null) {
- $xfer += $output->writeFieldBegin('tablename', TType::STRING, 3);
+ $xfer += $output->writeFieldBegin('tablename', TType::STRING, 4);
$xfer += $output->writeString($this->tablename);
$xfer += $output->writeFieldEnd();
}
@@ -17107,13 +17898,13 @@ class AddDynamicPartitions {
if (!is_array($this->partitionnames)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
- $xfer += $output->writeFieldBegin('partitionnames', TType::LST, 4);
+ $xfer += $output->writeFieldBegin('partitionnames', TType::LST, 5);
{
$output->writeListBegin(TType::STRING, count($this->partitionnames));
{
- foreach ($this->partitionnames as $iter542)
+ foreach ($this->partitionnames as $iter577)
{
- $xfer += $output->writeString($iter542);
+ $xfer += $output->writeString($iter577);
}
}
$output->writeListEnd();
@@ -17121,7 +17912,7 @@ class AddDynamicPartitions {
$xfer += $output->writeFieldEnd();
}
if ($this->operationType !== null) {
- $xfer += $output->writeFieldBegin('operationType', TType::I32, 5);
+ $xfer += $output->writeFieldBegin('operationType', TType::I32, 6);
$xfer += $output->writeI32($this->operationType);
$xfer += $output->writeFieldEnd();
}
@@ -17419,17 +18210,17 @@ class CreationMetadata {
case 3:
if ($ftype == TType::SET) {
$this->tablesUsed = array();
- $_size543 = 0;
- $_etype546 = 0;
- $xfer += $input->readSetBegin($_etype546, $_size543);
- for ($_i547 = 0; $_i547 < $_size543; ++$_i547)
+ $_size578 = 0;
+ $_etype581 = 0;
+ $xfer += $input->readSetBegin($_etype581, $_size578);
+ for ($_i582 = 0; $_i582 < $_size578; ++$_i582)
{
- $elem548 = null;
- $xfer += $input->readString($elem548);
- if (is_scalar($elem548)) {
- $this->tablesUsed[$elem548] = true;
+ $elem583 = null;
+ $xfer += $input->readString($elem583);
+ if (is_scalar($elem583)) {
+ $this->tablesUsed[$elem583] = true;
} else {
- $this->tablesUsed []= $elem548;
+ $this->tablesUsed []= $elem583;
}
}
$xfer += $input->readSetEnd();
@@ -17475,12 +18266,12 @@ class CreationMetadata {
{
$output->writeSetBegin(TType::STRING, count($this->tablesUsed));
{
- foreach ($this->tablesUsed as $iter549 => $iter550)
+ foreach ($this->tablesUsed as $iter584 => $iter585)
{
- if (is_scalar($iter550)) {
- $xfer += $output->writeString($iter549);
+ if (is_scalar($iter585)) {
+ $xfer += $output->writeString($iter584);
} else {
- $xfer += $output->writeString($iter550);
+ $xfer += $output->writeString($iter585);
}
}
}
@@ -17862,15 +18653,15 @@ class NotificationEventResponse {
case 1:
if ($ftype == TType::LST) {
$this->events = array();
- $_size551 = 0;
- $_etype554 = 0;
- $xfer += $input->readListBegin($_etype554, $_size551);
- for ($_i555 = 0; $_i555 < $_size551; ++$_i555)
+ $_size586 = 0;
+ $_etype589 = 0;
+ $xfer += $input->readListBegin($_etype589, $_size586);
+ for ($_i590 = 0; $_i590 < $_size586; ++$_i590)
{
- $elem556 = null;
- $elem556 = new \metastore\NotificationEvent();
- $xfer += $elem556->read($input);
- $this->events []= $elem556;
+ $elem591 = null;
+ $elem591 = new \metastore\NotificationEvent();
+ $xfer += $elem591->read($input);
+ $this->events []= $elem591;
}
$xfer += $input->readListEnd();
} else {
@@ -17898,9 +18689,9 @@ class NotificationEventResponse {
{
$output->writeListBegin(TType::STRUCT, count($this->events));
{
- foreach ($this->events as $iter557)
+ foreach ($this->events as $iter592)
{
- $xfer += $iter557->write($output);
+ $xfer += $iter592->write($output);
}
}
$output->writeListEnd();
@@ -18245,14 +19036,14 @@ class InsertEventRequestData {
case 2:
if ($ftype == TType::LST) {
$this->filesAdded = array();
- $_size558 = 0;
- $_etype561 = 0;
- $xfer += $input->readListBegin($_etype561, $_size558);
- for ($_i562 = 0; $_i562 < $_size558; ++$_i562)
+ $_size593 = 0;
+ $_etype596 = 0;
+ $xfer += $input->readListBegin($_etype596, $_size593);
+ for ($_i597 = 0; $_i597 < $_size593; ++$_i597)
{
- $elem563 = null;
- $xfer += $input->readString($elem563);
- $this->filesAdded []= $elem563;
+ $elem598 = null;
+ $xfer += $input->readString($elem598);
+ $this->filesAdded []= $elem598;
}
$xfer += $input->readListEnd();
} else {
@@ -18262,14 +19053,14 @@ class InsertEventRequestData {
case 3:
if ($ftype == TType::LST) {
$this->filesAddedChecksum = array();
- $_size564 = 0;
- $_etype567 = 0;
- $xfer += $input->readListBegin($_etype567, $_size564);
- for ($_i568 = 0; $_i568 < $_size564; ++$_i568)
+ $_size599 = 0;
+ $_etype602 = 0;
+ $xfer += $input->readListBegin($_etype602, $_size599);
+ for ($_i603 = 0; $_i603 < $_size599; ++$_i603)
{
- $elem569 = null;
- $xfer += $input->readString($elem569);
- $this->filesAddedChecksum []= $elem569;
+ $elem604 = null;
+ $xfer += $input->readString($elem604);
+ $this->filesAddedChecksum []= $elem604;
}
$xfer += $input->readListEnd();
} else {
@@ -18302,9 +19093,9 @@ class InsertEventRequestData {
{
$output->writeListBegin(TType::STRING, count($this->filesAdded));
{
- foreach ($this->filesAdded as $iter570)
+ foreach ($this->filesAdded as $iter605)
{
- $xfer += $output->writeString($iter570);
+ $xfer += $output->writeString($iter605);
}
}
$output->writeListEnd();
@@ -18319,9 +19110,9 @@ class InsertEventRequestData {
{
$output->writeListBegin(TType::STRING, count($this->filesAddedChecksum));
{
- foreach ($this->filesAddedChecksum as $iter571)
+ foreach ($this->filesAddedChecksum as $iter606)
{
- $xfer += $output->writeString($iter571);
+ $xfer += $output->writeString($iter606);
}
}
$output->writeListEnd();
@@ -18539,14 +19330,14 @@ class FireEventRequest {
case 5:
if ($ftype == TType::LST) {
$this->partitionVals = array();
- $_size572 = 0;
- $_etype575 = 0;
- $xfer += $input->readListBegin($_etype575, $_size572);
- for ($_i576 = 0; $_i576 < $_size572; ++$_i576)
+ $_size607 = 0;
+ $_etype610 = 0;
+ $xfer += $input->readListBegin($_etype610, $_size607);
+ for ($_i611 = 0; $_i611 < $_size607; ++$_i611)
{
- $elem577 = null;
- $xfer += $input->readString($elem577);
- $this->partitionVals []= $elem577;
+ $elem612 = null;
+ $xfer += $input->readString($elem612);
+ $this->partitionVals []= $elem612;
}
$xfer += $input->readListEnd();
} else {
@@ -18597,9 +19388,9 @@ class FireEventRequest {
{
$output->writeListBegin(TType::STRING, count($this->partitionVals));
{
- foreach ($this->partitionVals as $iter578)
+ foreach ($this->partitionVals as $iter613)
{
- $xfer += $output->writeString($iter578);
+ $xfer += $output->writeString($iter613);
}
}
$output->writeListEnd();
@@ -18827,18 +19618,18 @@ class GetFileMetadataByExprResult {
case 1:
if ($ftype == TType::MAP) {
$this->metadata = array();
- $_size579 = 0;
- $_ktype580 = 0;
- $_vtype581 = 0;
- $xfer += $input->readMapBegin($_ktype580, $_vtype581, $_size579);
- for ($_i583 = 0; $_i583 < $_size579; ++$_i583)
+ $_size614 = 0;
+ $_ktype615 = 0;
+ $_vtype616 = 0;
+ $xfer += $input->readMapBegin($_ktype615, $_vtype616, $_size614);
+ for ($_i618 = 0; $_i618 < $_size614; ++$_i618)
{
- $key584 = 0;
- $val585 = new \metastore\MetadataPpdResult();
- $xfer += $input->readI64($key584);
- $val585 = new \metastore\MetadataPpdResult();
- $xfer += $val585->read($input);
- $this->metadata[$key584] = $val585;
+ $key619 = 0;
+ $val620 = new \metastore\MetadataPpdResult();
+ $xfer += $input->readI64($key619);
+ $val620 = new \metastore\MetadataPpdResult();
+ $xfer += $val620->read($input);
+ $this->metadata[$key619] = $val620;
}
$xfer += $input->readMapEnd();
} else {
@@ -18873,10 +19664,10 @@ class GetFileMetadataByExprResult {
{
$output->writeMapBegin(TType::I64, TType::STRUCT, count($this->metadata));
{
- foreach ($this->metadata as $kiter586 => $viter587)
+ foreach ($this->metadata as $kiter621 => $viter622)
{
- $xfer += $output->writeI64($kiter586);
- $xfer += $viter587->write($output);
+ $xfer += $output->writeI64($kiter621);
+ $xfer += $viter622->write($output);
}
}
$output->writeMapEnd();
@@ -18978,14 +19769,14 @@ class GetFileMetadataByExprRequest {
case 1:
if ($ftype == TType::LST) {
$this->fileIds = array();
- $_size588 = 0;
- $_etype591 = 0;
- $xfer += $input->readListBegin($_etype591, $_size588);
- for ($_i592 = 0; $_i592 < $_size588; ++$_i592)
+ $_size623 = 0;
+ $_etype626 = 0;
+ $xfer += $input->readListBegin($_etype626, $_size623);
+ for ($_i627 = 0; $_i627 < $_size623; ++$_i627)
{
- $elem593 = null;
- $xfer += $input->readI64($elem593);
- $this->fileIds []= $elem593;
+ $elem628 = null;
+ $xfer += $input->readI64($elem628);
+ $this->fileIds []= $elem628;
}
$xfer += $input->readListEnd();
} else {
@@ -19034,9 +19825,9 @@ class GetFileMetadataByExprRequest {
{
$output->writeListBegin(TType::I64, count($this->fileIds));
{
- foreach ($this->fileIds as $iter594)
+ foreach ($this->fileIds as $iter629)
{
- $xfer += $output->writeI64($iter594);
+ $xfer += $output->writeI64($iter629);
}
}
$output->writeListEnd();
@@ -19130,17 +19921,17 @@ class GetFileMetadataResult {
case 1:
if ($ftype == TType::MAP) {
$this->metadata = array();
- $_size595 = 0;
- $_ktype596 = 0;
- $_vtype597 = 0;
- $xfer += $input->readMapBegin($_ktype596, $_vtype597, $_size595);
- for ($_i599 = 0; $_i599 < $_size595; ++$_i599)
+ $_size630 = 0;
+ $_ktype631 = 0;
+ $_vtype632 = 0;
+ $xfer += $input->readMapBegin($_ktype631, $_vtype632, $_size630);
+ for ($_i634 = 0; $_i634 < $_size630; ++$_i634)
{
- $key600 = 0;
- $val601 = '';
- $xfer += $input->readI64($key600);
- $xfer += $input->readString($val601);
- $this->metadata[$key600] = $val601;
+ $key635 = 0;
+ $val636 = '';
+ $xfer += $input->readI64($key635);
+ $xfer += $input->readString($val636);
+ $this->metadata[$key635] = $val636;
}
$xfer += $input->readMapEnd();
} else {
@@ -19175,10 +19966,10 @@ class GetFileMetadataResult {
{
$output->writeMapBegin(TType::I64, TType::STRING, count($this->metadata));
{
- foreach ($this->metadata as $kiter602 => $viter603)
+ foreach ($this->metadata as $kiter637 => $viter638)
{
- $xfer += $output->writeI64($kiter602);
- $xfer += $output->writeString($viter603);
+ $xfer += $output->writeI64($kiter637);
+ $xfer += $output->writeString($viter638);
}
}
$output->writeMapEnd();
@@ -19247,14 +20038,14 @@ class GetFileMetadataRequest {
case 1:
if ($ftype == TType::LST) {
$this->fileIds = array();
- $_size604 = 0;
- $_etype607 = 0;
- $xfer += $input->readListBegin($_etype607, $_size604);
- for ($_i608 = 0; $_i608 < $_size604; ++$_i608)
+ $_size639 = 0;
+ $_etype642 = 0;
+ $xfer += $input->readListBegin($_etype642, $_size639);
+ for ($_i643 = 0; $_i643 < $_size639; ++$_i643)
{
- $elem609 = null;
- $xfer += $input->readI64($elem609);
- $this->fileIds []= $elem609;
+ $elem644 = null;
+ $xfer += $input->readI64($elem644);
+ $this->fileIds []= $elem644;
}
$xfer += $input->readListEnd();
} else {
@@ -19282,9 +20073,9 @@ class GetFileMetadataRequest {
{
$output->writeListBegin(TType::I64, count($this->fileIds));
{
- foreach ($this->fileIds as $iter610)
+ foreach ($this->fileIds as $iter645)
{
- $xfer += $output->writeI64($iter610);
+ $xfer += $output->writeI64($iter645);
}
}
$output->writeListEnd();
@@ -19424,14 +20215,14 @@ class PutFileMetadataRequest {
case 1:
if ($ftype == TType::LST) {
$this->fileIds = array();
- $_size611 = 0;
- $_etype614 = 0;
- $xfer += $input->readListBegin($_etype614, $_size611);
- for ($_i615 = 0; $_i615 < $_size611; ++$_i615)
+ $_size646 = 0;
+ $_etype649 = 0;
+ $xfer += $input->readListBegin($_etype649, $_size646);
+ for ($_i650 = 0; $_i650 < $_size646; ++$_i650)
{
- $elem616 = null;
- $xfer += $input->readI64($elem616);
- $this->fileIds []= $elem616;
+ $elem651 = null;
+ $xfer += $input->readI64($elem651);
+ $this->fileIds []= $elem651;
}
$xfer += $input->readListEnd();
} else {
@@ -19441,14 +20232,14 @@ class PutFileMetadataRequest {
case 2:
if ($ftype == TType::LST) {
$this->metadata = array();
- $_size617 = 0;
- $_etype620 = 0;
- $xfer += $input->readListBegin($_etype620, $_size617);
- for ($_i621 = 0; $_i621 < $_size617; ++$_i621)
+ $_size652 = 0;
+ $_etype655 = 0;
+ $xfer += $input->readListBegin($_etype655, $_size652);
+ for ($_i656 = 0; $_i656 < $_size652; ++$_i656)
{
- $elem622 = null;
- $xfer += $input->readString($elem622);
- $this->metadata []= $elem622;
+ $elem657 = null;
+ $xfer += $input->readString($elem657);
+ $this->metadata []= $elem657;
}
$xfer += $input->readListEnd();
} else {
@@ -19483,9 +20274,9 @@ class PutFileMetadataRequest {
{
$output->writeListBegin(TType::I64, count($this->fileIds));
{
- foreach ($this->fileIds as $iter623)
+ foreach ($this->fileIds as $iter658)
{
- $xfer += $output->writeI64($iter623);
+ $xfer += $output->writeI64($iter658);
}
}
$output->writeListEnd();
@@ -19500,9 +20291,9 @@ class PutFileMetadataRequest {
{
$output->writeListBegin(TType::STRING, count($this->metadata));
{
- foreach ($this->metadata as $iter624)
+ foreach ($this->metadata as $iter659)
{
- $xfer += $output->writeString($iter624);
+ $xfer += $output->writeString($iter659);
}
}
$output->writeListEnd();
@@ -19621,14 +20412,14 @@ class ClearFileMetadataRequest {
case 1:
if ($ftype == TType::LST) {
$this->fileIds = array();
- $_size625 = 0;
- $_etype628 = 0;
- $xfer += $input->readListBegin($_etype628, $_size625);
- for ($_i629 = 0; $_i629 < $_size625; ++$_i629)
+ $_size660 = 0;
+ $_etype663 = 0;
+ $xfer += $input->readListBegin($_etype663, $_size660);
+ for ($_i664 = 0; $_i664 < $_size660; ++$_i664)
{
- $elem630 = null;
- $xfer += $input->readI64($elem630);
- $this->fileIds []= $elem630;
+ $elem665 = null;
+ $xfer += $input->readI64($elem665);
+ $this->fileIds []= $elem665;
}
$xfer += $input->readListEnd();
} else {
@@ -19656,9 +20447,9 @@ class ClearFileMetadataRequest {
{
$output->writeListBegin(TType::I64, count($this->fileIds));
{
- foreach ($this->fileIds as $iter631)
+ foreach ($this->fileIds as $iter666)
{
- $xfer += $output->writeI64($iter631);
+ $xfer += $output->writeI64($iter666);
}
}
$output->writeListEnd();
@@ -19942,15 +20733,15 @@ class GetAllFunctionsResponse {
case 1:
if ($ftype == TType::LST) {
$this->functions = array();
- $_size632 = 0;
- $_etype635 = 0;
- $xfer += $input->readListBegin($_etype635, $_size632);
- for ($_i636 = 0; $_i636 < $_size632; ++$_i636)
+ $_size667 = 0;
+ $_etype670 = 0;
+ $xfer += $input->readListBegin($_etype670, $_size667);
+ for ($_i671 = 0; $_i671 < $_size667; ++$_i671)
{
- $elem637 = null;
- $elem637 = new \metastore\Function();
- $xfer += $elem637->read($input);
- $this->functions []= $elem637;
+ $elem672 = null;
+ $elem672 = new \metastore\Function();
+ $xfer += $elem672->read($input);
+ $this->functions []= $elem672;
}
$xfer += $input->readListEnd();
} else {
@@ -19978,9 +20769,9 @@ class GetAllFunctionsResponse {
{
$output->writeListBegin(TType::STRUCT, count($this->functions));
{
- foreach ($this->functions as $iter638)
+ foreach ($this->functions as $iter673)
{
- $xfer += $iter638->write($output);
+ $xfer += $iter673->write($output);
}
}
$output->writeListEnd();
@@ -20044,14 +20835,14 @@ class ClientCapabilities {
case 1:
if ($ftype == TType::LST) {
$this->values = array();
- $_size639 = 0;
- $_etype642 = 0;
- $xfer += $input->readListBegin($_etype642, $_size639);
- for ($_i643 = 0; $_i643 < $_size639; ++$_i643)
+ $_size674 = 0;
+ $_etype677 = 0;
+ $xfer += $input->readListBegin($_etype677, $_size674);
+ for ($_i678 = 0; $_i678 < $_size674; ++$_i678)
{
- $elem644 = null;
- $xfer += $input->readI32($elem644);
- $this->values []= $elem644;
+ $elem679 = null;
+ $xfer += $input->readI32($elem679);
+ $this->values []= $elem679;
}
$xfer += $input->readListEnd();
} else {
@@ -20079,9 +20870,9 @@ class ClientCapabilities {
{
$output->writeListBegin(TType::I32, count($this->values));
{
- foreach ($this->values as $iter645)
+ foreach ($this->values as $iter680)
{
- $xfer += $output->writeI32($iter645);
+ $xfer += $output->writeI32($iter680);
}
}
$output->writeListEnd();
@@ -20381,14 +21172,14 @@ class GetTablesRequest {
case 2:
if ($ftype == TType::LST) {
$this->tblNames = array();
- $_size646 = 0;
- $_etype649 = 0;
- $xfer += $input->readListBegin($_etype649, $_size646);
- for ($_i650 = 0; $_i650 < $_size646; ++$_i650)
+ $_size681 = 0;
+ $_etype684 = 0;
+ $xfer += $input->readListBegin($_etype684, $_size681);
+ for ($_i685 = 0; $_i685 < $_size681; ++$_i685)
{
- $elem651 = null;
- $xfer += $input->readString($elem651);
- $this->tblNames []= $elem651;
+ $elem686 = null;
+ $xfer += $input->readString($elem686);
+ $this->tblNames []= $elem686;
}
$xfer += $input->readListEnd();
} else {
@@ -20429,9 +21220,9 @@ class GetTablesRequest {
{
$output->writeListBegin(TType::STRING, count($this->tblNames));
{
- foreach ($this->tblNames as $iter652)
+ foreach ($this->tblNames as $iter687)
{
- $xfer += $output->writeString($iter652);
+ $xfer += $output->writeString($iter687);
}
}
$output->writeListEnd();
@@ -20504,15 +21295,15 @@ class GetTablesResult {
case 1:
if ($ftype == TType::LST) {
$this->tables = array();
- $_size653 = 0;
- $_etype656 = 0;
- $xfer += $input->readListBegin($_etype656, $_size653);
- for ($_i657 = 0; $_i657 < $_size653; ++$_i657)
+ $_size688 = 0;
+ $_etype691 = 0;
+ $xfer += $input->readListBegin($_etype691, $_size688);
+ for ($_i692 = 0; $_i692 < $_size688; ++$_i692)
{
- $elem658 = null;
- $elem658 = new \metastore\Table();
- $xfer += $elem658->read($input);
- $this->tables []= $elem658;
+ $elem693 = null;
+ $elem693 = new \metastore\Table();
+ $xfer += $elem693->read($input);
+ $this->tables []= $elem693;
}
$xfer += $input->readListEnd();
} else {
@@ -20540,9 +21331,9 @@ class GetTablesResult {
{
$output->writeListBegin(TType::STRUCT, count($this->tables));
{
- foreach ($this->tables as $iter659)
+ foreach ($this->tables as $iter694)
{
- $xfer += $iter659->write($output);
+ $xfer += $iter694->write($output);
}
}
$output->writeListEnd();
@@ -20920,17 +21711,17 @@ class Materialization {
case 1:
if ($ftype == TType::SET) {
$this->tablesUsed = array();
- $_size660 = 0;
- $_etype663 = 0;
- $xfer += $input->readSetBegin($_etype663, $_size660);
- for ($_i664 = 0; $_i664 < $_size660; ++$_i664)
+ $_size695 = 0;
+ $_etype698 = 0;
+ $xfer += $input->readSetBegin($_etype698, $_size695);
+ for ($_i699 = 0; $_i699 < $_size695; ++$_i699)
{
- $elem665 = null;
- $xfer += $input->readString($elem665);
- if (is_scalar($elem665)) {
- $this->tablesUsed[$elem665] = true;
+ $elem700 = null;
+ $xfer += $input->readString($elem700);
+ if (is_scalar($elem700)) {
+ $this->tablesUsed[$elem700] = true;
} else {
- $this->tablesUsed []= $elem665;
+ $this->tablesUsed []= $elem700;
}
}
$xfer += $input->readSetEnd();
@@ -20973,12 +21764,12 @@ class Materialization {
{
$output->writeSetBegin(TType::STRING, count($this->tablesUsed));
{
- foreach ($this->tablesUsed as $iter666 => $iter667)
+ foreach ($this->tablesUsed as $iter701 => $iter702)
{
- if (is_scalar($iter667)) {
- $xfer += $output->writeString($iter666);
+ if (is_scalar($iter702)) {
+ $xfer += $output->writeString($iter701);
} else {
- $xfer += $output->writeString($iter667);
+ $xfer += $output->writeString($iter702);
}
}
}
@@ -22245,15 +23036,15 @@ class WMFullResourcePlan {
case 2:
if ($ftype == TType::LST) {
$this->pools = array();
- $_size668 = 0;
- $_etype671 = 0;
- $xfer += $input->readListBegin($_etype671, $_size668);
- for ($_i672 = 0; $_i672 < $_size668; ++$_i672)
+ $_size703 = 0;
+ $_etype706 = 0;
+ $xfer += $input->readListBegin($_etype706, $_size703);
+ for ($_i707 = 0; $_i707 < $_size703; ++$_i707)
{
- $elem673 = null;
- $elem673 = new \metastore\WMPool();
- $xfer += $elem673->read($input);
- $this->pools []= $elem673;
+ $elem708 = null;
+ $elem708 = new \metastore\WMPool();
+ $xfer += $elem708->read($input);
+ $this->pools []= $elem708;
}
$xfer += $input->readListEnd();
} else {
@@ -22263,15 +23054,15 @@ class WMFullResourcePlan {
case 3:
if ($ftype == TType::LST) {
$this->mappings = array();
- $_size674 = 0;
- $_etype677 = 0;
- $xfer += $input->readListBegin($_etype677, $_size674);
- for ($_i678 = 0; $_i678 < $_size674; ++$_i678)
+ $_size709 = 0;
+ $_etype712 = 0;
+ $xfer += $input->readListBegin($_etype712, $_size709);
+ for ($_i713 = 0; $_i713 < $_size709; ++$_i713)
{
- $elem679 = null;
- $elem679 = new \metastore\WMMapping();
- $xfer += $elem679->read($input);
- $this->mappings []= $elem679;
+ $elem714 = null;
+ $elem714 = new \metastore\WMMapping();
+ $xfer += $elem714->read($input);
+ $this->mappings []= $elem714;
}
$xfer += $input->readListEnd();
} else {
@@ -22281,15 +23072,15 @@ class WMFullResourcePlan {
case 4:
if ($ftype == TType::LST) {
$this->triggers = array();
- $_size680 = 0;
- $_etype683 = 0;
- $xfer += $input->readListBegin($_etype683, $_size680);
- for ($_i684 = 0; $_i684 < $_size680; ++$_i684)
+ $_size715 = 0;
+ $_etype718 = 0;
+ $xfer += $input->readListBegin($_etype718, $_size715);
+ for ($_i719 = 0; $_i719 < $_size715; ++$_i719)
{
- $elem685 = null;
- $elem685 = new \metastore\WMTrigger();
- $xfer += $elem685->read($input);
- $this->triggers []= $elem685;
+ $elem720 = null;
+ $elem720 = new \metastore\WMTrigger();
+ $xfer += $elem720->read($input);
+ $this->triggers []= $elem720;
}
$xfer += $input->readListEnd();
} else {
@@ -22299,15 +23090,15 @@ class WMFullResourcePlan {
case 5:
if ($ftype == TType::LST) {
$this->poolTriggers = array();
- $_size686 = 0;
- $_etype689 = 0;
- $xfer += $input->readListBegin($_etype689, $_size686);
- for ($_i690 = 0; $_i690 < $_size686; ++$_i690)
+ $_size721 = 0;
+ $_etype724 = 0;
+ $xfer += $input->readListBegin($_etype724, $_size721);
+ for ($_i725 = 0; $_i725 < $_size721; ++$_i725)
{
- $elem691 = null;
- $elem691 = new \metastore\WMPoolTrigger();
- $xfer += $elem691->read($input);
- $this->poolTriggers []= $elem691;
+ $elem726 = null;
+ $elem726 = new \metastore\WMPoolTrigger();
+ $xfer += $elem726->read($input);
+ $this->poolTriggers []= $elem726;
}
$xfer += $input->readListEnd();
} else {
@@ -22343,9 +23134,9 @@ class WMFullResourcePlan {
{
$output->writeListBegin(TType::STRUCT, count($this->pools));
{
- foreach ($this->pools as $iter692)
+ foreach ($this->pools as $iter727)
{
- $xfer += $iter692->write($output);
+ $xfer += $iter727->write($output);
}
}
$output->writeListEnd();
@@ -22360,9 +23151,9 @@ class WMFullResourcePlan {
{
$output->writeListBegin(TType::STRUCT, count($this->mappings));
{
- foreach ($this->mappings as $iter693)
+ foreach ($this->mappings as $iter728)
{
- $xfer += $iter693->write($output);
+ $xfer += $iter728->write($output);
}
}
$output->writeListEnd();
@@ -22377,9 +23168,9 @@ class WMFullResourcePlan {
{
$output->writeListBegin(TType::STRUCT, count($this->triggers));
{
- foreach ($this->triggers as $iter694)
+ foreach ($this->triggers as $iter729)
{
- $xfer += $iter694->write($output);
+ $xfer += $iter729->write($output);
}
}
$output->writeListEnd();
@@ -22394,9 +23185,9 @@ class WMFullResourcePlan {
{
$output->writeListBegin(TType::STRUCT, count($this->poolTriggers));
{
- foreach ($this->poolTriggers as $iter695)
+ foreach ($this->poolTriggers as $iter730)
{
- $xfer += $iter695->write($output);
+ $xfer += $iter730->write($output);
}
}
$output->writeListEnd();
@@ -22949,15 +23740,15 @@ class WMGetAllResourcePlanResponse {
case 1:
if ($ftype == TType::LST) {
$this->resourcePlans = array();
- $_size696 = 0;
- $_etype699 = 0;
- $xfer += $input->readListBegin($_etype699, $_size696);
- for ($_i700 = 0; $_i700 < $_size696; ++$_i700)
+ $_size731 = 0;
+ $_etype734 = 0;
+ $xfer += $input->readListBegin($_etype734, $_size731);
+ for ($_i735 = 0; $_i735 < $_size731; ++$_i735)
{
- $elem701 = null;
- $elem701 = new \metastore\WMResourcePlan();
- $xfer += $elem701->read($input);
- $this->resourcePlans []= $elem701;
+ $elem736 = null;
+ $elem736 = new \metastore\WMResourcePlan();
+ $xfer += $elem736->read($input);
+ $this->resourcePlans []= $elem736;
}
$xfer += $input->readListEnd();
} else {
@@ -22985,9 +23776,9 @@ class WMGetAllResourcePlanResponse {
{
$output->writeListBegin(TType::STRUCT, count($this->resourcePlans));
{
- foreach ($this->resourcePlans as $iter702)
+ foreach ($this->resourcePlans as $iter737)
{
- $xfer += $iter702->write($output);
+ $xfer += $iter737->write($output);
}
}
$output->writeListEnd();
@@ -23393,14 +24184,14 @@ class WMValidateResourcePlanResponse {
case 1:
if ($ftype == TType::LST) {
$this->errors = array();
- $_size703 = 0;
- $_etype706 = 0;
- $xfer += $input->readListBegin($_etype706, $_size703);
- for ($_i707 = 0; $_i707 < $_size703; ++$_i707)
+ $_size738 = 0;
+ $_etype741 = 0;
+ $xfer += $input->readListBegin($_etype741, $_size738);
+ for ($_i742 = 0; $_i742 < $_size738; ++$_i742)
{
- $elem708 = null;
- $xfer += $input->readString($elem708);
- $this->errors []= $elem708;
+ $elem743 = null;
+ $xfer += $input->readString($elem743);
+ $this->errors []= $elem743;
}
$xfer += $input->readListEnd();
} else {
@@ -23410,14 +24201,14 @@ class WMValidateResourcePlanResponse {
case 2:
if ($ftype == TType::LST) {
$this->warnings = array();
- $_size709 = 0;
- $_etype712 = 0;
- $xfer += $input->readListBegin($_etype712, $_size709);
- for ($_i713 = 0; $_i713 < $_size709; ++$_i713)
+ $_size744 = 0;
+ $_etype747 = 0;
+ $xfer += $input->readListBegin($_etype747, $_size744);
+ for ($_i748 = 0; $_i748 < $_size744; ++$_i748)
{
- $elem714 = null;
- $xfer += $input->readString($elem714);
- $this->warnings []= $elem714;
+ $elem749 = null;
+ $xfer += $input->readString($elem749);
+ $this->warnings []= $elem749;
}
$xfer += $input->readListEnd();
} else {
@@ -23445,9 +24236,9 @@ class WMValidateResourcePlanResponse {
{
$output->writeListBegin(TType::STRING, count($this->errors));
{
- foreach ($this->errors as $iter715)
+ foreach ($this->errors as $iter750)
{
- $xfer += $output->writeString($iter715);
+ $xfer += $output->writeString($iter750);
}
}
$output->writeListEnd();
@@ -23462,9 +24253,9 @@ class WMValidateResourcePlanResponse {
{
$output->writeListBegin(TType::STRING, count($this->warnings));
{
- foreach ($this->warnings as $iter716)
+ foreach ($this->warnings as $iter751)
{
- $xfer += $output->writeString($iter716);
+ $xfer += $output->writeString($iter751);
}
}
$output->writeListEnd();
@@ -24137,15 +24928,15 @@ class WMGetTriggersForResourePlanResponse {
case 1:
if ($ftype == TType::LST) {
$this->triggers = array();
- $_size717 = 0;
- $_etype720 = 0;
- $xfer += $input->readListBegin($_etype720, $_size717);
- for ($_i721 = 0; $_i721 < $_size717; ++$_i721)
+ $_size752 = 0;
+ $_etype755 = 0;
+ $xfer += $input->readListBegin($_etype755, $_size752);
+ for ($_i756 = 0; $_i756 < $_size752; ++$_i756)
{
- $elem722 = null;
- $elem722 = new \metastore\WMTrigger();
- $xfer += $elem722->read($input);
- $this->triggers []= $elem722;
+ $elem757 = null;
+ $elem757 = new \metastore\WMTrigger();
+ $xfer += $elem757->read($input);
+ $this->triggers []= $elem757;
}
$xfer += $input->readListEnd();
} else {
@@ -24173,9 +24964,9 @@ class WMGetTriggersForResourePlanResponse {
{
$output->writeListBegin(TType::STRUCT, count($this->triggers));
{
- foreach ($this->triggers as $iter723)
+ foreach ($this->triggers as $iter758)
{
- $xfer += $iter723->write($output);
+ $xfer += $iter758->write($output);
}
}
$output->writeListEnd();
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
index c958e97..b3a0524 100755
--- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
+++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
@@ -167,6 +167,8 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' void abort_txn(AbortTxnRequest rqst)')
print(' void abort_txns(AbortTxnsRequest rqst)')
print(' void commit_txn(CommitTxnRequest rqst)')
+ print(' GetValidWriteIdsResponse get_valid_write_ids(GetValidWriteIdsRequest rqst)')
+ print(' AllocateTableWriteIdsResponse allocate_table_write_ids(AllocateTableWriteIdsRequest rqst)')
print(' LockResponse lock(LockRequest rqst)')
print(' LockResponse check_lock(CheckLockRequest rqst)')
print(' void unlock(UnlockRequest rqst)')
@@ -1133,6 +1135,18 @@ elif cmd == 'commit_txn':
sys.exit(1)
pp.pprint(client.commit_txn(eval(args[0]),))
+elif cmd == 'get_valid_write_ids':
+ if len(args) != 1:
+ print('get_valid_write_ids requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.get_valid_write_ids(eval(args[0]),))
+
+elif cmd == 'allocate_table_write_ids':
+ if len(args) != 1:
+ print('allocate_table_write_ids requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.allocate_table_write_ids(eval(args[0]),))
+
elif cmd == 'lock':
if len(args) != 1:
print('lock requires 1 args')
[04/21] hive git commit: HIVE-18192: Introduce WriteID per table
rather than using global transaction ID (Sankar Hariappan,
reviewed by Eugene Koifman)
Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/cbb9233a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
index 330e75f..dfddd4a 100644
--- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
+++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
@@ -1175,6 +1175,20 @@ class Iface(fb303.FacebookService.Iface):
"""
pass
+ def get_valid_write_ids(self, rqst):
+ """
+ Parameters:
+ - rqst
+ """
+ pass
+
+ def allocate_table_write_ids(self, rqst):
+ """
+ Parameters:
+ - rqst
+ """
+ pass
+
def lock(self, rqst):
"""
Parameters:
@@ -6696,6 +6710,78 @@ class Client(fb303.FacebookService.Client, Iface):
raise result.o2
return
+ def get_valid_write_ids(self, rqst):
+ """
+ Parameters:
+ - rqst
+ """
+ self.send_get_valid_write_ids(rqst)
+ return self.recv_get_valid_write_ids()
+
+ def send_get_valid_write_ids(self, rqst):
+ self._oprot.writeMessageBegin('get_valid_write_ids', TMessageType.CALL, self._seqid)
+ args = get_valid_write_ids_args()
+ args.rqst = rqst
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_get_valid_write_ids(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = get_valid_write_ids_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.o1 is not None:
+ raise result.o1
+ if result.o2 is not None:
+ raise result.o2
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "get_valid_write_ids failed: unknown result")
+
+ def allocate_table_write_ids(self, rqst):
+ """
+ Parameters:
+ - rqst
+ """
+ self.send_allocate_table_write_ids(rqst)
+ return self.recv_allocate_table_write_ids()
+
+ def send_allocate_table_write_ids(self, rqst):
+ self._oprot.writeMessageBegin('allocate_table_write_ids', TMessageType.CALL, self._seqid)
+ args = allocate_table_write_ids_args()
+ args.rqst = rqst
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_allocate_table_write_ids(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = allocate_table_write_ids_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.o1 is not None:
+ raise result.o1
+ if result.o2 is not None:
+ raise result.o2
+ if result.o3 is not None:
+ raise result.o3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "allocate_table_write_ids failed: unknown result")
+
def lock(self, rqst):
"""
Parameters:
@@ -8153,6 +8239,8 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
self._processMap["abort_txn"] = Processor.process_abort_txn
self._processMap["abort_txns"] = Processor.process_abort_txns
self._processMap["commit_txn"] = Processor.process_commit_txn
+ self._processMap["get_valid_write_ids"] = Processor.process_get_valid_write_ids
+ self._processMap["allocate_table_write_ids"] = Processor.process_allocate_table_write_ids
self._processMap["lock"] = Processor.process_lock
self._processMap["check_lock"] = Processor.process_check_lock
self._processMap["unlock"] = Processor.process_unlock
@@ -11771,6 +11859,59 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_get_valid_write_ids(self, seqid, iprot, oprot):
+ args = get_valid_write_ids_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = get_valid_write_ids_result()
+ try:
+ result.success = self._handler.get_valid_write_ids(args.rqst)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NoSuchTxnException as o1:
+ msg_type = TMessageType.REPLY
+ result.o1 = o1
+ except MetaException as o2:
+ msg_type = TMessageType.REPLY
+ result.o2 = o2
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("get_valid_write_ids", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_allocate_table_write_ids(self, seqid, iprot, oprot):
+ args = allocate_table_write_ids_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = allocate_table_write_ids_result()
+ try:
+ result.success = self._handler.allocate_table_write_ids(args.rqst)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NoSuchTxnException as o1:
+ msg_type = TMessageType.REPLY
+ result.o1 = o1
+ except TxnAbortedException as o2:
+ msg_type = TMessageType.REPLY
+ result.o2 = o2
+ except MetaException as o3:
+ msg_type = TMessageType.REPLY
+ result.o3 = o3
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("allocate_table_write_ids", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_lock(self, seqid, iprot, oprot):
args = lock_args()
args.read(iprot)
@@ -13587,10 +13728,10 @@ class get_databases_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype723, _size720) = iprot.readListBegin()
- for _i724 in xrange(_size720):
- _elem725 = iprot.readString()
- self.success.append(_elem725)
+ (_etype758, _size755) = iprot.readListBegin()
+ for _i759 in xrange(_size755):
+ _elem760 = iprot.readString()
+ self.success.append(_elem760)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -13613,8 +13754,8 @@ class get_databases_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter726 in self.success:
- oprot.writeString(iter726)
+ for iter761 in self.success:
+ oprot.writeString(iter761)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -13719,10 +13860,10 @@ class get_all_databases_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype730, _size727) = iprot.readListBegin()
- for _i731 in xrange(_size727):
- _elem732 = iprot.readString()
- self.success.append(_elem732)
+ (_etype765, _size762) = iprot.readListBegin()
+ for _i766 in xrange(_size762):
+ _elem767 = iprot.readString()
+ self.success.append(_elem767)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -13745,8 +13886,8 @@ class get_all_databases_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter733 in self.success:
- oprot.writeString(iter733)
+ for iter768 in self.success:
+ oprot.writeString(iter768)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -14516,12 +14657,12 @@ class get_type_all_result:
if fid == 0:
if ftype == TType.MAP:
self.success = {}
- (_ktype735, _vtype736, _size734 ) = iprot.readMapBegin()
- for _i738 in xrange(_size734):
- _key739 = iprot.readString()
- _val740 = Type()
- _val740.read(iprot)
- self.success[_key739] = _val740
+ (_ktype770, _vtype771, _size769 ) = iprot.readMapBegin()
+ for _i773 in xrange(_size769):
+ _key774 = iprot.readString()
+ _val775 = Type()
+ _val775.read(iprot)
+ self.success[_key774] = _val775
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -14544,9 +14685,9 @@ class get_type_all_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.MAP, 0)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
- for kiter741,viter742 in self.success.items():
- oprot.writeString(kiter741)
- viter742.write(oprot)
+ for kiter776,viter777 in self.success.items():
+ oprot.writeString(kiter776)
+ viter777.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.o2 is not None:
@@ -14689,11 +14830,11 @@ class get_fields_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype746, _size743) = iprot.readListBegin()
- for _i747 in xrange(_size743):
- _elem748 = FieldSchema()
- _elem748.read(iprot)
- self.success.append(_elem748)
+ (_etype781, _size778) = iprot.readListBegin()
+ for _i782 in xrange(_size778):
+ _elem783 = FieldSchema()
+ _elem783.read(iprot)
+ self.success.append(_elem783)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -14728,8 +14869,8 @@ class get_fields_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter749 in self.success:
- iter749.write(oprot)
+ for iter784 in self.success:
+ iter784.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -14896,11 +15037,11 @@ class get_fields_with_environment_context_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype753, _size750) = iprot.readListBegin()
- for _i754 in xrange(_size750):
- _elem755 = FieldSchema()
- _elem755.read(iprot)
- self.success.append(_elem755)
+ (_etype788, _size785) = iprot.readListBegin()
+ for _i789 in xrange(_size785):
+ _elem790 = FieldSchema()
+ _elem790.read(iprot)
+ self.success.append(_elem790)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -14935,8 +15076,8 @@ class get_fields_with_environment_context_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter756 in self.success:
- iter756.write(oprot)
+ for iter791 in self.success:
+ iter791.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -15089,11 +15230,11 @@ class get_schema_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype760, _size757) = iprot.readListBegin()
- for _i761 in xrange(_size757):
- _elem762 = FieldSchema()
- _elem762.read(iprot)
- self.success.append(_elem762)
+ (_etype795, _size792) = iprot.readListBegin()
+ for _i796 in xrange(_size792):
+ _elem797 = FieldSchema()
+ _elem797.read(iprot)
+ self.success.append(_elem797)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -15128,8 +15269,8 @@ class get_schema_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter763 in self.success:
- iter763.write(oprot)
+ for iter798 in self.success:
+ iter798.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -15296,11 +15437,11 @@ class get_schema_with_environment_context_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype767, _size764) = iprot.readListBegin()
- for _i768 in xrange(_size764):
- _elem769 = FieldSchema()
- _elem769.read(iprot)
- self.success.append(_elem769)
+ (_etype802, _size799) = iprot.readListBegin()
+ for _i803 in xrange(_size799):
+ _elem804 = FieldSchema()
+ _elem804.read(iprot)
+ self.success.append(_elem804)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -15335,8 +15476,8 @@ class get_schema_with_environment_context_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter770 in self.success:
- iter770.write(oprot)
+ for iter805 in self.success:
+ iter805.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -15783,44 +15924,44 @@ class create_table_with_constraints_args:
elif fid == 2:
if ftype == TType.LIST:
self.primaryKeys = []
- (_etype774, _size771) = iprot.readListBegin()
- for _i775 in xrange(_size771):
- _elem776 = SQLPrimaryKey()
- _elem776.read(iprot)
- self.primaryKeys.append(_elem776)
+ (_etype809, _size806) = iprot.readListBegin()
+ for _i810 in xrange(_size806):
+ _elem811 = SQLPrimaryKey()
+ _elem811.read(iprot)
+ self.primaryKeys.append(_elem811)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.LIST:
self.foreignKeys = []
- (_etype780, _size777) = iprot.readListBegin()
- for _i781 in xrange(_size777):
- _elem782 = SQLForeignKey()
- _elem782.read(iprot)
- self.foreignKeys.append(_elem782)
+ (_etype815, _size812) = iprot.readListBegin()
+ for _i816 in xrange(_size812):
+ _elem817 = SQLForeignKey()
+ _elem817.read(iprot)
+ self.foreignKeys.append(_elem817)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.LIST:
self.uniqueConstraints = []
- (_etype786, _size783) = iprot.readListBegin()
- for _i787 in xrange(_size783):
- _elem788 = SQLUniqueConstraint()
- _elem788.read(iprot)
- self.uniqueConstraints.append(_elem788)
+ (_etype821, _size818) = iprot.readListBegin()
+ for _i822 in xrange(_size818):
+ _elem823 = SQLUniqueConstraint()
+ _elem823.read(iprot)
+ self.uniqueConstraints.append(_elem823)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 5:
if ftype == TType.LIST:
self.notNullConstraints = []
- (_etype792, _size789) = iprot.readListBegin()
- for _i793 in xrange(_size789):
- _elem794 = SQLNotNullConstraint()
- _elem794.read(iprot)
- self.notNullConstraints.append(_elem794)
+ (_etype827, _size824) = iprot.readListBegin()
+ for _i828 in xrange(_size824):
+ _elem829 = SQLNotNullConstraint()
+ _elem829.read(iprot)
+ self.notNullConstraints.append(_elem829)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -15841,29 +15982,29 @@ class create_table_with_constraints_args:
if self.primaryKeys is not None:
oprot.writeFieldBegin('primaryKeys', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys))
- for iter795 in self.primaryKeys:
- iter795.write(oprot)
+ for iter830 in self.primaryKeys:
+ iter830.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.foreignKeys is not None:
oprot.writeFieldBegin('foreignKeys', TType.LIST, 3)
oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys))
- for iter796 in self.foreignKeys:
- iter796.write(oprot)
+ for iter831 in self.foreignKeys:
+ iter831.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.uniqueConstraints is not None:
oprot.writeFieldBegin('uniqueConstraints', TType.LIST, 4)
oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints))
- for iter797 in self.uniqueConstraints:
- iter797.write(oprot)
+ for iter832 in self.uniqueConstraints:
+ iter832.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.notNullConstraints is not None:
oprot.writeFieldBegin('notNullConstraints', TType.LIST, 5)
oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints))
- for iter798 in self.notNullConstraints:
- iter798.write(oprot)
+ for iter833 in self.notNullConstraints:
+ iter833.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -17129,10 +17270,10 @@ class truncate_table_args:
elif fid == 3:
if ftype == TType.LIST:
self.partNames = []
- (_etype802, _size799) = iprot.readListBegin()
- for _i803 in xrange(_size799):
- _elem804 = iprot.readString()
- self.partNames.append(_elem804)
+ (_etype837, _size834) = iprot.readListBegin()
+ for _i838 in xrange(_size834):
+ _elem839 = iprot.readString()
+ self.partNames.append(_elem839)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -17157,8 +17298,8 @@ class truncate_table_args:
if self.partNames is not None:
oprot.writeFieldBegin('partNames', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.partNames))
- for iter805 in self.partNames:
- oprot.writeString(iter805)
+ for iter840 in self.partNames:
+ oprot.writeString(iter840)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -17358,10 +17499,10 @@ class get_tables_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype809, _size806) = iprot.readListBegin()
- for _i810 in xrange(_size806):
- _elem811 = iprot.readString()
- self.success.append(_elem811)
+ (_etype844, _size841) = iprot.readListBegin()
+ for _i845 in xrange(_size841):
+ _elem846 = iprot.readString()
+ self.success.append(_elem846)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -17384,8 +17525,8 @@ class get_tables_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter812 in self.success:
- oprot.writeString(iter812)
+ for iter847 in self.success:
+ oprot.writeString(iter847)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -17535,10 +17676,10 @@ class get_tables_by_type_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype816, _size813) = iprot.readListBegin()
- for _i817 in xrange(_size813):
- _elem818 = iprot.readString()
- self.success.append(_elem818)
+ (_etype851, _size848) = iprot.readListBegin()
+ for _i852 in xrange(_size848):
+ _elem853 = iprot.readString()
+ self.success.append(_elem853)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -17561,8 +17702,8 @@ class get_tables_by_type_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter819 in self.success:
- oprot.writeString(iter819)
+ for iter854 in self.success:
+ oprot.writeString(iter854)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -17686,10 +17827,10 @@ class get_materialized_views_for_rewriting_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype823, _size820) = iprot.readListBegin()
- for _i824 in xrange(_size820):
- _elem825 = iprot.readString()
- self.success.append(_elem825)
+ (_etype858, _size855) = iprot.readListBegin()
+ for _i859 in xrange(_size855):
+ _elem860 = iprot.readString()
+ self.success.append(_elem860)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -17712,8 +17853,8 @@ class get_materialized_views_for_rewriting_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter826 in self.success:
- oprot.writeString(iter826)
+ for iter861 in self.success:
+ oprot.writeString(iter861)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -17786,10 +17927,10 @@ class get_table_meta_args:
elif fid == 3:
if ftype == TType.LIST:
self.tbl_types = []
- (_etype830, _size827) = iprot.readListBegin()
- for _i831 in xrange(_size827):
- _elem832 = iprot.readString()
- self.tbl_types.append(_elem832)
+ (_etype865, _size862) = iprot.readListBegin()
+ for _i866 in xrange(_size862):
+ _elem867 = iprot.readString()
+ self.tbl_types.append(_elem867)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -17814,8 +17955,8 @@ class get_table_meta_args:
if self.tbl_types is not None:
oprot.writeFieldBegin('tbl_types', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.tbl_types))
- for iter833 in self.tbl_types:
- oprot.writeString(iter833)
+ for iter868 in self.tbl_types:
+ oprot.writeString(iter868)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -17871,11 +18012,11 @@ class get_table_meta_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype837, _size834) = iprot.readListBegin()
- for _i838 in xrange(_size834):
- _elem839 = TableMeta()
- _elem839.read(iprot)
- self.success.append(_elem839)
+ (_etype872, _size869) = iprot.readListBegin()
+ for _i873 in xrange(_size869):
+ _elem874 = TableMeta()
+ _elem874.read(iprot)
+ self.success.append(_elem874)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -17898,8 +18039,8 @@ class get_table_meta_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter840 in self.success:
- iter840.write(oprot)
+ for iter875 in self.success:
+ iter875.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -18023,10 +18164,10 @@ class get_all_tables_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype844, _size841) = iprot.readListBegin()
- for _i845 in xrange(_size841):
- _elem846 = iprot.readString()
- self.success.append(_elem846)
+ (_etype879, _size876) = iprot.readListBegin()
+ for _i880 in xrange(_size876):
+ _elem881 = iprot.readString()
+ self.success.append(_elem881)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -18049,8 +18190,8 @@ class get_all_tables_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter847 in self.success:
- oprot.writeString(iter847)
+ for iter882 in self.success:
+ oprot.writeString(iter882)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -18286,10 +18427,10 @@ class get_table_objects_by_name_args:
elif fid == 2:
if ftype == TType.LIST:
self.tbl_names = []
- (_etype851, _size848) = iprot.readListBegin()
- for _i852 in xrange(_size848):
- _elem853 = iprot.readString()
- self.tbl_names.append(_elem853)
+ (_etype886, _size883) = iprot.readListBegin()
+ for _i887 in xrange(_size883):
+ _elem888 = iprot.readString()
+ self.tbl_names.append(_elem888)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -18310,8 +18451,8 @@ class get_table_objects_by_name_args:
if self.tbl_names is not None:
oprot.writeFieldBegin('tbl_names', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.tbl_names))
- for iter854 in self.tbl_names:
- oprot.writeString(iter854)
+ for iter889 in self.tbl_names:
+ oprot.writeString(iter889)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -18363,11 +18504,11 @@ class get_table_objects_by_name_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype858, _size855) = iprot.readListBegin()
- for _i859 in xrange(_size855):
- _elem860 = Table()
- _elem860.read(iprot)
- self.success.append(_elem860)
+ (_etype893, _size890) = iprot.readListBegin()
+ for _i894 in xrange(_size890):
+ _elem895 = Table()
+ _elem895.read(iprot)
+ self.success.append(_elem895)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -18384,8 +18525,8 @@ class get_table_objects_by_name_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter861 in self.success:
- iter861.write(oprot)
+ for iter896 in self.success:
+ iter896.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -18777,10 +18918,10 @@ class get_materialization_invalidation_info_args:
elif fid == 2:
if ftype == TType.LIST:
self.tbl_names = []
- (_etype865, _size862) = iprot.readListBegin()
- for _i866 in xrange(_size862):
- _elem867 = iprot.readString()
- self.tbl_names.append(_elem867)
+ (_etype900, _size897) = iprot.readListBegin()
+ for _i901 in xrange(_size897):
+ _elem902 = iprot.readString()
+ self.tbl_names.append(_elem902)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -18801,8 +18942,8 @@ class get_materialization_invalidation_info_args:
if self.tbl_names is not None:
oprot.writeFieldBegin('tbl_names', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.tbl_names))
- for iter868 in self.tbl_names:
- oprot.writeString(iter868)
+ for iter903 in self.tbl_names:
+ oprot.writeString(iter903)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -18863,12 +19004,12 @@ class get_materialization_invalidation_info_result:
if fid == 0:
if ftype == TType.MAP:
self.success = {}
- (_ktype870, _vtype871, _size869 ) = iprot.readMapBegin()
- for _i873 in xrange(_size869):
- _key874 = iprot.readString()
- _val875 = Materialization()
- _val875.read(iprot)
- self.success[_key874] = _val875
+ (_ktype905, _vtype906, _size904 ) = iprot.readMapBegin()
+ for _i908 in xrange(_size904):
+ _key909 = iprot.readString()
+ _val910 = Materialization()
+ _val910.read(iprot)
+ self.success[_key909] = _val910
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -18903,9 +19044,9 @@ class get_materialization_invalidation_info_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.MAP, 0)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
- for kiter876,viter877 in self.success.items():
- oprot.writeString(kiter876)
- viter877.write(oprot)
+ for kiter911,viter912 in self.success.items():
+ oprot.writeString(kiter911)
+ viter912.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -19257,10 +19398,10 @@ class get_table_names_by_filter_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype881, _size878) = iprot.readListBegin()
- for _i882 in xrange(_size878):
- _elem883 = iprot.readString()
- self.success.append(_elem883)
+ (_etype916, _size913) = iprot.readListBegin()
+ for _i917 in xrange(_size913):
+ _elem918 = iprot.readString()
+ self.success.append(_elem918)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -19295,8 +19436,8 @@ class get_table_names_by_filter_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter884 in self.success:
- oprot.writeString(iter884)
+ for iter919 in self.success:
+ oprot.writeString(iter919)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -20266,11 +20407,11 @@ class add_partitions_args:
if fid == 1:
if ftype == TType.LIST:
self.new_parts = []
- (_etype888, _size885) = iprot.readListBegin()
- for _i889 in xrange(_size885):
- _elem890 = Partition()
- _elem890.read(iprot)
- self.new_parts.append(_elem890)
+ (_etype923, _size920) = iprot.readListBegin()
+ for _i924 in xrange(_size920):
+ _elem925 = Partition()
+ _elem925.read(iprot)
+ self.new_parts.append(_elem925)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -20287,8 +20428,8 @@ class add_partitions_args:
if self.new_parts is not None:
oprot.writeFieldBegin('new_parts', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
- for iter891 in self.new_parts:
- iter891.write(oprot)
+ for iter926 in self.new_parts:
+ iter926.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -20446,11 +20587,11 @@ class add_partitions_pspec_args:
if fid == 1:
if ftype == TType.LIST:
self.new_parts = []
- (_etype895, _size892) = iprot.readListBegin()
- for _i896 in xrange(_size892):
- _elem897 = PartitionSpec()
- _elem897.read(iprot)
- self.new_parts.append(_elem897)
+ (_etype930, _size927) = iprot.readListBegin()
+ for _i931 in xrange(_size927):
+ _elem932 = PartitionSpec()
+ _elem932.read(iprot)
+ self.new_parts.append(_elem932)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -20467,8 +20608,8 @@ class add_partitions_pspec_args:
if self.new_parts is not None:
oprot.writeFieldBegin('new_parts', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
- for iter898 in self.new_parts:
- iter898.write(oprot)
+ for iter933 in self.new_parts:
+ iter933.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -20642,10 +20783,10 @@ class append_partition_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype902, _size899) = iprot.readListBegin()
- for _i903 in xrange(_size899):
- _elem904 = iprot.readString()
- self.part_vals.append(_elem904)
+ (_etype937, _size934) = iprot.readListBegin()
+ for _i938 in xrange(_size934):
+ _elem939 = iprot.readString()
+ self.part_vals.append(_elem939)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -20670,8 +20811,8 @@ class append_partition_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter905 in self.part_vals:
- oprot.writeString(iter905)
+ for iter940 in self.part_vals:
+ oprot.writeString(iter940)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -21024,10 +21165,10 @@ class append_partition_with_environment_context_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype909, _size906) = iprot.readListBegin()
- for _i910 in xrange(_size906):
- _elem911 = iprot.readString()
- self.part_vals.append(_elem911)
+ (_etype944, _size941) = iprot.readListBegin()
+ for _i945 in xrange(_size941):
+ _elem946 = iprot.readString()
+ self.part_vals.append(_elem946)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -21058,8 +21199,8 @@ class append_partition_with_environment_context_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter912 in self.part_vals:
- oprot.writeString(iter912)
+ for iter947 in self.part_vals:
+ oprot.writeString(iter947)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.environment_context is not None:
@@ -21654,10 +21795,10 @@ class drop_partition_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype916, _size913) = iprot.readListBegin()
- for _i917 in xrange(_size913):
- _elem918 = iprot.readString()
- self.part_vals.append(_elem918)
+ (_etype951, _size948) = iprot.readListBegin()
+ for _i952 in xrange(_size948):
+ _elem953 = iprot.readString()
+ self.part_vals.append(_elem953)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -21687,8 +21828,8 @@ class drop_partition_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter919 in self.part_vals:
- oprot.writeString(iter919)
+ for iter954 in self.part_vals:
+ oprot.writeString(iter954)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.deleteData is not None:
@@ -21861,10 +22002,10 @@ class drop_partition_with_environment_context_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype923, _size920) = iprot.readListBegin()
- for _i924 in xrange(_size920):
- _elem925 = iprot.readString()
- self.part_vals.append(_elem925)
+ (_etype958, _size955) = iprot.readListBegin()
+ for _i959 in xrange(_size955):
+ _elem960 = iprot.readString()
+ self.part_vals.append(_elem960)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -21900,8 +22041,8 @@ class drop_partition_with_environment_context_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter926 in self.part_vals:
- oprot.writeString(iter926)
+ for iter961 in self.part_vals:
+ oprot.writeString(iter961)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.deleteData is not None:
@@ -22638,10 +22779,10 @@ class get_partition_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype930, _size927) = iprot.readListBegin()
- for _i931 in xrange(_size927):
- _elem932 = iprot.readString()
- self.part_vals.append(_elem932)
+ (_etype965, _size962) = iprot.readListBegin()
+ for _i966 in xrange(_size962):
+ _elem967 = iprot.readString()
+ self.part_vals.append(_elem967)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -22666,8 +22807,8 @@ class get_partition_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter933 in self.part_vals:
- oprot.writeString(iter933)
+ for iter968 in self.part_vals:
+ oprot.writeString(iter968)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -22826,11 +22967,11 @@ class exchange_partition_args:
if fid == 1:
if ftype == TType.MAP:
self.partitionSpecs = {}
- (_ktype935, _vtype936, _size934 ) = iprot.readMapBegin()
- for _i938 in xrange(_size934):
- _key939 = iprot.readString()
- _val940 = iprot.readString()
- self.partitionSpecs[_key939] = _val940
+ (_ktype970, _vtype971, _size969 ) = iprot.readMapBegin()
+ for _i973 in xrange(_size969):
+ _key974 = iprot.readString()
+ _val975 = iprot.readString()
+ self.partitionSpecs[_key974] = _val975
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -22867,9 +23008,9 @@ class exchange_partition_args:
if self.partitionSpecs is not None:
oprot.writeFieldBegin('partitionSpecs', TType.MAP, 1)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs))
- for kiter941,viter942 in self.partitionSpecs.items():
- oprot.writeString(kiter941)
- oprot.writeString(viter942)
+ for kiter976,viter977 in self.partitionSpecs.items():
+ oprot.writeString(kiter976)
+ oprot.writeString(viter977)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.source_db is not None:
@@ -23074,11 +23215,11 @@ class exchange_partitions_args:
if fid == 1:
if ftype == TType.MAP:
self.partitionSpecs = {}
- (_ktype944, _vtype945, _size943 ) = iprot.readMapBegin()
- for _i947 in xrange(_size943):
- _key948 = iprot.readString()
- _val949 = iprot.readString()
- self.partitionSpecs[_key948] = _val949
+ (_ktype979, _vtype980, _size978 ) = iprot.readMapBegin()
+ for _i982 in xrange(_size978):
+ _key983 = iprot.readString()
+ _val984 = iprot.readString()
+ self.partitionSpecs[_key983] = _val984
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -23115,9 +23256,9 @@ class exchange_partitions_args:
if self.partitionSpecs is not None:
oprot.writeFieldBegin('partitionSpecs', TType.MAP, 1)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs))
- for kiter950,viter951 in self.partitionSpecs.items():
- oprot.writeString(kiter950)
- oprot.writeString(viter951)
+ for kiter985,viter986 in self.partitionSpecs.items():
+ oprot.writeString(kiter985)
+ oprot.writeString(viter986)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.source_db is not None:
@@ -23200,11 +23341,11 @@ class exchange_partitions_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype955, _size952) = iprot.readListBegin()
- for _i956 in xrange(_size952):
- _elem957 = Partition()
- _elem957.read(iprot)
- self.success.append(_elem957)
+ (_etype990, _size987) = iprot.readListBegin()
+ for _i991 in xrange(_size987):
+ _elem992 = Partition()
+ _elem992.read(iprot)
+ self.success.append(_elem992)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -23245,8 +23386,8 @@ class exchange_partitions_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter958 in self.success:
- iter958.write(oprot)
+ for iter993 in self.success:
+ iter993.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -23340,10 +23481,10 @@ class get_partition_with_auth_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype962, _size959) = iprot.readListBegin()
- for _i963 in xrange(_size959):
- _elem964 = iprot.readString()
- self.part_vals.append(_elem964)
+ (_etype997, _size994) = iprot.readListBegin()
+ for _i998 in xrange(_size994):
+ _elem999 = iprot.readString()
+ self.part_vals.append(_elem999)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -23355,10 +23496,10 @@ class get_partition_with_auth_args:
elif fid == 5:
if ftype == TType.LIST:
self.group_names = []
- (_etype968, _size965) = iprot.readListBegin()
- for _i969 in xrange(_size965):
- _elem970 = iprot.readString()
- self.group_names.append(_elem970)
+ (_etype1003, _size1000) = iprot.readListBegin()
+ for _i1004 in xrange(_size1000):
+ _elem1005 = iprot.readString()
+ self.group_names.append(_elem1005)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -23383,8 +23524,8 @@ class get_partition_with_auth_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter971 in self.part_vals:
- oprot.writeString(iter971)
+ for iter1006 in self.part_vals:
+ oprot.writeString(iter1006)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.user_name is not None:
@@ -23394,8 +23535,8 @@ class get_partition_with_auth_args:
if self.group_names is not None:
oprot.writeFieldBegin('group_names', TType.LIST, 5)
oprot.writeListBegin(TType.STRING, len(self.group_names))
- for iter972 in self.group_names:
- oprot.writeString(iter972)
+ for iter1007 in self.group_names:
+ oprot.writeString(iter1007)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -23824,11 +23965,11 @@ class get_partitions_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype976, _size973) = iprot.readListBegin()
- for _i977 in xrange(_size973):
- _elem978 = Partition()
- _elem978.read(iprot)
- self.success.append(_elem978)
+ (_etype1011, _size1008) = iprot.readListBegin()
+ for _i1012 in xrange(_size1008):
+ _elem1013 = Partition()
+ _elem1013.read(iprot)
+ self.success.append(_elem1013)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -23857,8 +23998,8 @@ class get_partitions_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter979 in self.success:
- iter979.write(oprot)
+ for iter1014 in self.success:
+ iter1014.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -23952,10 +24093,10 @@ class get_partitions_with_auth_args:
elif fid == 5:
if ftype == TType.LIST:
self.group_names = []
- (_etype983, _size980) = iprot.readListBegin()
- for _i984 in xrange(_size980):
- _elem985 = iprot.readString()
- self.group_names.append(_elem985)
+ (_etype1018, _size1015) = iprot.readListBegin()
+ for _i1019 in xrange(_size1015):
+ _elem1020 = iprot.readString()
+ self.group_names.append(_elem1020)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -23988,8 +24129,8 @@ class get_partitions_with_auth_args:
if self.group_names is not None:
oprot.writeFieldBegin('group_names', TType.LIST, 5)
oprot.writeListBegin(TType.STRING, len(self.group_names))
- for iter986 in self.group_names:
- oprot.writeString(iter986)
+ for iter1021 in self.group_names:
+ oprot.writeString(iter1021)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -24050,11 +24191,11 @@ class get_partitions_with_auth_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype990, _size987) = iprot.readListBegin()
- for _i991 in xrange(_size987):
- _elem992 = Partition()
- _elem992.read(iprot)
- self.success.append(_elem992)
+ (_etype1025, _size1022) = iprot.readListBegin()
+ for _i1026 in xrange(_size1022):
+ _elem1027 = Partition()
+ _elem1027.read(iprot)
+ self.success.append(_elem1027)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -24083,8 +24224,8 @@ class get_partitions_with_auth_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter993 in self.success:
- iter993.write(oprot)
+ for iter1028 in self.success:
+ iter1028.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -24242,11 +24383,11 @@ class get_partitions_pspec_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype997, _size994) = iprot.readListBegin()
- for _i998 in xrange(_size994):
- _elem999 = PartitionSpec()
- _elem999.read(iprot)
- self.success.append(_elem999)
+ (_etype1032, _size1029) = iprot.readListBegin()
+ for _i1033 in xrange(_size1029):
+ _elem1034 = PartitionSpec()
+ _elem1034.read(iprot)
+ self.success.append(_elem1034)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -24275,8 +24416,8 @@ class get_partitions_pspec_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1000 in self.success:
- iter1000.write(oprot)
+ for iter1035 in self.success:
+ iter1035.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -24434,10 +24575,10 @@ class get_partition_names_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1004, _size1001) = iprot.readListBegin()
- for _i1005 in xrange(_size1001):
- _elem1006 = iprot.readString()
- self.success.append(_elem1006)
+ (_etype1039, _size1036) = iprot.readListBegin()
+ for _i1040 in xrange(_size1036):
+ _elem1041 = iprot.readString()
+ self.success.append(_elem1041)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -24466,8 +24607,8 @@ class get_partition_names_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1007 in self.success:
- oprot.writeString(iter1007)
+ for iter1042 in self.success:
+ oprot.writeString(iter1042)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -24707,10 +24848,10 @@ class get_partitions_ps_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype1011, _size1008) = iprot.readListBegin()
- for _i1012 in xrange(_size1008):
- _elem1013 = iprot.readString()
- self.part_vals.append(_elem1013)
+ (_etype1046, _size1043) = iprot.readListBegin()
+ for _i1047 in xrange(_size1043):
+ _elem1048 = iprot.readString()
+ self.part_vals.append(_elem1048)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -24740,8 +24881,8 @@ class get_partitions_ps_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter1014 in self.part_vals:
- oprot.writeString(iter1014)
+ for iter1049 in self.part_vals:
+ oprot.writeString(iter1049)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.max_parts is not None:
@@ -24805,11 +24946,11 @@ class get_partitions_ps_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1018, _size1015) = iprot.readListBegin()
- for _i1019 in xrange(_size1015):
- _elem1020 = Partition()
- _elem1020.read(iprot)
- self.success.append(_elem1020)
+ (_etype1053, _size1050) = iprot.readListBegin()
+ for _i1054 in xrange(_size1050):
+ _elem1055 = Partition()
+ _elem1055.read(iprot)
+ self.success.append(_elem1055)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -24838,8 +24979,8 @@ class get_partitions_ps_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1021 in self.success:
- iter1021.write(oprot)
+ for iter1056 in self.success:
+ iter1056.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -24926,10 +25067,10 @@ class get_partitions_ps_with_auth_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype1025, _size1022) = iprot.readListBegin()
- for _i1026 in xrange(_size1022):
- _elem1027 = iprot.readString()
- self.part_vals.append(_elem1027)
+ (_etype1060, _size1057) = iprot.readListBegin()
+ for _i1061 in xrange(_size1057):
+ _elem1062 = iprot.readString()
+ self.part_vals.append(_elem1062)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -24946,10 +25087,10 @@ class get_partitions_ps_with_auth_args:
elif fid == 6:
if ftype == TType.LIST:
self.group_names = []
- (_etype1031, _size1028) = iprot.readListBegin()
- for _i1032 in xrange(_size1028):
- _elem1033 = iprot.readString()
- self.group_names.append(_elem1033)
+ (_etype1066, _size1063) = iprot.readListBegin()
+ for _i1067 in xrange(_size1063):
+ _elem1068 = iprot.readString()
+ self.group_names.append(_elem1068)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -24974,8 +25115,8 @@ class get_partitions_ps_with_auth_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter1034 in self.part_vals:
- oprot.writeString(iter1034)
+ for iter1069 in self.part_vals:
+ oprot.writeString(iter1069)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.max_parts is not None:
@@ -24989,8 +25130,8 @@ class get_partitions_ps_with_auth_args:
if self.group_names is not None:
oprot.writeFieldBegin('group_names', TType.LIST, 6)
oprot.writeListBegin(TType.STRING, len(self.group_names))
- for iter1035 in self.group_names:
- oprot.writeString(iter1035)
+ for iter1070 in self.group_names:
+ oprot.writeString(iter1070)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -25052,11 +25193,11 @@ class get_partitions_ps_with_auth_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1039, _size1036) = iprot.readListBegin()
- for _i1040 in xrange(_size1036):
- _elem1041 = Partition()
- _elem1041.read(iprot)
- self.success.append(_elem1041)
+ (_etype1074, _size1071) = iprot.readListBegin()
+ for _i1075 in xrange(_size1071):
+ _elem1076 = Partition()
+ _elem1076.read(iprot)
+ self.success.append(_elem1076)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -25085,8 +25226,8 @@ class get_partitions_ps_with_auth_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1042 in self.success:
- iter1042.write(oprot)
+ for iter1077 in self.success:
+ iter1077.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -25167,10 +25308,10 @@ class get_partition_names_ps_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype1046, _size1043) = iprot.readListBegin()
- for _i1047 in xrange(_size1043):
- _elem1048 = iprot.readString()
- self.part_vals.append(_elem1048)
+ (_etype1081, _size1078) = iprot.readListBegin()
+ for _i1082 in xrange(_size1078):
+ _elem1083 = iprot.readString()
+ self.part_vals.append(_elem1083)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -25200,8 +25341,8 @@ class get_partition_names_ps_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter1049 in self.part_vals:
- oprot.writeString(iter1049)
+ for iter1084 in self.part_vals:
+ oprot.writeString(iter1084)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.max_parts is not None:
@@ -25265,10 +25406,10 @@ class get_partition_names_ps_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1053, _size1050) = iprot.readListBegin()
- for _i1054 in xrange(_size1050):
- _elem1055 = iprot.readString()
- self.success.append(_elem1055)
+ (_etype1088, _size1085) = iprot.readListBegin()
+ for _i1089 in xrange(_size1085):
+ _elem1090 = iprot.readString()
+ self.success.append(_elem1090)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -25297,8 +25438,8 @@ class get_partition_names_ps_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1056 in self.success:
- oprot.writeString(iter1056)
+ for iter1091 in self.success:
+ oprot.writeString(iter1091)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -25469,11 +25610,11 @@ class get_partitions_by_filter_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1060, _size1057) = iprot.readListBegin()
- for _i1061 in xrange(_size1057):
- _elem1062 = Partition()
- _elem1062.read(iprot)
- self.success.append(_elem1062)
+ (_etype1095, _size1092) = iprot.readListBegin()
+ for _i1096 in xrange(_size1092):
+ _elem1097 = Partition()
+ _elem1097.read(iprot)
+ self.success.append(_elem1097)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -25502,8 +25643,8 @@ class get_partitions_by_filter_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1063 in self.success:
- iter1063.write(oprot)
+ for iter1098 in self.success:
+ iter1098.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -25674,11 +25815,11 @@ class get_part_specs_by_filter_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1067, _size1064) = iprot.readListBegin()
- for _i1068 in xrange(_size1064):
- _elem1069 = PartitionSpec()
- _elem1069.read(iprot)
- self.success.append(_elem1069)
+ (_etype1102, _size1099) = iprot.readListBegin()
+ for _i1103 in xrange(_size1099):
+ _elem1104 = PartitionSpec()
+ _elem1104.read(iprot)
+ self.success.append(_elem1104)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -25707,8 +25848,8 @@ class get_part_specs_by_filter_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1070 in self.success:
- iter1070.write(oprot)
+ for iter1105 in self.success:
+ iter1105.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -26128,10 +26269,10 @@ class get_partitions_by_names_args:
elif fid == 3:
if ftype == TType.LIST:
self.names = []
- (_etype1074, _size1071) = iprot.readListBegin()
- for _i1075 in xrange(_size1071):
- _elem1076 = iprot.readString()
- self.names.append(_elem1076)
+ (_etype1109, _size1106) = iprot.readListBegin()
+ for _i1110 in xrange(_size1106):
+ _elem1111 = iprot.readString()
+ self.names.append(_elem1111)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -26156,8 +26297,8 @@ class get_partitions_by_names_args:
if self.names is not None:
oprot.writeFieldBegin('names', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.names))
- for iter1077 in self.names:
- oprot.writeString(iter1077)
+ for iter1112 in self.names:
+ oprot.writeString(iter1112)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -26216,11 +26357,11 @@ class get_partitions_by_names_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1081, _size1078) = iprot.readListBegin()
- for _i1082 in xrange(_size1078):
- _elem1083 = Partition()
- _elem1083.read(iprot)
- self.success.append(_elem1083)
+ (_etype1116, _size1113) = iprot.readListBegin()
+ for _i1117 in xrange(_size1113):
+ _elem1118 = Partition()
+ _elem1118.read(iprot)
+ self.success.append(_elem1118)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -26249,8 +26390,8 @@ class get_partitions_by_names_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1084 in self.success:
- iter1084.write(oprot)
+ for iter1119 in self.success:
+ iter1119.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -26500,11 +26641,11 @@ class alter_partitions_args:
elif fid == 3:
if ftype == TType.LIST:
self.new_parts = []
- (_etype1088, _size1085) = iprot.readListBegin()
- for _i1089 in xrange(_size1085):
- _elem1090 = Partition()
- _elem1090.read(iprot)
- self.new_parts.append(_elem1090)
+ (_etype1123, _size1120) = iprot.readListBegin()
+ for _i1124 in xrange(_size1120):
+ _elem1125 = Partition()
+ _elem1125.read(iprot)
+ self.new_parts.append(_elem1125)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -26529,8 +26670,8 @@ class alter_partitions_args:
if self.new_parts is not None:
oprot.writeFieldBegin('new_parts', TType.LIST, 3)
oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
- for iter1091 in self.new_parts:
- iter1091.write(oprot)
+ for iter1126 in self.new_parts:
+ iter1126.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -26683,11 +26824,11 @@ class alter_partitions_with_environment_context_args:
elif fid == 3:
if ftype == TType.LIST:
self.new_parts = []
- (_etype1095, _size1092) = iprot.readListBegin()
- for _i1096 in xrange(_size1092):
- _elem1097 = Partition()
- _elem1097.read(iprot)
- self.new_parts.append(_elem1097)
+ (_etype1130, _size1127) = iprot.readListBegin()
+ for _i1131 in xrange(_size1127):
+ _elem1132 = Partition()
+ _elem1132.read(iprot)
+ self.new_parts.append(_elem1132)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -26718,8 +26859,8 @@ class alter_partitions_with_environment_context_args:
if self.new_parts is not None:
oprot.writeFieldBegin('new_parts', TType.LIST, 3)
oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
- for iter1098 in self.new_parts:
- iter1098.write(oprot)
+ for iter1133 in self.new_parts:
+ iter1133.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.environment_context is not None:
@@ -27063,10 +27204,10 @@ class rename_partition_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype1102, _size1099) = iprot.readListBegin()
- for _i1103 in xrange(_size1099):
- _elem1104 = iprot.readString()
- self.part_vals.append(_elem1104)
+ (_etype1137, _size1134) = iprot.readListBegin()
+ for _i1138 in xrange(_size1134):
+ _elem1139 = iprot.readString()
+ self.part_vals.append(_elem1139)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -27097,8 +27238,8 @@ class rename_partition_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter1105 in self.part_vals:
- oprot.writeString(iter1105)
+ for iter1140 in self.part_vals:
+ oprot.writeString(iter1140)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.new_part is not None:
@@ -27240,10 +27381,10 @@ class partition_name_has_valid_characters_args:
if fid == 1:
if ftype == TType.LIST:
self.part_vals = []
- (_etype1109, _size1106) = iprot.readListBegin()
- for _i1110 in xrange(_size1106):
- _elem1111 = iprot.readString()
- self.part_vals.append(_elem1111)
+ (_etype1144, _size1141) = iprot.readListBegin()
+ for _i1145 in xrange(_size1141):
+ _elem1146 = iprot.readString()
+ self.part_vals.append(_elem1146)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -27265,8 +27406,8 @@ class partition_name_has_valid_characters_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 1)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter1112 in self.part_vals:
- oprot.writeString(iter1112)
+ for iter1147 in self.part_vals:
+ oprot.writeString(iter1147)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.throw_exception is not None:
@@ -27624,10 +27765,10 @@ class partition_name_to_vals_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1116, _size1113) = iprot.readListBegin()
- for _i1117 in xrange(_size1113):
- _elem1118 = iprot.readString()
- self.success.append(_elem1118)
+ (_etype1151, _size1148) = iprot.readListBegin()
+ for _i1152 in xrange(_size1148):
+ _elem1153 = iprot.readString()
+ self.success.append(_elem1153)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -27650,8 +27791,8 @@ class partition_name_to_vals_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1119 in self.success:
- oprot.writeString(iter1119)
+ for iter1154 in self.success:
+ oprot.writeString(iter1154)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -27775,11 +27916,11 @@ class partition_name_to_spec_result:
if fid == 0:
if ftype == TType.MAP:
self.success = {}
- (_ktype1121, _vtype1122, _size1120 ) = iprot.readMapBegin()
- for _i1124 in xrange(_size1120):
- _key1125 = iprot.readString()
- _val1126 = iprot.readString()
- self.success[_key1125] = _val1126
+ (_ktype1156, _vtype1157, _size1155 ) = iprot.readMapBegin()
+ for _i1159 in xrange(_size1155):
+ _key1160 = iprot.readString()
+ _val1161 = iprot.readString()
+ self.success[_key1160] = _val1161
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -27802,9 +27943,9 @@ class partition_name_to_spec_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.MAP, 0)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
- for kiter1127,viter1128 in self.success.items():
- oprot.writeString(kiter1127)
- oprot.writeString(viter1128)
+ for kiter1162,viter1163 in self.success.items():
+ oprot.writeString(kiter1162)
+ oprot.writeString(viter1163)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -27880,11 +28021,11 @@ class markPartitionForEvent_args:
elif fid == 3:
if ftype == TType.MAP:
self.part_vals = {}
- (_ktype1130, _vtype1131, _size1129 ) = iprot.readMapBegin()
- for _i1133 in xrange(_size1129):
- _key1134 = iprot.readString()
- _val1135 = iprot.readString()
- self.part_vals[_key1134] = _val1135
+ (_ktype1165, _vtype1166, _size1164 ) = iprot.readMapBegin()
+ for _i1168 in xrange(_size1164):
+ _key1169 = iprot.readString()
+ _val1170 = iprot.readString()
+ self.part_vals[_key1169] = _val1170
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -27914,9 +28055,9 @@ class markPartitionForEvent_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.MAP, 3)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals))
- for kiter1136,viter1137 in self.part_vals.items():
- oprot.writeString(kiter1136)
- oprot.writeString(viter1137)
+ for kiter1171,viter1172 in self.part_vals.items():
+ oprot.writeString(kiter1171)
+ oprot.writeString(viter1172)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.eventType is not None:
@@ -28130,11 +28271,11 @@ class isPartitionMarkedForEvent_args:
elif fid == 3:
if ftype == TType.MAP:
self.part_vals = {}
- (_ktype1139, _vtype1140, _size1138 ) = iprot.readMapBegin()
- for _i1142 in xrange(_size1138):
- _key1143 = iprot.readString()
- _val1144 = iprot.readString()
- self.part_vals[_key1143] = _val1144
+ (_ktype1174, _vtype1175, _size1173 ) = iprot.readMapBegin()
+ for _i1177 in xrange(_size1173):
+ _key1178 = iprot.readString()
+ _val1179 = iprot.readString()
+ self.part_vals[_key1178] = _val1179
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -28164,9 +28305,9 @@ class isPartitionMarkedForEvent_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.MAP, 3)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals))
- for kiter1145,viter1146 in self.part_vals.items():
- oprot.writeString(kiter1145)
- oprot.writeString(viter1146)
+ for kiter1180,viter1181 in self.part_vals.items():
+ oprot.writeString(kiter1180)
+ oprot.writeString(viter1181)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.eventType is not None:
@@ -29221,11 +29362,11 @@ class get_indexes_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1150, _size1147) = iprot.readListBegin()
- for _i1151 in xrange(_size1147):
- _elem1152 = Index()
- _elem1152.read(iprot)
- self.success.append(_elem1152)
+ (_etype1185, _size1182) = iprot.readListBegin()
+ for _i1186 in xrange(_size1182):
+ _elem1187 = Index()
+ _elem1187.read(iprot)
+ self.success.append(_elem1187)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -29254,8 +29395,8 @@ class get_indexes_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1153 in self.success:
- iter1153.write(oprot)
+ for iter1188 in self.success:
+ iter1188.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -29410,10 +29551,10 @@ class get_index_names_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1157, _size1154) = iprot.readListBegin()
- for _i1158 in xrange(_size1154):
- _elem1159 = iprot.readString()
- self.success.append(_elem1159)
+ (_etype1192, _size1189) = iprot.readListBegin()
+ for _i1193 in xrange(_size1189):
+ _elem1194 = iprot.readString()
+ self.success.append(_elem1194)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -29436,8 +29577,8 @@ class get_index_names_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1160 in self.success:
- oprot.writeString(iter1160)
+ for iter1195 in self.success:
+ oprot.writeString(iter1195)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o2 is not None:
@@ -32621,10 +32762,10 @@ class get_functions_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1164, _size1161) = iprot.readListBegin()
- for _i1165 in xrange(_size1161):
- _elem1166 = iprot.readString()
- self.success.append(_elem1166)
+ (_etype1199, _size1196) = iprot.readListBegin()
+ for _i1200 in xrange(_size1196):
+ _elem1201 = iprot.readString()
+ self.success.append(_elem1201)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -32647,8 +32788,8 @@ class get_functions_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1167 in self.success:
- oprot.writeString(iter1167)
+ for iter1202 in self.success:
+ oprot.writeString(iter1202)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -33336,10 +33477,10 @@ class get_role_names_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1171, _size1168) = iprot.readListBegin()
- for _i1172 in xrange(_size1168):
- _elem1173 = iprot.readString()
- self.success.append(_elem1173)
+ (_etype1206, _size1203) = iprot.readListBegin()
+ for _i1207 in xrange(_size1203):
+ _elem1208 = iprot.readString()
+ self.success.append(_elem1208)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -33362,8 +33503,8 @@ class get_role_names_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1174 in self.success:
- oprot.writeString(iter1174)
+ for iter1209 in self.success:
+ oprot.writeString(iter1209)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -33877,11 +34018,11 @@ class list_roles_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1178, _size1175) = iprot.readListBegin()
- for _i1179 in xrange(_size1175):
- _elem1180 = Role()
- _elem1180.read(iprot)
- self.success.append(_elem1180)
+ (_etype1213, _size1210) = iprot.readListBegin()
+ for _i1214 in xrange(_size1210):
+ _elem1215 = Role()
+ _elem1215.read(iprot)
+ self.success.append(_elem1215)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -33904,8 +34045,8 @@ class list_roles_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1181 in self.success:
- iter1181.write(oprot)
+ for iter1216 in self.success:
+ iter1216.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -34414,10 +34555,10 @@ class get_privilege_set_args:
elif fid == 3:
if ftype == TType.LIST:
self.group_names = []
- (_etype1185, _size1182) = iprot.readListBegin()
- for _i1186 in xrange(_size1182):
- _elem1187 = iprot.readString()
- self.group_names.append(_elem1187)
+ (_etype1220, _size1217) = iprot.readListBegin()
+ for _i1221 in xrange(_size1217):
+ _elem1222 = iprot.readString()
+ self.group_names.append(_elem1222)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -34442,8 +34583,8 @@ class get_privilege_set_args:
if self.group_names is not None:
oprot.writeFieldBegin('group_names', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.group_names))
- for iter1188 in self.group_names:
- oprot.writeString(iter1188)
+ for iter1223 in self.group_names:
+ oprot.writeString(iter1223)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -34670,11 +34811,11 @@ class list_privileges_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1192, _size1189) = iprot.readListBegin()
- for _i1193 in xrange(_size1189):
- _elem1194 = HiveObjectPrivilege()
- _elem1194.read(iprot)
- self.success.append(_elem1194)
+ (_etype1227, _size1224) = iprot.readListBegin()
+ for _i1228 in xrange(_size1224):
+ _elem1229 = HiveObjectPrivilege()
+ _elem1229.read(iprot)
+ self.success.append(_elem1229)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -34697,8 +34838,8 @@ class list_privileges_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1195 in self.success:
- iter1195.write(oprot)
+ for iter1230 in self.success:
+ iter1230.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -35196,10 +35337,10 @@ class set_ugi_args:
elif fid == 2:
if ftype == TType.LIST:
self.group_names = []
- (_etype1199, _size1196) = iprot.readListBegin()
- for _i1200 in xrange(_size1196):
- _elem1201 = iprot.readString()
- self.group_names.append(_elem1201)
+ (_etype1234, _size1231) = iprot.readListBegin()
+ for _i1235 in xrange(_size1231):
+ _elem1236 = iprot.readString()
+ self.group_names.append(_elem1236)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -35220,8 +35361,8 @@ class set_ugi_args:
if self.group_names is not None:
oprot.writeFieldBegin('group_names', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.group_names))
- for iter1202 in self.group_names:
- oprot.writeString(iter1202)
+ for iter1237 in self.group_names:
+ oprot.writeString(iter1237)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -35276,10 +35417,10 @@ class set_ugi_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1206, _size1203) = iprot.readListBegin()
- for _i1207 in xrange(_size1203):
- _elem1208 = iprot.readString()
- self.success.append(_elem1208)
+ (_etype1241, _size1238) = iprot.readListBegin()
+ for _i1242 in xrange(_size1238):
+ _elem1243 = iprot.readString()
+ self.success.append(_elem1243)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -35302,8 +35443,8 @@ class set_ugi_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1209 in self.success:
- oprot.writeString(iter1209)
+ for iter1244 in self.success:
+ oprot.writeString(iter1244)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -36235,10 +36376,10 @@ class get_all_token_identifiers_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1213, _size1210) = iprot.readListBegin()
- for _i1214 in xrange(_size1210):
- _elem1215 = iprot.readString()
- self.success.append(_elem1215)
+ (_etype1248, _size1245) = iprot.readListBegin()
+ for _i1249 in xrange(_size1245):
+ _elem1250 = iprot.readString()
+ self.success.append(_elem1250)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -36255,8 +36396,8 @@ class get_all_token_identifiers_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1216 in self.success:
- oprot.writeString(iter1216)
+ for iter1251 in self.success:
+ oprot.writeString(iter1251)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -36783,10 +36924,10 @@ class get_master_keys_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1220, _size1217) = iprot.readListBegin()
- for _i1221 in xrange(_size1217):
- _elem1222 = iprot.readString()
- self.success.append(_elem1222)
+ (_etype1255, _size1252) = iprot.readListBegin()
+ for _i1256 in xrange(_size1252):
+ _elem1257 = iprot.readString()
+ self.success.append(_elem1257)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -36803,8 +36944,8 @@ class get_master_keys_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1223 in self.success:
- oprot.writeString(iter1223)
+ for iter1258 in self.success:
+ oprot.writeString(iter1258)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -37593,6 +37734,338 @@ class commit_txn_result:
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
+ - o
<TRUNCATED>