[21/51] [partial] hbase git commit: HBASE-17056 Remove checked in PB generated files Selective add of dependency on hbase-thirdparty jars. Update to READMEs on how protobuf is done (and update to refg
http://git-wip-us.apache.org/repos/asf/hbase/blob/1049025e/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/MapEntry.java -- diff --git a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/MapEntry.java b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/MapEntry.java deleted file mode 100644 index d586cc7..000 --- a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/MapEntry.java +++ /dev/null @@ -1,449 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package org.apache.hadoop.hbase.shaded.com.google.protobuf; - -import org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.Descriptor; -import org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.EnumValueDescriptor; -import org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.FieldDescriptor; - -import java.io.IOException; -import java.util.Collections; -import java.util.Map; -import java.util.TreeMap; - -/** - * Implements MapEntry messages. - * - * In reflection API, map fields will be treated as repeated message fields and - * each map entry is accessed as a message. This MapEntry class is used to - * represent these map entry messages in reflection API. - * - * Protobuf internal. Users shouldn't use this class. - */ -public final class MapEntry extends AbstractMessage { - - private static final class Metadata extends MapEntryLite.Metadata { - -public final Descriptor descriptor; -public final Parser> parser; - -public Metadata( -Descriptor descriptor, -MapEntry defaultInstance, -WireFormat.FieldType keyType, -WireFormat.FieldType valueType) { - super(keyType, defaultInstance.key, valueType, defaultInstance.value); - this.descriptor = descriptor; - this.parser = new AbstractParser>() { - -@Override -public MapEntry parsePartialFrom( -CodedInputStream input, ExtensionRegistryLite extensionRegistry) -throws InvalidProtocolBufferException { - return new MapEntry(Metadata.this, input, extensionRegistry); -} - }; -} - } - - private final K key; - private final V value; - private final Metadata metadata; - - /** Create a default MapEntry instance. */ - private MapEntry( - Descriptor descriptor, - WireFormat.FieldType keyType, K defaultKey, - WireFormat.FieldType valueType, V defaultValue) { -this.key = defaultKey; -this.value = defaultValue; -this.metadata = new Metadata(descriptor, this, keyType, valueType); - } - - /** Create a MapEntry with the provided key and value. */ - private MapEntry(Metadata metadata, K key, V value) { -this.key = key; -this.value = value; -this.metadata = metadata; - } - - /** Parsing constructor. */ - private MapEntry( - Metadata metadata, - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { -try { - this.metadata = metadata; - Map.Entry entry = MapEntryLite.parseEntry(input, metadata, extensionRegistry); - this.key = entry.getKey(); - this.value = entry.getValue(); -} catch (InvalidP
[21/51] [partial] hbase git commit: HBASE-17056 Remove checked in PB generated files Selective add of dependency on hbase-thirdparty jars. Update to READMEs on how protobuf is done (and update to refg
http://git-wip-us.apache.org/repos/asf/hbase/blob/df93c13f/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/MapEntry.java -- diff --git a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/MapEntry.java b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/MapEntry.java deleted file mode 100644 index d586cc7..000 --- a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/MapEntry.java +++ /dev/null @@ -1,449 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package org.apache.hadoop.hbase.shaded.com.google.protobuf; - -import org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.Descriptor; -import org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.EnumValueDescriptor; -import org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.FieldDescriptor; - -import java.io.IOException; -import java.util.Collections; -import java.util.Map; -import java.util.TreeMap; - -/** - * Implements MapEntry messages. - * - * In reflection API, map fields will be treated as repeated message fields and - * each map entry is accessed as a message. This MapEntry class is used to - * represent these map entry messages in reflection API. - * - * Protobuf internal. Users shouldn't use this class. - */ -public final class MapEntry extends AbstractMessage { - - private static final class Metadata extends MapEntryLite.Metadata { - -public final Descriptor descriptor; -public final Parser> parser; - -public Metadata( -Descriptor descriptor, -MapEntry defaultInstance, -WireFormat.FieldType keyType, -WireFormat.FieldType valueType) { - super(keyType, defaultInstance.key, valueType, defaultInstance.value); - this.descriptor = descriptor; - this.parser = new AbstractParser>() { - -@Override -public MapEntry parsePartialFrom( -CodedInputStream input, ExtensionRegistryLite extensionRegistry) -throws InvalidProtocolBufferException { - return new MapEntry(Metadata.this, input, extensionRegistry); -} - }; -} - } - - private final K key; - private final V value; - private final Metadata metadata; - - /** Create a default MapEntry instance. */ - private MapEntry( - Descriptor descriptor, - WireFormat.FieldType keyType, K defaultKey, - WireFormat.FieldType valueType, V defaultValue) { -this.key = defaultKey; -this.value = defaultValue; -this.metadata = new Metadata(descriptor, this, keyType, valueType); - } - - /** Create a MapEntry with the provided key and value. */ - private MapEntry(Metadata metadata, K key, V value) { -this.key = key; -this.value = value; -this.metadata = metadata; - } - - /** Parsing constructor. */ - private MapEntry( - Metadata metadata, - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { -try { - this.metadata = metadata; - Map.Entry entry = MapEntryLite.parseEntry(input, metadata, extensionRegistry); - this.key = entry.getKey(); - this.value = entry.getValue(); -} catch (InvalidP