Index: contrib/src/java/org/apache/hadoop/hive/contrib/serde2/TypedBytesSerDe.java =================================================================== --- contrib/src/java/org/apache/hadoop/hive/contrib/serde2/TypedBytesSerDe.java (revision 1145056) +++ contrib/src/java/org/apache/hadoop/hive/contrib/serde2/TypedBytesSerDe.java (working copy) @@ -40,11 +40,11 @@ import org.apache.hadoop.hive.serde2.io.DoubleWritable; import org.apache.hadoop.hive.serde2.io.ShortWritable; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; -import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory; import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.StructField; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector; @@ -165,7 +165,7 @@ public Object deserialize(Writable blob) throws SerDeException { BytesWritable data = (BytesWritable) blob; - inBarrStr.reset(data.get(), 0, data.getSize()); + inBarrStr.reset(data.getBytes(), 0, data.getLength()); try { Index: contrib/src/java/org/apache/hadoop/hive/contrib/serde2/s3/S3LogDeserializer.java =================================================================== --- contrib/src/java/org/apache/hadoop/hive/contrib/serde2/s3/S3LogDeserializer.java (revision 1145056) +++ contrib/src/java/org/apache/hadoop/hive/contrib/serde2/s3/S3LogDeserializer.java (working copy) @@ -137,7 +137,7 @@ if (field instanceof BytesWritable) { BytesWritable b = (BytesWritable) field; try { - row = Text.decode(b.get(), 0, b.getSize()); + row = Text.decode(b.getBytes(), 0, b.getLength()); } catch (CharacterCodingException e) { throw new SerDeException(e); } Index: contrib/src/java/org/apache/hadoop/hive/contrib/fileformat/base64/Base64TextOutputFormat.java =================================================================== --- contrib/src/java/org/apache/hadoop/hive/contrib/fileformat/base64/Base64TextOutputFormat.java (revision 1145056) +++ contrib/src/java/org/apache/hadoop/hive/contrib/fileformat/base64/Base64TextOutputFormat.java (working copy) @@ -36,13 +36,13 @@ /** * FileOutputFormat for base64 encoded text files. - * + * * Each line is a base64-encoded record. The key is a LongWritable which is the * offset. The value is a BytesWritable containing the base64-decoded bytes. - * + * * This class accepts a configurable parameter: * "base64.text.output.format.signature" - * + * * The UTF-8 encoded signature will be prepended to each BytesWritable before we * do base64 encoding. */ @@ -75,8 +75,8 @@ inputLength = ((Text) w).getLength(); } else { assert (w instanceof BytesWritable); - input = ((BytesWritable) w).get(); - inputLength = ((BytesWritable) w).getSize(); + input = ((BytesWritable) w).getBytes(); + inputLength = ((BytesWritable) w).getLength(); } // Add signature Index: contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritable.java =================================================================== --- contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritable.java (revision 1145056) +++ contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritable.java (working copy) @@ -57,7 +57,7 @@ /** Get the typed bytes as a Java object. */ public Object getValue() { try { - ByteArrayInputStream bais = new ByteArrayInputStream(get()); + ByteArrayInputStream bais = new ByteArrayInputStream(getBytes()); TypedBytesInput tbi = TypedBytesInput.get(new DataInputStream(bais)); Object obj = tbi.read(); return obj; @@ -68,7 +68,7 @@ /** Get the type code embedded in the first byte. */ public Type getType() { - byte[] bytes = get(); + byte[] bytes = getBytes(); if (bytes == null || bytes.length == 0) { return null; } Index: contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableOutput.java =================================================================== --- contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableOutput.java (revision 1145056) +++ contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableOutput.java (working copy) @@ -149,11 +149,11 @@ } public void writeTypedBytes(TypedBytesWritable tbw) throws IOException { - out.writeRaw(tbw.get(), 0, tbw.getSize()); + out.writeRaw(tbw.getBytes(), 0, tbw.getLength()); } public void writeBytes(BytesWritable bw) throws IOException { - byte[] bytes = Arrays.copyOfRange(bw.get(), 0, bw.getSize()); + byte[] bytes = Arrays.copyOfRange(bw.getBytes(), 0, bw.getLength()); out.writeBytes(bytes); } Index: contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesRecordWriter.java =================================================================== --- contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesRecordWriter.java (revision 1145056) +++ contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesRecordWriter.java (working copy) @@ -41,7 +41,7 @@ public void write(Writable row) throws IOException { BytesWritable brow = (BytesWritable) row; - out.write(brow.get(), 0, brow.getSize()); + out.write(brow.getBytes(), 0, brow.getLength()); } public void close() throws IOException { Index: serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazySimpleSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazySimpleSerDe.java (revision 1145056) +++ serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazySimpleSerDe.java (working copy) @@ -36,11 +36,11 @@ import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; -import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.StructField; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.UnionObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory; import org.apache.hadoop.hive.serde2.typeinfo.StructTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; @@ -311,8 +311,8 @@ if (field instanceof BytesWritable) { BytesWritable b = (BytesWritable) field; // For backward-compatibility with hadoop 0.17 - byteArrayRef.setData(b.get()); - cachedLazyStruct.init(byteArrayRef, 0, b.getSize()); + byteArrayRef.setData(b.getBytes()); + cachedLazyStruct.init(byteArrayRef, 0, b.getLength()); } else if (field instanceof Text) { Text t = (Text) field; byteArrayRef.setData(t.getBytes()); Index: serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java (revision 1145056) +++ serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java (working copy) @@ -40,10 +40,10 @@ import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; -import org.apache.hadoop.hive.serde2.objectinspector.StandardUnionObjectInspector.StandardUnion; import org.apache.hadoop.hive.serde2.objectinspector.StructField; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.UnionObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.StandardUnionObjectInspector.StandardUnion; import org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector; @@ -159,7 +159,7 @@ @Override public Object deserialize(Writable blob) throws SerDeException { BytesWritable data = (BytesWritable) blob; - inputByteBuffer.reset(data.get(), 0, data.getSize()); + inputByteBuffer.reset(data.getBytes(), 0, data.getLength()); try { for (int i = 0; i < columnNames.size(); i++) { Index: serde/src/java/org/apache/hadoop/hive/serde2/MetadataTypedColumnsetSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/MetadataTypedColumnsetSerDe.java (revision 1145056) +++ serde/src/java/org/apache/hadoop/hive/serde2/MetadataTypedColumnsetSerDe.java (working copy) @@ -30,10 +30,10 @@ import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.objectinspector.MetadataListStructObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; -import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory; import org.apache.hadoop.hive.serde2.objectinspector.StructField; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.Writable; @@ -172,7 +172,7 @@ if (field instanceof BytesWritable) { BytesWritable b = (BytesWritable) field; try { - row = Text.decode(b.get(), 0, b.getSize()); + row = Text.decode(b.getBytes(), 0, b.getLength()); } catch (CharacterCodingException e) { throw new SerDeException(e); } Index: serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java (revision 1145056) +++ serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java (working copy) @@ -29,18 +29,18 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.ByteStream; -import org.apache.hadoop.hive.serde2.ByteStream.Output; import org.apache.hadoop.hive.serde2.SerDe; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeStats; +import org.apache.hadoop.hive.serde2.ByteStream.Output; import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef; import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; -import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.StructField; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector; @@ -152,12 +152,12 @@ } if (field instanceof BytesWritable) { BytesWritable b = (BytesWritable) field; - if (b.getSize() == 0) { + if (b.getLength() == 0) { return null; } // For backward-compatibility with hadoop 0.17 - byteArrayRef.setData(b.get()); - cachedLazyBinaryStruct.init(byteArrayRef, 0, b.getSize()); + byteArrayRef.setData(b.getBytes()); + cachedLazyBinaryStruct.init(byteArrayRef, 0, b.getLength()); } else if (field instanceof Text) { Text t = (Text) field; if (t.getLength() == 0) { Index: serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java (revision 1145056) +++ serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java (working copy) @@ -152,7 +152,7 @@ bis_.reset(b.getBytes(), b.getLength()); } else { BytesWritable b = (BytesWritable) field; - bis_.reset(b.get(), b.getSize()); + bis_.reset(b.getBytes(), b.getLength()); } deserializeReuse = bt.deserialize(deserializeReuse, iprot_); return deserializeReuse; Index: serde/src/java/org/apache/hadoop/hive/serde2/ByteStreamTypedSerDe.java =================================================================== --- serde/src/java/org/apache/hadoop/hive/serde2/ByteStreamTypedSerDe.java (revision 1145056) +++ serde/src/java/org/apache/hadoop/hive/serde2/ByteStreamTypedSerDe.java (working copy) @@ -42,7 +42,7 @@ public Object deserialize(Writable field) throws SerDeException { Object retObj = super.deserialize(field); BytesWritable b = (BytesWritable) field; - bis.reset(b.get(), b.getSize()); + bis.reset(b.getBytes(), b.getLength()); return (retObj); }