Search in sources :

Example 1 with Partition

use of alluxio.grpc.table.Partition in project alluxio by Alluxio.

the class ListDatabasesCommand method listTable.

/**
 * Print table information to stdout.
 *
 * @param db the database the table exists in
 * @param tableName the name of the table to dump information for
 * @return 0 on success, any non-zero value otherwise
 */
public int listTable(String db, String tableName) throws AlluxioStatusException {
    TableInfo table = mClient.getTable(db, tableName);
    System.out.println(table);
    List<Partition> partitionList = mClient.readTable(db, tableName, Constraint.getDefaultInstance());
    partitionList.forEach(System.out::println);
    return 0;
}
Also used : Partition(alluxio.grpc.table.Partition) TableInfo(alluxio.grpc.table.TableInfo)

Aggregations

Partition (alluxio.grpc.table.Partition)1 TableInfo (alluxio.grpc.table.TableInfo)1