From 473b1893902763e986a4115f143d8d96125aa99e Mon Sep 17 00:00:00 2001 From: Matthew Foley Date: Thu, 7 Jul 2011 07:05:40 +0000 Subject: [PATCH] HADOOP-7449. Add Data(In,Out)putByteBuffer to work with ByteBuffer similar to Data(In,Out)putBuffer for byte[]. Merge from yahoo-merge branch, -r 1079163. Fix missing Apache license headers. Contributed by Chris Douglas. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1143681 13f79535-47bb-0310-9956-ffa450edef68 --- common/CHANGES.txt | 4 ++++ .../apache/hadoop/io/DataInputByteBuffer.java | 18 ++++++++++++++++++ .../apache/hadoop/io/DataOutputByteBuffer.java | 18 ++++++++++++++++++ .../apache/hadoop/io/TestDataByteBuffers.java | 18 ++++++++++++++++++ 4 files changed, 58 insertions(+) diff --git a/common/CHANGES.txt b/common/CHANGES.txt index da5f1cb6f2..c789050c16 100644 --- a/common/CHANGES.txt +++ b/common/CHANGES.txt @@ -241,6 +241,10 @@ Trunk (unreleased changes) HADOOP-7451. Generalize StringUtils#join. (Chris Douglas via mattf) + HADOOP-7449. Add Data(In,Out)putByteBuffer to work with ByteBuffer similar + to Data(In,Out)putBuffer for byte[]. Merge from yahoo-merge branch, + -r 1079163. Fix missing Apache license headers. (Chris Douglas via mattf) + OPTIMIZATIONS HADOOP-7333. Performance improvement in PureJavaCrc32. (Eric Caspole diff --git a/common/src/java/org/apache/hadoop/io/DataInputByteBuffer.java b/common/src/java/org/apache/hadoop/io/DataInputByteBuffer.java index 98a8e851f4..469d3ff863 100644 --- a/common/src/java/org/apache/hadoop/io/DataInputByteBuffer.java +++ b/common/src/java/org/apache/hadoop/io/DataInputByteBuffer.java @@ -1,3 +1,21 @@ +/** + * 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.io; import java.io.DataInputStream; diff --git a/common/src/java/org/apache/hadoop/io/DataOutputByteBuffer.java b/common/src/java/org/apache/hadoop/io/DataOutputByteBuffer.java index 0d053ab795..b85f693dfd 100644 --- a/common/src/java/org/apache/hadoop/io/DataOutputByteBuffer.java +++ b/common/src/java/org/apache/hadoop/io/DataOutputByteBuffer.java @@ -1,3 +1,21 @@ +/** + * 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.io; import java.io.DataOutputStream; diff --git a/common/src/test/core/org/apache/hadoop/io/TestDataByteBuffers.java b/common/src/test/core/org/apache/hadoop/io/TestDataByteBuffers.java index c2f912051c..aeaefb6bf9 100644 --- a/common/src/test/core/org/apache/hadoop/io/TestDataByteBuffers.java +++ b/common/src/test/core/org/apache/hadoop/io/TestDataByteBuffers.java @@ -1,3 +1,21 @@ +/** + * 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.io; import java.io.DataInput;