HBASE-15605 Remove PB references from HCD and HTD for 2.0 (Ram_

This commit is contained in:
Vasudevan 2016-04-11 14:14:06 +05:30
parent ff835d5ae6
commit e407e1e81d
2 changed files with 4 additions and 0 deletions

View File

@ -1434,6 +1434,7 @@ public class HColumnDescriptor implements WritableComparable<HColumnDescriptor>
* @param cfs * @param cfs
* @return An {@link HColumnDescriptor} made from the passed in <code>cfs</code> * @return An {@link HColumnDescriptor} made from the passed in <code>cfs</code>
*/ */
@Deprecated
public static HColumnDescriptor convert(final ColumnFamilySchema cfs) { public static HColumnDescriptor convert(final ColumnFamilySchema cfs) {
// Use the empty constructor so we preserve the initial values set on construction for things // Use the empty constructor so we preserve the initial values set on construction for things
// like maxVersion. Otherwise, we pick up wrong values on deserialization which makes for // like maxVersion. Otherwise, we pick up wrong values on deserialization which makes for
@ -1452,6 +1453,7 @@ public class HColumnDescriptor implements WritableComparable<HColumnDescriptor>
/** /**
* @return Convert this instance to a the pb column family type * @return Convert this instance to a the pb column family type
*/ */
@Deprecated
public ColumnFamilySchema convert() { public ColumnFamilySchema convert() {
ColumnFamilySchema.Builder builder = ColumnFamilySchema.newBuilder(); ColumnFamilySchema.Builder builder = ColumnFamilySchema.newBuilder();
builder.setName(ByteStringer.wrap(getName())); builder.setName(ByteStringer.wrap(getName()));

View File

@ -1642,6 +1642,7 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
/** /**
* @return Convert the current {@link HTableDescriptor} into a pb TableSchema instance. * @return Convert the current {@link HTableDescriptor} into a pb TableSchema instance.
*/ */
@Deprecated
public TableSchema convert() { public TableSchema convert() {
TableSchema.Builder builder = TableSchema.newBuilder(); TableSchema.Builder builder = TableSchema.newBuilder();
builder.setTableName(ProtobufUtil.toProtoTableName(getTableName())); builder.setTableName(ProtobufUtil.toProtoTableName(getTableName()));
@ -1667,6 +1668,7 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
* @param ts A pb TableSchema instance. * @param ts A pb TableSchema instance.
* @return An {@link HTableDescriptor} made from the passed in pb <code>ts</code>. * @return An {@link HTableDescriptor} made from the passed in pb <code>ts</code>.
*/ */
@Deprecated
public static HTableDescriptor convert(final TableSchema ts) { public static HTableDescriptor convert(final TableSchema ts) {
List<ColumnFamilySchema> list = ts.getColumnFamiliesList(); List<ColumnFamilySchema> list = ts.getColumnFamiliesList();
HColumnDescriptor [] hcds = new HColumnDescriptor[list.size()]; HColumnDescriptor [] hcds = new HColumnDescriptor[list.size()];