Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.HTableDescriptor.toByteArray()


    FSTableDescriptors fstd = new FSTableDescriptors(UTIL.getConfiguration(), fs, rootdir);
    HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(name));
    TableDescriptor td = new TableDescriptor(htd, TableState.State.ENABLED);
    Path descriptorFile = fstd.updateTableDescriptor(td);
    try (FSDataOutputStream out = fs.create(descriptorFile, true)) {
      out.write(htd.toByteArray());
    }
    FSTableDescriptors fstd2 = new FSTableDescriptors(UTIL.getConfiguration(), fs, rootdir);
    TableDescriptor td2 = fstd2.getDescriptor(htd.getTableName());
    assertEquals(td, td2);
    FileStatus descriptorFile2 =
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.