You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Damien Carol (JIRA)" <ji...@apache.org> on 2014/07/08 11:23:36 UTC
[jira] [Commented] (HIVE-7364) Trunk cannot be built on -Phadoop1
after HIVE-7144
[ https://issues.apache.org/jira/browse/HIVE-7364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14054690#comment-14054690 ]
Damien Carol commented on HIVE-7364:
------------------------------------
Maybe we can implement copyBytes()
It's a simple method :
{code}
/**
* Get a copy of the bytes that is exactly the length of the data.
* See {@link #getBytes()} for faster access to the underlying array.
*/
public byte[] copyBytes() {
byte[] result = new byte[length];
System.arraycopy(bytes, 0, result, 0, length);
return result;
}
{code}
We can do it by adding this private method :
{code}
private byte[] copyBytes(Text text) {
byte[] result = new byte[text.getLength()];
System.arraycopy(text.getBytes(), 0, result, 0, text.getLength());
return result;
}
{code}
> Trunk cannot be built on -Phadoop1 after HIVE-7144
> --------------------------------------------------
>
> Key: HIVE-7364
> URL: https://issues.apache.org/jira/browse/HIVE-7364
> Project: Hive
> Issue Type: Task
> Components: Build Infrastructure
> Reporter: Navis
> Assignee: Navis
> Attachments: HIVE-7364.1.patch.txt
>
>
> Text.copyBytes() is introduced in hadoop-2
--
This message was sent by Atlassian JIRA
(v6.2#6252)