Skip to content

Commit

Permalink
Clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shydefoo committed Sep 17, 2024
1 parent 0054a14 commit 38f7bc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,11 @@ public List<List<Feature>> convertRowToFeature(
return featureReferences.stream()
.map(ServingServiceProto.FeatureReference::getFeatureTable)
.distinct()
.map(
cf -> {
List<Cell> rowCells = row.getColumnCells(cf.getBytes(), null);
System.out.println("Column Family: " + cf);
System.out.println("Row Cells: " + rowCells);
return rowCells;
})
// .map(cf -> row.getColumnCells(cf.getBytes(), null))
.map(cf -> row.getColumnCells(cf.getBytes(), null))
.filter(ls -> !ls.isEmpty())
.flatMap(
rowCells -> {
Cell rowCell = rowCells.get(0); // Latest cell
// String family =
// Bytes.toString(rowCell.getFamilyArray());
// System.out.println("rowCell: " +
// rowCell.toString());
// ByteString value =
// ByteString.copyFrom(rowCell.getValueArray());
// System.out.println("value: " + value);
ByteBuffer valueBuffer =
ByteBuffer.wrap(rowCell.getValueArray())
.position(rowCell.getValueOffset())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,20 @@ class BigTableSinkRelation(
tableBuilder.setColumnFamily(cf)
val table = tableBuilder.build()
table
// val t = new HTableDescriptor(TableName.valueOf(tableName))
// val metadataCF = new HColumnDescriptor(metadataColumnFamily)
// t.addFamily(metadataCF)
// t
} else {
// val t = admin.getTableDescriptor(TableName.valueOf(tableName))
val t = btConn.getTable(TableName.valueOf(tableName))
t.getDescriptor()
}

// val featuresCF = new HColumnDescriptor(config.namespace)
// if (config.maxAge > 0) {
// featuresCF.setTimeToLive(config.maxAge.toInt)
// }
// featuresCF.setMaxVersions(1)
val featuresCFBuilder = ColumnFamilyDescriptorBuilder.newBuilder(config.namespace.getBytes)
if (config.maxAge > 0) {
featuresCFBuilder.setTimeToLive(config.maxAge.toInt)
}
featuresCFBuilder.setMaxVersions(1)
val featuresCF = featuresCFBuilder.build()

println("config.namespaces: ", config.namespace)
// TODO: Set compression type for column family
val tdb = TableDescriptorBuilder.newBuilder(table)
if (!table.getColumnFamilyNames.contains(config.namespace.getBytes)) {
// table.addFamily(featuresCF)
tdb.setColumnFamily(featuresCF)
val t = tdb.build()
if (!admin.isTableAvailable(table.getTableName)) {
Expand Down

0 comments on commit 38f7bc7

Please sign in to comment.