File tree Expand file tree Collapse file tree
bigtable/hbase/snippets/src/main/java/com/example/bigtable Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020import com .google .cloud .bigtable .hbase .BigtableConfiguration ;
2121import java .io .IOException ;
2222// [END bigtable_hw_imports_hbase]
23+ import java .util .UUID ;
2324import org .apache .hadoop .hbase .HColumnDescriptor ;
2425import org .apache .hadoop .hbase .HTableDescriptor ;
2526import org .apache .hadoop .hbase .TableName ;
4041public class HelloWorld {
4142
4243 // Refer to table metadata names by byte array in the HBase API
43- private static final byte [] TABLE_NAME = Bytes .toBytes ("Hello-Bigtable" );
44+ private static final byte [] TABLE_NAME = Bytes .toBytes ("Hello-Bigtable-" + UUID . randomUUID (). toString (). substring ( 0 , 19 ) );
4445 private static final byte [] COLUMN_FAMILY_NAME = Bytes .toBytes ("cf1" );
4546 private static final byte [] COLUMN_NAME = Bytes .toBytes ("greeting" );
4647
You can’t perform that action at this time.
0 commit comments