[28/50] [abbrv] hbase git commit: HBASE-16477 Remove Writable interface and related code from WALEdit/WALKey
HBASE-16477 Remove Writable interface and related code from WALEdit/WALKey Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/82d554e3 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/82d554e3 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/82d554e3 Branch: refs/heads/hbase-12439 Commit: 82d554e3783372cc6b05489452c815b57c06f6cd Parents: df96d32 Author: Enis SoztutarAuthored: Mon Apr 10 02:31:42 2017 -0700 Committer: Enis Soztutar Committed: Mon Apr 10 02:31:42 2017 -0700 -- .../regionserver/wal/KeyValueCompression.java | 133 -- .../hadoop/hbase/regionserver/wal/WALEdit.java | 136 +-- .../java/org/apache/hadoop/hbase/wal/WAL.java | 1 - .../org/apache/hadoop/hbase/wal/WALKey.java | 95 ++--- .../wal/TestKeyValueCompression.java| 116 5 files changed, 14 insertions(+), 467 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/82d554e3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java deleted file mode 100644 index a33ff9e..000 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * 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.hbase.regionserver.wal; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.apache.hadoop.hbase.classification.InterfaceAudience; -import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.io.WritableUtils; - -/** - * DO NOT USE. This class is deprecated and should only be used in pre-PB WAL. - * - * Compression class for {@link KeyValue}s written to the WAL. This is not - * synchronized, so synchronization should be handled outside. - * - * Class only compresses and uncompresses row keys, family names, and the - * qualifier. More may be added depending on use patterns. - */ -@Deprecated -@InterfaceAudience.Private -class KeyValueCompression { - /** - * Uncompresses a KeyValue from a DataInput and returns it. - * - * @param in the DataInput - * @param readContext the compressionContext to use. - * @return an uncompressed KeyValue - * @throws IOException - */ - - public static KeyValue readKV(DataInput in, CompressionContext readContext) - throws IOException { -int keylength = WritableUtils.readVInt(in); -int vlength = WritableUtils.readVInt(in); -int tagsLength = WritableUtils.readVInt(in); -int length = (int) KeyValue.getKeyValueDataStructureSize(keylength, vlength, tagsLength); - -byte[] backingArray = new byte[length]; -int pos = 0; -pos = Bytes.putInt(backingArray, pos, keylength); -pos = Bytes.putInt(backingArray, pos, vlength); - -// the row -int elemLen = Compressor.uncompressIntoArray(backingArray, -pos + Bytes.SIZEOF_SHORT, in, readContext.rowDict); -checkLength(elemLen, Short.MAX_VALUE); -pos = Bytes.putShort(backingArray, pos, (short)elemLen); -pos += elemLen; - -// family -elemLen = Compressor.uncompressIntoArray(backingArray, -pos + Bytes.SIZEOF_BYTE, in, readContext.familyDict); -checkLength(elemLen, Byte.MAX_VALUE); -pos = Bytes.putByte(backingArray, pos, (byte)elemLen); -pos += elemLen; - -// qualifier -elemLen = Compressor.uncompressIntoArray(backingArray, pos, in, -readContext.qualifierDict); -pos += elemLen; - -// the rest -in.readFully(backingArray, pos, length - pos); - -return new KeyValue(backingArray, 0, length); - } - - private static void checkLength(int len, int max) throws
[19/54] [abbrv] hbase git commit: HBASE-16477 Remove Writable interface and related code from WALEdit/WALKey
HBASE-16477 Remove Writable interface and related code from WALEdit/WALKey Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/82d554e3 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/82d554e3 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/82d554e3 Branch: refs/heads/HBASE-16961 Commit: 82d554e3783372cc6b05489452c815b57c06f6cd Parents: df96d32 Author: Enis SoztutarAuthored: Mon Apr 10 02:31:42 2017 -0700 Committer: Enis Soztutar Committed: Mon Apr 10 02:31:42 2017 -0700 -- .../regionserver/wal/KeyValueCompression.java | 133 -- .../hadoop/hbase/regionserver/wal/WALEdit.java | 136 +-- .../java/org/apache/hadoop/hbase/wal/WAL.java | 1 - .../org/apache/hadoop/hbase/wal/WALKey.java | 95 ++--- .../wal/TestKeyValueCompression.java| 116 5 files changed, 14 insertions(+), 467 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/82d554e3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java deleted file mode 100644 index a33ff9e..000 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * 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.hbase.regionserver.wal; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.apache.hadoop.hbase.classification.InterfaceAudience; -import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.io.WritableUtils; - -/** - * DO NOT USE. This class is deprecated and should only be used in pre-PB WAL. - * - * Compression class for {@link KeyValue}s written to the WAL. This is not - * synchronized, so synchronization should be handled outside. - * - * Class only compresses and uncompresses row keys, family names, and the - * qualifier. More may be added depending on use patterns. - */ -@Deprecated -@InterfaceAudience.Private -class KeyValueCompression { - /** - * Uncompresses a KeyValue from a DataInput and returns it. - * - * @param in the DataInput - * @param readContext the compressionContext to use. - * @return an uncompressed KeyValue - * @throws IOException - */ - - public static KeyValue readKV(DataInput in, CompressionContext readContext) - throws IOException { -int keylength = WritableUtils.readVInt(in); -int vlength = WritableUtils.readVInt(in); -int tagsLength = WritableUtils.readVInt(in); -int length = (int) KeyValue.getKeyValueDataStructureSize(keylength, vlength, tagsLength); - -byte[] backingArray = new byte[length]; -int pos = 0; -pos = Bytes.putInt(backingArray, pos, keylength); -pos = Bytes.putInt(backingArray, pos, vlength); - -// the row -int elemLen = Compressor.uncompressIntoArray(backingArray, -pos + Bytes.SIZEOF_SHORT, in, readContext.rowDict); -checkLength(elemLen, Short.MAX_VALUE); -pos = Bytes.putShort(backingArray, pos, (short)elemLen); -pos += elemLen; - -// family -elemLen = Compressor.uncompressIntoArray(backingArray, -pos + Bytes.SIZEOF_BYTE, in, readContext.familyDict); -checkLength(elemLen, Byte.MAX_VALUE); -pos = Bytes.putByte(backingArray, pos, (byte)elemLen); -pos += elemLen; - -// qualifier -elemLen = Compressor.uncompressIntoArray(backingArray, pos, in, -readContext.qualifierDict); -pos += elemLen; - -// the rest -in.readFully(backingArray, pos, length - pos); - -return new KeyValue(backingArray, 0, length); - } - - private static void checkLength(int len, int max) throws
hbase git commit: HBASE-16477 Remove Writable interface and related code from WALEdit/WALKey
Repository: hbase Updated Branches: refs/heads/master df96d328f -> 82d554e37 HBASE-16477 Remove Writable interface and related code from WALEdit/WALKey Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/82d554e3 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/82d554e3 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/82d554e3 Branch: refs/heads/master Commit: 82d554e3783372cc6b05489452c815b57c06f6cd Parents: df96d32 Author: Enis SoztutarAuthored: Mon Apr 10 02:31:42 2017 -0700 Committer: Enis Soztutar Committed: Mon Apr 10 02:31:42 2017 -0700 -- .../regionserver/wal/KeyValueCompression.java | 133 -- .../hadoop/hbase/regionserver/wal/WALEdit.java | 136 +-- .../java/org/apache/hadoop/hbase/wal/WAL.java | 1 - .../org/apache/hadoop/hbase/wal/WALKey.java | 95 ++--- .../wal/TestKeyValueCompression.java| 116 5 files changed, 14 insertions(+), 467 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/82d554e3/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java deleted file mode 100644 index a33ff9e..000 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/KeyValueCompression.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * 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.hbase.regionserver.wal; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.apache.hadoop.hbase.classification.InterfaceAudience; -import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.io.WritableUtils; - -/** - * DO NOT USE. This class is deprecated and should only be used in pre-PB WAL. - * - * Compression class for {@link KeyValue}s written to the WAL. This is not - * synchronized, so synchronization should be handled outside. - * - * Class only compresses and uncompresses row keys, family names, and the - * qualifier. More may be added depending on use patterns. - */ -@Deprecated -@InterfaceAudience.Private -class KeyValueCompression { - /** - * Uncompresses a KeyValue from a DataInput and returns it. - * - * @param in the DataInput - * @param readContext the compressionContext to use. - * @return an uncompressed KeyValue - * @throws IOException - */ - - public static KeyValue readKV(DataInput in, CompressionContext readContext) - throws IOException { -int keylength = WritableUtils.readVInt(in); -int vlength = WritableUtils.readVInt(in); -int tagsLength = WritableUtils.readVInt(in); -int length = (int) KeyValue.getKeyValueDataStructureSize(keylength, vlength, tagsLength); - -byte[] backingArray = new byte[length]; -int pos = 0; -pos = Bytes.putInt(backingArray, pos, keylength); -pos = Bytes.putInt(backingArray, pos, vlength); - -// the row -int elemLen = Compressor.uncompressIntoArray(backingArray, -pos + Bytes.SIZEOF_SHORT, in, readContext.rowDict); -checkLength(elemLen, Short.MAX_VALUE); -pos = Bytes.putShort(backingArray, pos, (short)elemLen); -pos += elemLen; - -// family -elemLen = Compressor.uncompressIntoArray(backingArray, -pos + Bytes.SIZEOF_BYTE, in, readContext.familyDict); -checkLength(elemLen, Byte.MAX_VALUE); -pos = Bytes.putByte(backingArray, pos, (byte)elemLen); -pos += elemLen; - -// qualifier -elemLen = Compressor.uncompressIntoArray(backingArray, pos, in, -readContext.qualifierDict); -pos += elemLen; - -// the rest -in.readFully(backingArray, pos, length - pos); - -return new KeyValue(backingArray, 0, length);