diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java index f9596f1d15..0271b26d80 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java @@ -42,6 +42,7 @@ private static final org.apache.thrift.protocol.TField OPEN_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("open_txns", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField MIN_OPEN_TXN_FIELD_DESC = new org.apache.thrift.protocol.TField("min_open_txn", org.apache.thrift.protocol.TType.I64, (short)3); 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)4); + private static final org.apache.thrift.protocol.TField READ_ONLY_BITS_FIELD_DESC = new org.apache.thrift.protocol.TField("readOnlyBits", org.apache.thrift.protocol.TType.STRING, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -53,13 +54,15 @@ private List open_txns; // required private long min_open_txn; // optional private ByteBuffer abortedBits; // required + private ByteBuffer readOnlyBits; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TXN_HIGH_WATER_MARK((short)1, "txn_high_water_mark"), OPEN_TXNS((short)2, "open_txns"), MIN_OPEN_TXN((short)3, "min_open_txn"), - ABORTED_BITS((short)4, "abortedBits"); + ABORTED_BITS((short)4, "abortedBits"), + READ_ONLY_BITS((short)5, "readOnlyBits"); private static final Map byName = new HashMap(); @@ -82,6 +85,8 @@ public static _Fields findByThriftId(int fieldId) { return MIN_OPEN_TXN; case 4: // ABORTED_BITS return ABORTED_BITS; + case 5: // READ_ONLY_BITS + return READ_ONLY_BITS; default: return null; } @@ -125,7 +130,7 @@ public String getFieldName() { private static final int __TXN_HIGH_WATER_MARK_ISSET_ID = 0; private static final int __MIN_OPEN_TXN_ISSET_ID = 1; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MIN_OPEN_TXN}; + private static final _Fields optionals[] = {_Fields.MIN_OPEN_TXN,_Fields.READ_ONLY_BITS}; 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); @@ -138,6 +143,8 @@ public String getFieldName() { 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))); + tmpMap.put(_Fields.READ_ONLY_BITS, new org.apache.thrift.meta_data.FieldMetaData("readOnlyBits", org.apache.thrift.TFieldRequirementType.OPTIONAL, + 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(GetOpenTxnsResponse.class, metaDataMap); } @@ -171,6 +178,9 @@ public GetOpenTxnsResponse(GetOpenTxnsResponse other) { if (other.isSetAbortedBits()) { this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(other.abortedBits); } + if (other.isSetReadOnlyBits()) { + this.readOnlyBits = org.apache.thrift.TBaseHelper.copyBinary(other.readOnlyBits); + } } public GetOpenTxnsResponse deepCopy() { @@ -185,6 +195,7 @@ public void clear() { setMin_open_txnIsSet(false); this.min_open_txn = 0; this.abortedBits = null; + this.readOnlyBits = null; } public long getTxn_high_water_mark() { @@ -301,6 +312,38 @@ public void setAbortedBitsIsSet(boolean value) { } } + public byte[] getReadOnlyBits() { + setReadOnlyBits(org.apache.thrift.TBaseHelper.rightSize(readOnlyBits)); + return readOnlyBits == null ? null : readOnlyBits.array(); + } + + public ByteBuffer bufferForReadOnlyBits() { + return org.apache.thrift.TBaseHelper.copyBinary(readOnlyBits); + } + + public void setReadOnlyBits(byte[] readOnlyBits) { + this.readOnlyBits = readOnlyBits == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(readOnlyBits, readOnlyBits.length)); + } + + public void setReadOnlyBits(ByteBuffer readOnlyBits) { + this.readOnlyBits = org.apache.thrift.TBaseHelper.copyBinary(readOnlyBits); + } + + public void unsetReadOnlyBits() { + this.readOnlyBits = null; + } + + /** Returns true if field readOnlyBits is set (has been assigned a value) and false otherwise */ + public boolean isSetReadOnlyBits() { + return this.readOnlyBits != null; + } + + public void setReadOnlyBitsIsSet(boolean value) { + if (!value) { + this.readOnlyBits = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case TXN_HIGH_WATER_MARK: @@ -335,6 +378,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case READ_ONLY_BITS: + if (value == null) { + unsetReadOnlyBits(); + } else { + setReadOnlyBits((ByteBuffer)value); + } + break; + } } @@ -352,6 +403,9 @@ public Object getFieldValue(_Fields field) { case ABORTED_BITS: return getAbortedBits(); + case READ_ONLY_BITS: + return getReadOnlyBits(); + } throw new IllegalStateException(); } @@ -371,6 +425,8 @@ public boolean isSet(_Fields field) { return isSetMin_open_txn(); case ABORTED_BITS: return isSetAbortedBits(); + case READ_ONLY_BITS: + return isSetReadOnlyBits(); } throw new IllegalStateException(); } @@ -424,6 +480,15 @@ public boolean equals(GetOpenTxnsResponse that) { return false; } + boolean this_present_readOnlyBits = true && this.isSetReadOnlyBits(); + boolean that_present_readOnlyBits = true && that.isSetReadOnlyBits(); + if (this_present_readOnlyBits || that_present_readOnlyBits) { + if (!(this_present_readOnlyBits && that_present_readOnlyBits)) + return false; + if (!this.readOnlyBits.equals(that.readOnlyBits)) + return false; + } + return true; } @@ -451,6 +516,11 @@ public int hashCode() { if (present_abortedBits) list.add(abortedBits); + boolean present_readOnlyBits = true && (isSetReadOnlyBits()); + list.add(present_readOnlyBits); + if (present_readOnlyBits) + list.add(readOnlyBits); + return list.hashCode(); } @@ -502,6 +572,16 @@ public int compareTo(GetOpenTxnsResponse other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetReadOnlyBits()).compareTo(other.isSetReadOnlyBits()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReadOnlyBits()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.readOnlyBits, other.readOnlyBits); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -547,6 +627,16 @@ public String toString() { org.apache.thrift.TBaseHelper.toString(this.abortedBits, sb); } first = false; + if (isSetReadOnlyBits()) { + if (!first) sb.append(", "); + sb.append("readOnlyBits:"); + if (this.readOnlyBits == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.readOnlyBits, sb); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -646,6 +736,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsResponse org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 5: // READ_ONLY_BITS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.readOnlyBits = iprot.readBinary(); + struct.setReadOnlyBitsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -684,6 +782,13 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetOpenTxnsRespons oprot.writeBinary(struct.abortedBits); oprot.writeFieldEnd(); } + if (struct.readOnlyBits != null) { + if (struct.isSetReadOnlyBits()) { + oprot.writeFieldBegin(READ_ONLY_BITS_FIELD_DESC); + oprot.writeBinary(struct.readOnlyBits); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -714,10 +819,16 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse if (struct.isSetMin_open_txn()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetReadOnlyBits()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetMin_open_txn()) { oprot.writeI64(struct.min_open_txn); } + if (struct.isSetReadOnlyBits()) { + oprot.writeBinary(struct.readOnlyBits); + } } @Override @@ -738,11 +849,15 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse struct.setOpen_txnsIsSet(true); struct.abortedBits = iprot.readBinary(); struct.setAbortedBitsIsSet(true); - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.min_open_txn = iprot.readI64(); struct.setMin_open_txnIsSet(true); } + if (incoming.get(1)) { + struct.readOnlyBits = iprot.readBinary(); + struct.setReadOnlyBitsIsSet(true); + } } } diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php index 03aa9bdb93..b0d68992fd 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php @@ -17531,6 +17531,10 @@ class GetOpenTxnsResponse { * @var string */ public $abortedBits = null; + /** + * @var string + */ + public $readOnlyBits = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -17555,6 +17559,10 @@ class GetOpenTxnsResponse { 'var' => 'abortedBits', 'type' => TType::STRING, ), + 5 => array( + 'var' => 'readOnlyBits', + 'type' => TType::STRING, + ), ); } if (is_array($vals)) { @@ -17570,6 +17578,9 @@ class GetOpenTxnsResponse { if (isset($vals['abortedBits'])) { $this->abortedBits = $vals['abortedBits']; } + if (isset($vals['readOnlyBits'])) { + $this->readOnlyBits = $vals['readOnlyBits']; + } } } @@ -17630,6 +17641,13 @@ class GetOpenTxnsResponse { $xfer += $input->skip($ftype); } break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->readOnlyBits); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -17675,6 +17693,11 @@ class GetOpenTxnsResponse { $xfer += $output->writeString($this->abortedBits); $xfer += $output->writeFieldEnd(); } + if ($this->readOnlyBits !== null) { + $xfer += $output->writeFieldBegin('readOnlyBits', TType::STRING, 5); + $xfer += $output->writeString($this->readOnlyBits); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py index d4fefff62d..cba9d26762 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -12141,6 +12141,7 @@ class GetOpenTxnsResponse: - open_txns - min_open_txn - abortedBits + - readOnlyBits """ thrift_spec = ( @@ -12149,13 +12150,15 @@ class GetOpenTxnsResponse: (2, TType.LIST, 'open_txns', (TType.I64,None), None, ), # 2 (3, TType.I64, 'min_open_txn', None, None, ), # 3 (4, TType.STRING, 'abortedBits', None, None, ), # 4 + (5, TType.STRING, 'readOnlyBits', None, None, ), # 5 ) - def __init__(self, txn_high_water_mark=None, open_txns=None, min_open_txn=None, abortedBits=None,): + def __init__(self, txn_high_water_mark=None, open_txns=None, min_open_txn=None, abortedBits=None, readOnlyBits=None,): self.txn_high_water_mark = txn_high_water_mark self.open_txns = open_txns self.min_open_txn = min_open_txn self.abortedBits = abortedBits + self.readOnlyBits = readOnlyBits 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: @@ -12191,6 +12194,11 @@ def read(self, iprot): self.abortedBits = iprot.readString() else: iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.readOnlyBits = iprot.readString() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -12220,6 +12228,10 @@ def write(self, oprot): oprot.writeFieldBegin('abortedBits', TType.STRING, 4) oprot.writeString(self.abortedBits) oprot.writeFieldEnd() + if self.readOnlyBits is not None: + oprot.writeFieldBegin('readOnlyBits', TType.STRING, 5) + oprot.writeString(self.readOnlyBits) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12239,6 +12251,7 @@ def __hash__(self): value = (value * 31) ^ hash(self.open_txns) value = (value * 31) ^ hash(self.min_open_txn) value = (value * 31) ^ hash(self.abortedBits) + value = (value * 31) ^ hash(self.readOnlyBits) return value def __repr__(self): diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb index 4863de6de2..6bd70974d7 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -2696,12 +2696,14 @@ class GetOpenTxnsResponse OPEN_TXNS = 2 MIN_OPEN_TXN = 3 ABORTEDBITS = 4 + READONLYBITS = 5 FIELDS = { TXN_HIGH_WATER_MARK => {:type => ::Thrift::Types::I64, :name => 'txn_high_water_mark'}, OPEN_TXNS => {:type => ::Thrift::Types::LIST, :name => 'open_txns', :element => {:type => ::Thrift::Types::I64}}, MIN_OPEN_TXN => {:type => ::Thrift::Types::I64, :name => 'min_open_txn', :optional => true}, - ABORTEDBITS => {:type => ::Thrift::Types::STRING, :name => 'abortedBits', :binary => true} + ABORTEDBITS => {:type => ::Thrift::Types::STRING, :name => 'abortedBits', :binary => true}, + READONLYBITS => {:type => ::Thrift::Types::STRING, :name => 'readOnlyBits', :binary => true, :optional => true} } def struct_fields; FIELDS; end diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnCommonUtils.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnCommonUtils.java index 43cc805943..6784b0e157 100644 --- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnCommonUtils.java +++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnCommonUtils.java @@ -25,6 +25,7 @@ import org.apache.hadoop.hive.metastore.api.GetOpenTxnsResponse; import org.apache.hadoop.hive.metastore.api.TableValidWriteIds; +import java.util.Arrays; import java.util.BitSet; import java.util.Collections; import java.util.List; @@ -66,8 +67,9 @@ public static ValidTxnList createValidReadTxnList(GetOpenTxnsResponse txns, long long[] exceptions = new long[sizeToHwm]; BitSet inAbortedBits = BitSet.valueOf(txns.getAbortedBits()); BitSet outAbortedBits = new BitSet(); + BitSet readOnlyBits = BitSet.valueOf(txns.getReadOnlyBits()); long minOpenTxnId = Long.MAX_VALUE; - int i = 0; + int i = 0, j = 0; for (long txn : openTxns) { // For snapshot isolation, we don't care about txns greater than current txn and so stop here. // Also, we need not include current txn to exceptions list. @@ -75,13 +77,17 @@ public static ValidTxnList createValidReadTxnList(GetOpenTxnsResponse txns, long break; } if (inAbortedBits.get(i)) { - outAbortedBits.set(i); + outAbortedBits.set(j); } else if (minOpenTxnId == Long.MAX_VALUE) { minOpenTxnId = txn; } - exceptions[i++] = txn; + if (!readOnlyBits.get(i)) { + exceptions[j++] = txn; + } + i++; } - return new ValidReadTxnList(exceptions, outAbortedBits, highWaterMark, minOpenTxnId); + return new ValidReadTxnList( + Arrays.copyOf(exceptions, j), outAbortedBits, highWaterMark, minOpenTxnId); } /** diff --git a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift index 449393c73c..daaf442695 100644 --- a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift +++ b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift @@ -927,6 +927,7 @@ struct GetOpenTxnsResponse { 2: required list open_txns, // set changed to list since 3.0 3: optional i64 min_open_txn, //since 1.3,2.2 4: required binary abortedBits, // since 3.0 + 5: optional binary readOnlyBits, } struct OpenTxnRequest { diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java index 355c4f5374..3a13bdf748 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java @@ -456,25 +456,31 @@ public GetOpenTxnsResponse getOpenTxns() throws MetaException { close(rs); List openList = new ArrayList<>(); //need the WHERE clause below to ensure consistent results with READ_COMMITTED - s = "select txn_id, txn_state from TXNS where txn_id <= " + hwm + " order by txn_id"; + s = "select txn_id, txn_state, txn_type from TXNS where txn_id <= " + hwm + " order by txn_id"; LOG.debug("Going to execute query<" + s + ">"); rs = stmt.executeQuery(s); long minOpenTxn = Long.MAX_VALUE; - BitSet abortedBits = new BitSet(); + BitSet abortedBits = new BitSet(), readOnlyBits = new BitSet(); while (rs.next()) { long txnId = rs.getLong(1); openList.add(txnId); char c = rs.getString(2).charAt(0); - if(c == TXN_OPEN) { + if (c == TXN_OPEN) { minOpenTxn = Math.min(minOpenTxn, txnId); } else if (c == TXN_ABORTED) { abortedBits.set(openList.size() - 1); } + TxnType txnType = TxnType.findByValue(rs.getInt(3)); + if (txnType == TxnType.READ_ONLY) { + readOnlyBits.set(openList.size() - 1); + } } LOG.debug("Going to rollback"); dbConn.rollback(); - ByteBuffer byteBuffer = ByteBuffer.wrap(abortedBits.toByteArray()); - GetOpenTxnsResponse otr = new GetOpenTxnsResponse(hwm, openList, byteBuffer); + + GetOpenTxnsResponse otr = new GetOpenTxnsResponse(hwm, openList, ByteBuffer.wrap(abortedBits.toByteArray())); + otr.setReadOnlyBits(ByteBuffer.wrap(readOnlyBits.toByteArray())); + if(minOpenTxn < Long.MAX_VALUE) { otr.setMin_open_txn(minOpenTxn); } diff --git a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java index 66ac08777e..d1eff88415 100644 --- a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java +++ b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java @@ -97,6 +97,19 @@ public void testOpenTxnNotExcluded() throws Exception { Assert.assertFalse(validTxns.isTxnValid(4)); } + @Test + public void testOpenReadOnlyTxnExcluded() throws Exception { + client.openTxn("me", TxnType.READ_ONLY); + client.openTxns("me", 3); + client.rollbackTxn(2); + client.commitTxn(3); + ValidTxnList validTxns = client.getValidTxns(4); + Assert.assertTrue(validTxns.isTxnValid(1)); + Assert.assertFalse(validTxns.isTxnValid(2)); + Assert.assertTrue(validTxns.isTxnValid(3)); + Assert.assertTrue(validTxns.isTxnValid(4)); + } + @Test public void testTxNWithKeyValue() throws Exception { Statement stm = conn.createStatement(); @@ -317,12 +330,6 @@ public void testTxnTypePersisted() throws Exception { Assert.assertEquals(TxnType.findByValue(rs.getInt(1)), TxnType.READ_ONLY); } - @Test(expected = IllegalStateException.class) - public void testAllocateTableWriteIdForReadOnlyTxn() throws Exception { - long txnId = client.openTxn("me", TxnType.READ_ONLY); - client.allocateTableWriteId(txnId, "db", "tbl"); - } - @Before public void setUp() throws Exception { conf.setBoolean(ConfVars.HIVE_IN_TEST.getVarname(), true);