diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java b/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java index b6a6349709f..b9f197ceca4 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java @@ -856,6 +856,7 @@ public class ThriftServerRunner implements Runnable { } else { delete.deleteColumns(famAndQf[0], famAndQf[1], timestamp); } + delete.setWriteToWAL(m.writeToWAL); } else { if(famAndQf.length == 1) { put.add(famAndQf[0], HConstants.EMPTY_BYTE_ARRAY, @@ -866,6 +867,7 @@ public class ThriftServerRunner implements Runnable { m.value != null ? m.value.array() : HConstants.EMPTY_BYTE_ARRAY); } + put.setWriteToWAL(m.writeToWAL); } } if (!delete.isEmpty()) @@ -906,6 +908,7 @@ public class ThriftServerRunner implements Runnable { } else { delete.deleteColumns(famAndQf[0], famAndQf[1], timestamp); } + delete.setWriteToWAL(m.writeToWAL); } else { if(famAndQf.length == 1) { put.add(famAndQf[0], HConstants.EMPTY_BYTE_ARRAY, @@ -916,6 +919,7 @@ public class ThriftServerRunner implements Runnable { m.value != null ? m.value.array() : HConstants.EMPTY_BYTE_ARRAY); } + put.setWriteToWAL(m.writeToWAL); } } if (!delete.isEmpty()) diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java index 90c2f1ae423..d5df9407756 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java @@ -437,7 +437,7 @@ public class BatchMutation implements org.apache.thrift.TBase(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - Mutation _elem2; // required + Mutation _elem2; // optional _elem2 = new Mutation(); _elem2.read(iprot); struct.mutations.add(_elem2); @@ -534,7 +534,7 @@ public class BatchMutation implements org.apache.thrift.TBase(_list5.size); for (int _i6 = 0; _i6 < _list5.size; ++_i6) { - Mutation _elem7; // required + Mutation _elem7; // optional _elem7 = new Mutation(); _elem7.read(iprot); struct.mutations.add(_elem7); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java index 81f330531d0..8e2aa3fe97a 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java @@ -6372,8 +6372,6 @@ public class Hbase { 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_bit_vector = new BitSet(1); 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); @@ -8559,7 +8557,7 @@ public class Hbase { struct.success = new ArrayList(_list26.size); for (int _i27 = 0; _i27 < _list26.size; ++_i27) { - ByteBuffer _elem28; // required + ByteBuffer _elem28; // optional _elem28 = iprot.readBinary(); struct.success.add(_elem28); } @@ -8660,7 +8658,7 @@ public class Hbase { struct.success = new ArrayList(_list31.size); for (int _i32 = 0; _i32 < _list31.size; ++_i32) { - ByteBuffer _elem33; // required + ByteBuffer _elem33; // optional _elem33 = iprot.readBinary(); struct.success.add(_elem33); } @@ -9447,7 +9445,7 @@ public class Hbase { for (int _i35 = 0; _i35 < _map34.size; ++_i35) { ByteBuffer _key36; // required - ColumnDescriptor _val37; // optional + ColumnDescriptor _val37; // required _key36 = iprot.readBinary(); _val37 = new ColumnDescriptor(); _val37.read(iprot); @@ -9553,7 +9551,7 @@ public class Hbase { for (int _i41 = 0; _i41 < _map40.size; ++_i41) { ByteBuffer _key42; // required - ColumnDescriptor _val43; // optional + ColumnDescriptor _val43; // required _key42 = iprot.readBinary(); _val43 = new ColumnDescriptor(); _val43.read(iprot); @@ -10336,7 +10334,7 @@ public class Hbase { struct.success = new ArrayList(_list44.size); for (int _i45 = 0; _i45 < _list44.size; ++_i45) { - TRegionInfo _elem46; // required + TRegionInfo _elem46; // optional _elem46 = new TRegionInfo(); _elem46.read(iprot); struct.success.add(_elem46); @@ -10438,7 +10436,7 @@ public class Hbase { struct.success = new ArrayList(_list49.size); for (int _i50 = 0; _i50 < _list49.size; ++_i50) { - TRegionInfo _elem51; // required + TRegionInfo _elem51; // optional _elem51 = new TRegionInfo(); _elem51.read(iprot); struct.success.add(_elem51); @@ -10887,7 +10885,7 @@ public class Hbase { struct.columnFamilies = new ArrayList(_list52.size); for (int _i53 = 0; _i53 < _list52.size; ++_i53) { - ColumnDescriptor _elem54; // required + ColumnDescriptor _elem54; // optional _elem54 = new ColumnDescriptor(); _elem54.read(iprot); struct.columnFamilies.add(_elem54); @@ -10984,7 +10982,7 @@ public class Hbase { struct.columnFamilies = new ArrayList(_list57.size); for (int _i58 = 0; _i58 < _list57.size; ++_i58) { - ColumnDescriptor _elem59; // required + ColumnDescriptor _elem59; // optional _elem59 = new ColumnDescriptor(); _elem59.read(iprot); struct.columnFamilies.add(_elem59); @@ -13294,7 +13292,7 @@ public class Hbase { struct.success = new ArrayList(_list60.size); for (int _i61 = 0; _i61 < _list60.size; ++_i61) { - TCell _elem62; // required + TCell _elem62; // optional _elem62 = new TCell(); _elem62.read(iprot); struct.success.add(_elem62); @@ -13396,7 +13394,7 @@ public class Hbase { struct.success = new ArrayList(_list65.size); for (int _i66 = 0; _i66 < _list65.size; ++_i66) { - TCell _elem67; // required + TCell _elem67; // optional _elem67 = new TCell(); _elem67.read(iprot); struct.success.add(_elem67); @@ -14533,7 +14531,7 @@ public class Hbase { struct.success = new ArrayList(_list68.size); for (int _i69 = 0; _i69 < _list68.size; ++_i69) { - TCell _elem70; // required + TCell _elem70; // optional _elem70 = new TCell(); _elem70.read(iprot); struct.success.add(_elem70); @@ -14635,7 +14633,7 @@ public class Hbase { struct.success = new ArrayList(_list73.size); for (int _i74 = 0; _i74 < _list73.size; ++_i74) { - TCell _elem75; // required + TCell _elem75; // optional _elem75 = new TCell(); _elem75.read(iprot); struct.success.add(_elem75); @@ -15876,7 +15874,7 @@ public class Hbase { struct.success = new ArrayList(_list76.size); for (int _i77 = 0; _i77 < _list76.size; ++_i77) { - TCell _elem78; // required + TCell _elem78; // optional _elem78 = new TCell(); _elem78.read(iprot); struct.success.add(_elem78); @@ -15978,7 +15976,7 @@ public class Hbase { struct.success = new ArrayList(_list81.size); for (int _i82 = 0; _i82 < _list81.size; ++_i82) { - TCell _elem83; // required + TCell _elem83; // optional _elem83 = new TCell(); _elem83.read(iprot); struct.success.add(_elem83); @@ -16882,7 +16880,7 @@ public class Hbase { struct.success = new ArrayList(_list84.size); for (int _i85 = 0; _i85 < _list84.size; ++_i85) { - TRowResult _elem86; // required + TRowResult _elem86; // optional _elem86 = new TRowResult(); _elem86.read(iprot); struct.success.add(_elem86); @@ -16984,7 +16982,7 @@ public class Hbase { struct.success = new ArrayList(_list89.size); for (int _i90 = 0; _i90 < _list89.size; ++_i90) { - TRowResult _elem91; // required + TRowResult _elem91; // optional _elem91 = new TRowResult(); _elem91.read(iprot); struct.success.add(_elem91); @@ -17540,7 +17538,7 @@ public class Hbase { struct.columns = new ArrayList(_list92.size); for (int _i93 = 0; _i93 < _list92.size; ++_i93) { - ByteBuffer _elem94; // required + ByteBuffer _elem94; // optional _elem94 = iprot.readBinary(); struct.columns.add(_elem94); } @@ -17651,7 +17649,7 @@ public class Hbase { struct.columns = new ArrayList(_list97.size); for (int _i98 = 0; _i98 < _list97.size; ++_i98) { - ByteBuffer _elem99; // required + ByteBuffer _elem99; // optional _elem99 = iprot.readBinary(); struct.columns.add(_elem99); } @@ -18052,7 +18050,7 @@ public class Hbase { struct.success = new ArrayList(_list100.size); for (int _i101 = 0; _i101 < _list100.size; ++_i101) { - TRowResult _elem102; // required + TRowResult _elem102; // optional _elem102 = new TRowResult(); _elem102.read(iprot); struct.success.add(_elem102); @@ -18154,7 +18152,7 @@ public class Hbase { struct.success = new ArrayList(_list105.size); for (int _i106 = 0; _i106 < _list105.size; ++_i106) { - TRowResult _elem107; // required + TRowResult _elem107; // optional _elem107 = new TRowResult(); _elem107.read(iprot); struct.success.add(_elem107); @@ -19169,7 +19167,7 @@ public class Hbase { struct.success = new ArrayList(_list108.size); for (int _i109 = 0; _i109 < _list108.size; ++_i109) { - TRowResult _elem110; // required + TRowResult _elem110; // optional _elem110 = new TRowResult(); _elem110.read(iprot); struct.success.add(_elem110); @@ -19271,7 +19269,7 @@ public class Hbase { struct.success = new ArrayList(_list113.size); for (int _i114 = 0; _i114 < _list113.size; ++_i114) { - TRowResult _elem115; // required + TRowResult _elem115; // optional _elem115 = new TRowResult(); _elem115.read(iprot); struct.success.add(_elem115); @@ -19905,7 +19903,7 @@ public class Hbase { struct.columns = new ArrayList(_list116.size); for (int _i117 = 0; _i117 < _list116.size; ++_i117) { - ByteBuffer _elem118; // required + ByteBuffer _elem118; // optional _elem118 = iprot.readBinary(); struct.columns.add(_elem118); } @@ -20033,7 +20031,7 @@ public class Hbase { struct.columns = new ArrayList(_list121.size); for (int _i122 = 0; _i122 < _list121.size; ++_i122) { - ByteBuffer _elem123; // required + ByteBuffer _elem123; // optional _elem123 = iprot.readBinary(); struct.columns.add(_elem123); } @@ -20438,7 +20436,7 @@ public class Hbase { struct.success = new ArrayList(_list124.size); for (int _i125 = 0; _i125 < _list124.size; ++_i125) { - TRowResult _elem126; // required + TRowResult _elem126; // optional _elem126 = new TRowResult(); _elem126.read(iprot); struct.success.add(_elem126); @@ -20540,7 +20538,7 @@ public class Hbase { struct.success = new ArrayList(_list129.size); for (int _i130 = 0; _i130 < _list129.size; ++_i130) { - TRowResult _elem131; // required + TRowResult _elem131; // optional _elem131 = new TRowResult(); _elem131.read(iprot); struct.success.add(_elem131); @@ -20989,7 +20987,7 @@ public class Hbase { struct.rows = new ArrayList(_list132.size); for (int _i133 = 0; _i133 < _list132.size; ++_i133) { - ByteBuffer _elem134; // required + ByteBuffer _elem134; // optional _elem134 = iprot.readBinary(); struct.rows.add(_elem134); } @@ -21085,7 +21083,7 @@ public class Hbase { struct.rows = new ArrayList(_list137.size); for (int _i138 = 0; _i138 < _list137.size; ++_i138) { - ByteBuffer _elem139; // required + ByteBuffer _elem139; // optional _elem139 = iprot.readBinary(); struct.rows.add(_elem139); } @@ -21486,7 +21484,7 @@ public class Hbase { struct.success = new ArrayList(_list140.size); for (int _i141 = 0; _i141 < _list140.size; ++_i141) { - TRowResult _elem142; // required + TRowResult _elem142; // optional _elem142 = new TRowResult(); _elem142.read(iprot); struct.success.add(_elem142); @@ -21588,7 +21586,7 @@ public class Hbase { struct.success = new ArrayList(_list145.size); for (int _i146 = 0; _i146 < _list145.size; ++_i146) { - TRowResult _elem147; // required + TRowResult _elem147; // optional _elem147 = new TRowResult(); _elem147.read(iprot); struct.success.add(_elem147); @@ -22146,7 +22144,7 @@ public class Hbase { struct.rows = new ArrayList(_list148.size); for (int _i149 = 0; _i149 < _list148.size; ++_i149) { - ByteBuffer _elem150; // required + ByteBuffer _elem150; // optional _elem150 = iprot.readBinary(); struct.rows.add(_elem150); } @@ -22164,7 +22162,7 @@ public class Hbase { struct.columns = new ArrayList(_list151.size); for (int _i152 = 0; _i152 < _list151.size; ++_i152) { - ByteBuffer _elem153; // required + ByteBuffer _elem153; // optional _elem153 = iprot.readBinary(); struct.columns.add(_elem153); } @@ -22284,7 +22282,7 @@ public class Hbase { struct.rows = new ArrayList(_list158.size); for (int _i159 = 0; _i159 < _list158.size; ++_i159) { - ByteBuffer _elem160; // required + ByteBuffer _elem160; // optional _elem160 = iprot.readBinary(); struct.rows.add(_elem160); } @@ -22297,7 +22295,7 @@ public class Hbase { struct.columns = new ArrayList(_list161.size); for (int _i162 = 0; _i162 < _list161.size; ++_i162) { - ByteBuffer _elem163; // required + ByteBuffer _elem163; // optional _elem163 = iprot.readBinary(); struct.columns.add(_elem163); } @@ -22698,7 +22696,7 @@ public class Hbase { struct.success = new ArrayList(_list164.size); for (int _i165 = 0; _i165 < _list164.size; ++_i165) { - TRowResult _elem166; // required + TRowResult _elem166; // optional _elem166 = new TRowResult(); _elem166.read(iprot); struct.success.add(_elem166); @@ -22800,7 +22798,7 @@ public class Hbase { struct.success = new ArrayList(_list169.size); for (int _i170 = 0; _i170 < _list169.size; ++_i170) { - TRowResult _elem171; // required + TRowResult _elem171; // optional _elem171 = new TRowResult(); _elem171.read(iprot); struct.success.add(_elem171); @@ -23339,7 +23337,7 @@ public class Hbase { struct.rows = new ArrayList(_list172.size); for (int _i173 = 0; _i173 < _list172.size; ++_i173) { - ByteBuffer _elem174; // required + ByteBuffer _elem174; // optional _elem174 = iprot.readBinary(); struct.rows.add(_elem174); } @@ -23452,7 +23450,7 @@ public class Hbase { struct.rows = new ArrayList(_list177.size); for (int _i178 = 0; _i178 < _list177.size; ++_i178) { - ByteBuffer _elem179; // required + ByteBuffer _elem179; // optional _elem179 = iprot.readBinary(); struct.rows.add(_elem179); } @@ -23857,7 +23855,7 @@ public class Hbase { struct.success = new ArrayList(_list180.size); for (int _i181 = 0; _i181 < _list180.size; ++_i181) { - TRowResult _elem182; // required + TRowResult _elem182; // optional _elem182 = new TRowResult(); _elem182.read(iprot); struct.success.add(_elem182); @@ -23959,7 +23957,7 @@ public class Hbase { struct.success = new ArrayList(_list185.size); for (int _i186 = 0; _i186 < _list185.size; ++_i186) { - TRowResult _elem187; // required + TRowResult _elem187; // optional _elem187 = new TRowResult(); _elem187.read(iprot); struct.success.add(_elem187); @@ -24595,7 +24593,7 @@ public class Hbase { struct.rows = new ArrayList(_list188.size); for (int _i189 = 0; _i189 < _list188.size; ++_i189) { - ByteBuffer _elem190; // required + ByteBuffer _elem190; // optional _elem190 = iprot.readBinary(); struct.rows.add(_elem190); } @@ -24613,7 +24611,7 @@ public class Hbase { struct.columns = new ArrayList(_list191.size); for (int _i192 = 0; _i192 < _list191.size; ++_i192) { - ByteBuffer _elem193; // required + ByteBuffer _elem193; // optional _elem193 = iprot.readBinary(); struct.columns.add(_elem193); } @@ -24750,7 +24748,7 @@ public class Hbase { struct.rows = new ArrayList(_list198.size); for (int _i199 = 0; _i199 < _list198.size; ++_i199) { - ByteBuffer _elem200; // required + ByteBuffer _elem200; // optional _elem200 = iprot.readBinary(); struct.rows.add(_elem200); } @@ -24763,7 +24761,7 @@ public class Hbase { struct.columns = new ArrayList(_list201.size); for (int _i202 = 0; _i202 < _list201.size; ++_i202) { - ByteBuffer _elem203; // required + ByteBuffer _elem203; // optional _elem203 = iprot.readBinary(); struct.columns.add(_elem203); } @@ -25168,7 +25166,7 @@ public class Hbase { struct.success = new ArrayList(_list204.size); for (int _i205 = 0; _i205 < _list204.size; ++_i205) { - TRowResult _elem206; // required + TRowResult _elem206; // optional _elem206 = new TRowResult(); _elem206.read(iprot); struct.success.add(_elem206); @@ -25270,7 +25268,7 @@ public class Hbase { struct.success = new ArrayList(_list209.size); for (int _i210 = 0; _i210 < _list209.size; ++_i210) { - TRowResult _elem211; // required + TRowResult _elem211; // optional _elem211 = new TRowResult(); _elem211.read(iprot); struct.success.add(_elem211); @@ -25826,7 +25824,7 @@ public class Hbase { struct.mutations = new ArrayList(_list212.size); for (int _i213 = 0; _i213 < _list212.size; ++_i213) { - Mutation _elem214; // required + Mutation _elem214; // optional _elem214 = new Mutation(); _elem214.read(iprot); struct.mutations.add(_elem214); @@ -25938,7 +25936,7 @@ public class Hbase { struct.mutations = new ArrayList(_list217.size); for (int _i218 = 0; _i218 < _list217.size; ++_i218) { - Mutation _elem219; // required + Mutation _elem219; // optional _elem219 = new Mutation(); _elem219.read(iprot); struct.mutations.add(_elem219); @@ -27036,7 +27034,7 @@ public class Hbase { struct.mutations = new ArrayList(_list220.size); for (int _i221 = 0; _i221 < _list220.size; ++_i221) { - Mutation _elem222; // required + Mutation _elem222; // optional _elem222 = new Mutation(); _elem222.read(iprot); struct.mutations.add(_elem222); @@ -27165,7 +27163,7 @@ public class Hbase { struct.mutations = new ArrayList(_list225.size); for (int _i226 = 0; _i226 < _list225.size; ++_i226) { - Mutation _elem227; // required + Mutation _elem227; // optional _elem227 = new Mutation(); _elem227.read(iprot); struct.mutations.add(_elem227); @@ -28070,7 +28068,7 @@ public class Hbase { struct.rowBatches = new ArrayList(_list228.size); for (int _i229 = 0; _i229 < _list228.size; ++_i229) { - BatchMutation _elem230; // required + BatchMutation _elem230; // optional _elem230 = new BatchMutation(); _elem230.read(iprot); struct.rowBatches.add(_elem230); @@ -28167,7 +28165,7 @@ public class Hbase { struct.rowBatches = new ArrayList(_list233.size); for (int _i234 = 0; _i234 < _list233.size; ++_i234) { - BatchMutation _elem235; // required + BatchMutation _elem235; // optional _elem235 = new BatchMutation(); _elem235.read(iprot); struct.rowBatches.add(_elem235); @@ -29156,7 +29154,7 @@ public class Hbase { struct.rowBatches = new ArrayList(_list236.size); for (int _i237 = 0; _i237 < _list236.size; ++_i237) { - BatchMutation _elem238; // required + BatchMutation _elem238; // optional _elem238 = new BatchMutation(); _elem238.read(iprot); struct.rowBatches.add(_elem238); @@ -29270,7 +29268,7 @@ public class Hbase { struct.rowBatches = new ArrayList(_list241.size); for (int _i242 = 0; _i242 < _list241.size; ++_i242) { - BatchMutation _elem243; // required + BatchMutation _elem243; // optional _elem243 = new BatchMutation(); _elem243.read(iprot); struct.rowBatches.add(_elem243); @@ -30888,8 +30886,6 @@ public class Hbase { 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_bit_vector = new BitSet(1); 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); @@ -35730,8 +35726,6 @@ public class Hbase { 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_bit_vector = new BitSet(1); 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); @@ -36397,7 +36391,7 @@ public class Hbase { struct.columns = new ArrayList(_list244.size); for (int _i245 = 0; _i245 < _list244.size; ++_i245) { - ByteBuffer _elem246; // required + ByteBuffer _elem246; // optional _elem246 = iprot.readBinary(); struct.columns.add(_elem246); } @@ -36508,7 +36502,7 @@ public class Hbase { struct.columns = new ArrayList(_list249.size); for (int _i250 = 0; _i250 < _list249.size; ++_i250) { - ByteBuffer _elem251; // required + ByteBuffer _elem251; // optional _elem251 = iprot.readBinary(); struct.columns.add(_elem251); } @@ -36857,8 +36851,6 @@ public class Hbase { 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_bit_vector = new BitSet(1); 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); @@ -37635,7 +37627,7 @@ public class Hbase { struct.columns = new ArrayList(_list252.size); for (int _i253 = 0; _i253 < _list252.size; ++_i253) { - ByteBuffer _elem254; // required + ByteBuffer _elem254; // optional _elem254 = iprot.readBinary(); struct.columns.add(_elem254); } @@ -37761,7 +37753,7 @@ public class Hbase { struct.columns = new ArrayList(_list257.size); for (int _i258 = 0; _i258 < _list257.size; ++_i258) { - ByteBuffer _elem259; // required + ByteBuffer _elem259; // optional _elem259 = iprot.readBinary(); struct.columns.add(_elem259); } @@ -38110,8 +38102,6 @@ public class Hbase { 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_bit_vector = new BitSet(1); 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); @@ -38765,7 +38755,7 @@ public class Hbase { struct.columns = new ArrayList(_list260.size); for (int _i261 = 0; _i261 < _list260.size; ++_i261) { - ByteBuffer _elem262; // required + ByteBuffer _elem262; // optional _elem262 = iprot.readBinary(); struct.columns.add(_elem262); } @@ -38876,7 +38866,7 @@ public class Hbase { struct.columns = new ArrayList(_list265.size); for (int _i266 = 0; _i266 < _list265.size; ++_i266) { - ByteBuffer _elem267; // required + ByteBuffer _elem267; // optional _elem267 = iprot.readBinary(); struct.columns.add(_elem267); } @@ -39225,8 +39215,6 @@ public class Hbase { 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_bit_vector = new BitSet(1); 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); @@ -39980,7 +39968,7 @@ public class Hbase { struct.columns = new ArrayList(_list268.size); for (int _i269 = 0; _i269 < _list268.size; ++_i269) { - ByteBuffer _elem270; // required + ByteBuffer _elem270; // optional _elem270 = iprot.readBinary(); struct.columns.add(_elem270); } @@ -40108,7 +40096,7 @@ public class Hbase { struct.columns = new ArrayList(_list273.size); for (int _i274 = 0; _i274 < _list273.size; ++_i274) { - ByteBuffer _elem275; // required + ByteBuffer _elem275; // optional _elem275 = iprot.readBinary(); struct.columns.add(_elem275); } @@ -40461,8 +40449,6 @@ public class Hbase { 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_bit_vector = new BitSet(1); 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); @@ -41327,7 +41313,7 @@ public class Hbase { struct.columns = new ArrayList(_list276.size); for (int _i277 = 0; _i277 < _list276.size; ++_i277) { - ByteBuffer _elem278; // required + ByteBuffer _elem278; // optional _elem278 = iprot.readBinary(); struct.columns.add(_elem278); } @@ -41470,7 +41456,7 @@ public class Hbase { struct.columns = new ArrayList(_list281.size); for (int _i282 = 0; _i282 < _list281.size; ++_i282) { - ByteBuffer _elem283; // required + ByteBuffer _elem283; // optional _elem283 = iprot.readBinary(); struct.columns.add(_elem283); } @@ -41823,8 +41809,6 @@ public class Hbase { 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_bit_vector = new BitSet(1); 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); @@ -42770,7 +42754,7 @@ public class Hbase { struct.success = new ArrayList(_list284.size); for (int _i285 = 0; _i285 < _list284.size; ++_i285) { - TRowResult _elem286; // required + TRowResult _elem286; // optional _elem286 = new TRowResult(); _elem286.read(iprot); struct.success.add(_elem286); @@ -42892,7 +42876,7 @@ public class Hbase { struct.success = new ArrayList(_list289.size); for (int _i290 = 0; _i290 < _list289.size; ++_i290) { - TRowResult _elem291; // required + TRowResult _elem291; // optional _elem291 = new TRowResult(); _elem291.read(iprot); struct.success.add(_elem291); @@ -43849,7 +43833,7 @@ public class Hbase { struct.success = new ArrayList(_list292.size); for (int _i293 = 0; _i293 < _list292.size; ++_i293) { - TRowResult _elem294; // required + TRowResult _elem294; // optional _elem294 = new TRowResult(); _elem294.read(iprot); struct.success.add(_elem294); @@ -43971,7 +43955,7 @@ public class Hbase { struct.success = new ArrayList(_list297.size); for (int _i298 = 0; _i298 < _list297.size; ++_i298) { - TRowResult _elem299; // required + TRowResult _elem299; // optional _elem299 = new TRowResult(); _elem299.read(iprot); struct.success.add(_elem299); @@ -45823,7 +45807,7 @@ public class Hbase { struct.success = new ArrayList(_list300.size); for (int _i301 = 0; _i301 < _list300.size; ++_i301) { - TCell _elem302; // required + TCell _elem302; // optional _elem302 = new TCell(); _elem302.read(iprot); struct.success.add(_elem302); @@ -45925,7 +45909,7 @@ public class Hbase { struct.success = new ArrayList(_list305.size); for (int _i306 = 0; _i306 < _list305.size; ++_i306) { - TCell _elem307; // required + TCell _elem307; // optional _elem307 = new TCell(); _elem307.read(iprot); struct.success.add(_elem307); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java index 85014c3ccce..ef1817f4cb0 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java @@ -36,6 +36,7 @@ public class Mutation implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -46,12 +47,14 @@ public class Mutation implements org.apache.thrift.TBase byName = new HashMap(); @@ -72,6 +75,8 @@ public class Mutation implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -123,6 +129,8 @@ public class Mutation implements org.apache.thrift.TBase, jav struct.columns = new ArrayList(_list18.size); for (int _i19 = 0; _i19 < _list18.size; ++_i19) { - ByteBuffer _elem20; // required + ByteBuffer _elem20; // optional _elem20 = iprot.readBinary(); struct.columns.add(_elem20); } @@ -944,7 +944,7 @@ public class TScan implements org.apache.thrift.TBase, jav struct.columns = new ArrayList(_list23.size); for (int _i24 = 0; _i24 < _list23.size; ++_i24) { - ByteBuffer _elem25; // required + ByteBuffer _elem25; // optional _elem25 = iprot.readBinary(); struct.columns.add(_elem25); } diff --git a/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java b/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java index 9aa31f3f33d..b63ed74e933 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java @@ -226,7 +226,7 @@ public class ThriftUtilities { out = new Delete(in.getRow()); } } - + out.setWriteToWAL(in.isWriteToWal()); return out; } diff --git a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java index bdc4c965707..a732d7a0fa8 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java @@ -57,6 +57,7 @@ public class TDelete implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -72,6 +73,7 @@ public class TDelete implements org.apache.thrift.TBase byName = new HashMap(); @@ -105,6 +108,8 @@ public class TDelete implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -160,6 +166,8 @@ public class TDelete implements org.apache.thrift.TBase(_list24.size); for (int _i25 = 0; _i25 < _list24.size; ++_i25) { - TColumn _elem26; // required + TColumn _elem26; // optional _elem26 = new TColumn(); _elem26.read(iprot); struct.columns.add(_elem26); @@ -663,6 +737,14 @@ public class TDelete implements org.apache.thrift.TBase(_list29.size); for (int _i30 = 0; _i30 < _list29.size; ++_i30) { - TColumn _elem31; // required + TColumn _elem31; // optional _elem31 = new TColumn(); _elem31.read(iprot); struct.columns.add(_elem31); @@ -783,6 +876,10 @@ public class TDelete implements org.apache.thrift.TBase, java.i struct.columns = new ArrayList(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { - TColumn _elem10; // required + TColumn _elem10; // optional _elem10 = new TColumn(); _elem10.read(iprot); struct.columns.add(_elem10); @@ -832,7 +832,7 @@ public class TGet implements org.apache.thrift.TBase, java.i struct.columns = new ArrayList(_list13.size); for (int _i14 = 0; _i14 < _list13.size; ++_i14) { - TColumn _elem15; // required + TColumn _elem15; // optional _elem15 = new TColumn(); _elem15.read(iprot); struct.columns.add(_elem15); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java index 45b6e64cfaf..56289987eae 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java @@ -2207,8 +2207,6 @@ public class THBaseService { 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_bit_vector = new BitSet(1); 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); @@ -3706,7 +3704,7 @@ public class THBaseService { struct.gets = new ArrayList(_list48.size); for (int _i49 = 0; _i49 < _list48.size; ++_i49) { - TGet _elem50; // required + TGet _elem50; // optional _elem50 = new TGet(); _elem50.read(iprot); struct.gets.add(_elem50); @@ -3787,7 +3785,7 @@ public class THBaseService { struct.gets = new ArrayList(_list53.size); for (int _i54 = 0; _i54 < _list53.size; ++_i54) { - TGet _elem55; // required + TGet _elem55; // optional _elem55 = new TGet(); _elem55.read(iprot); struct.gets.add(_elem55); @@ -4188,7 +4186,7 @@ public class THBaseService { struct.success = new ArrayList(_list56.size); for (int _i57 = 0; _i57 < _list56.size; ++_i57) { - TResult _elem58; // required + TResult _elem58; // optional _elem58 = new TResult(); _elem58.read(iprot); struct.success.add(_elem58); @@ -4290,7 +4288,7 @@ public class THBaseService { struct.success = new ArrayList(_list61.size); for (int _i62 = 0; _i62 < _list61.size; ++_i62) { - TResult _elem63; // required + TResult _elem63; // optional _elem63 = new TResult(); _elem63.read(iprot); struct.success.add(_elem63); @@ -6449,8 +6447,6 @@ public class THBaseService { 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_bit_vector = new BitSet(1); 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); @@ -7004,7 +7000,7 @@ public class THBaseService { struct.puts = new ArrayList(_list64.size); for (int _i65 = 0; _i65 < _list64.size; ++_i65) { - TPut _elem66; // required + TPut _elem66; // optional _elem66 = new TPut(); _elem66.read(iprot); struct.puts.add(_elem66); @@ -7085,7 +7081,7 @@ public class THBaseService { struct.puts = new ArrayList(_list69.size); for (int _i70 = 0; _i70 < _list69.size; ++_i70) { - TPut _elem71; // required + TPut _elem71; // optional _elem71 = new TPut(); _elem71.read(iprot); struct.puts.add(_elem71); @@ -8724,7 +8720,7 @@ public class THBaseService { struct.deletes = new ArrayList(_list72.size); for (int _i73 = 0; _i73 < _list72.size; ++_i73) { - TDelete _elem74; // required + TDelete _elem74; // optional _elem74 = new TDelete(); _elem74.read(iprot); struct.deletes.add(_elem74); @@ -8805,7 +8801,7 @@ public class THBaseService { struct.deletes = new ArrayList(_list77.size); for (int _i78 = 0; _i78 < _list77.size; ++_i78) { - TDelete _elem79; // required + TDelete _elem79; // optional _elem79 = new TDelete(); _elem79.read(iprot); struct.deletes.add(_elem79); @@ -9206,7 +9202,7 @@ public class THBaseService { struct.success = new ArrayList(_list80.size); for (int _i81 = 0; _i81 < _list80.size; ++_i81) { - TDelete _elem82; // required + TDelete _elem82; // optional _elem82 = new TDelete(); _elem82.read(iprot); struct.success.add(_elem82); @@ -9308,7 +9304,7 @@ public class THBaseService { struct.success = new ArrayList(_list85.size); for (int _i86 = 0; _i86 < _list85.size; ++_i86) { - TDelete _elem87; // required + TDelete _elem87; // optional _elem87 = new TDelete(); _elem87.read(iprot); struct.success.add(_elem87); @@ -10633,8 +10629,6 @@ public class THBaseService { 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_bit_vector = new BitSet(1); 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); @@ -12502,8 +12496,6 @@ public class THBaseService { 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_bit_vector = new BitSet(1); 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); @@ -13566,7 +13558,7 @@ public class THBaseService { struct.success = new ArrayList(_list88.size); for (int _i89 = 0; _i89 < _list88.size; ++_i89) { - TResult _elem90; // required + TResult _elem90; // optional _elem90 = new TResult(); _elem90.read(iprot); struct.success.add(_elem90); @@ -13688,7 +13680,7 @@ public class THBaseService { struct.success = new ArrayList(_list93.size); for (int _i94 = 0; _i94 < _list93.size; ++_i94) { - TResult _elem95; // required + TResult _elem95; // optional _elem95 = new TResult(); _elem95.read(iprot); struct.success.add(_elem95); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java index c618f42ad4b..6b23b99c87d 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java @@ -527,7 +527,7 @@ public class TIncrement implements org.apache.thrift.TBase(_list32.size); for (int _i33 = 0; _i33 < _list32.size; ++_i33) { - TColumnIncrement _elem34; // required + TColumnIncrement _elem34; // optional _elem34 = new TColumnIncrement(); _elem34.read(iprot); struct.columns.add(_elem34); @@ -629,7 +629,7 @@ public class TIncrement implements org.apache.thrift.TBase(_list37.size); for (int _i38 = 0; _i38 < _list37.size; ++_i38) { - TColumnIncrement _elem39; // required + TColumnIncrement _elem39; // optional _elem39 = new TColumnIncrement(); _elem39.read(iprot); struct.columns.add(_elem39); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java index 33bd4458c18..a93482440a4 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java @@ -604,7 +604,7 @@ public class TPut implements org.apache.thrift.TBase, java.i struct.columnValues = new ArrayList(_list16.size); for (int _i17 = 0; _i17 < _list16.size; ++_i17) { - TColumnValue _elem18; // required + TColumnValue _elem18; // optional _elem18 = new TColumnValue(); _elem18.read(iprot); struct.columnValues.add(_elem18); @@ -725,7 +725,7 @@ public class TPut implements org.apache.thrift.TBase, java.i struct.columnValues = new ArrayList(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { - TColumnValue _elem23; // required + TColumnValue _elem23; // optional _elem23 = new TColumnValue(); _elem23.read(iprot); struct.columnValues.add(_elem23); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java index e91f1371d20..f0fe2a0c583 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java @@ -442,7 +442,7 @@ public class TResult implements org.apache.thrift.TBase(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - TColumnValue _elem2; // required + TColumnValue _elem2; // optional _elem2 = new TColumnValue(); _elem2.read(iprot); struct.columnValues.add(_elem2); @@ -530,7 +530,7 @@ public class TResult implements org.apache.thrift.TBase(_list5.size); for (int _i6 = 0; _i6 < _list5.size; ++_i6) { - TColumnValue _elem7; // required + TColumnValue _elem7; // optional _elem7 = new TColumnValue(); _elem7.read(iprot); struct.columnValues.add(_elem7); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java index e6fb49d0a62..cbcdf910c88 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java @@ -759,7 +759,7 @@ public class TScan implements org.apache.thrift.TBase, jav struct.columns = new ArrayList(_list40.size); for (int _i41 = 0; _i41 < _list40.size; ++_i41) { - TColumn _elem42; // required + TColumn _elem42; // optional _elem42 = new TColumn(); _elem42.read(iprot); struct.columns.add(_elem42); @@ -937,7 +937,7 @@ public class TScan implements org.apache.thrift.TBase, jav struct.columns = new ArrayList(_list45.size); for (int _i46 = 0; _i46 < _list45.size; ++_i46) { - TColumn _elem47; // required + TColumn _elem47; // optional _elem47 = new TColumn(); _elem47.read(iprot); struct.columns.add(_elem47); diff --git a/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift b/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift index 5821d31414b..972218f164c 100644 --- a/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift +++ b/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift @@ -97,7 +97,8 @@ struct TRegionInfo { struct Mutation { 1:bool isDelete = 0, 2:Text column, - 3:Text value + 3:Text value, + 4:bool writeToWAL = 1 } diff --git a/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift b/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift index a409c7eeebe..5bb0f51cbd3 100644 --- a/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift +++ b/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift @@ -147,7 +147,8 @@ struct TDelete { 1: required binary row, 2: optional list columns, 3: optional i64 timestamp, - 4: optional TDeleteType deleteType = 1 + 4: optional TDeleteType deleteType = 1, + 5: optional bool writeToWal = 1 } /** diff --git a/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java b/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java index c3be6e348f7..a2a9dd48f47 100644 --- a/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java +++ b/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java @@ -193,7 +193,7 @@ public class TestThriftServer { // Try null mutation List mutations = new ArrayList(); - mutations.add(new Mutation(false, columnAname, null)); + mutations.add(new Mutation(false, columnAname, null, true)); handler.mutateRow(tableAname, rowAname, mutations); TRowResult rowResult3 = handler.getRow(tableAname, rowAname).get(0); assertEquals(rowAname, rowResult3.row); @@ -414,8 +414,8 @@ public class TestThriftServer { */ private List getMutations() { List mutations = new ArrayList(); - mutations.add(new Mutation(false, columnAname, valueAname)); - mutations.add(new Mutation(false, columnBname, valueBname)); + mutations.add(new Mutation(false, columnAname, valueAname, true)); + mutations.add(new Mutation(false, columnBname, valueBname, true)); return mutations; } @@ -432,17 +432,17 @@ public class TestThriftServer { // Mutations to rowA. You can't mix delete and put anymore. List rowAmutations = new ArrayList(); - rowAmutations.add(new Mutation(true, columnAname, null)); + rowAmutations.add(new Mutation(true, columnAname, null, true)); batchMutations.add(new BatchMutation(rowAname, rowAmutations)); rowAmutations = new ArrayList(); - rowAmutations.add(new Mutation(false, columnBname, valueCname)); + rowAmutations.add(new Mutation(false, columnBname, valueCname, true)); batchMutations.add(new BatchMutation(rowAname, rowAmutations)); // Mutations to rowB List rowBmutations = new ArrayList(); - rowBmutations.add(new Mutation(false, columnAname, valueCname)); - rowBmutations.add(new Mutation(false, columnBname, valueDname)); + rowBmutations.add(new Mutation(false, columnAname, valueCname, true)); + rowBmutations.add(new Mutation(false, columnBname, valueDname, true)); batchMutations.add(new BatchMutation(rowBname, rowBmutations)); return batchMutations;