Java Code Examples for org.apache.kylin.rest.response.HBaseResponse

The following examples show how to use org.apache.kylin.rest.response.HBaseResponse. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: kylin   Source File: HBaseInfoUtil.java    License: Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unused") // used by reflection
public static HBaseResponse getHBaseInfo(String tableName, KylinConfig config) throws IOException {
    if (!config.getStorageUrl().getScheme().equals("hbase"))
        return null;

    Connection conn = HBaseUnionUtil.getConnection(config, tableName);
    return getHBaseInfo(tableName, conn);
}
 
Example 2
Source Project: kylin   Source File: HBaseInfoUtil.java    License: Apache License 2.0 5 votes vote down vote up
public static boolean checkEquals(HBaseResponse hbaseR1, HBaseResponse hbaseR2) {
    if (hbaseR1 == hbaseR2)
        return true;
    return Objects.equals(hbaseR1.getTableName(), hbaseR2.getTableName())
            && hbaseR1.getTableSize() == hbaseR2.getTableSize()
            && hbaseR1.getRegionCount() == hbaseR2.getRegionCount();
}
 
Example 3
Source Project: kylin   Source File: CubeMigrationCrossClusterCLI.java    License: Apache License 2.0 4 votes vote down vote up
private boolean checkHTableEquals(String tableName) throws IOException {
    HBaseResponse respSrc = HBaseInfoUtil.getHBaseInfo(tableName, srcCluster.hbaseConn);
    HBaseResponse respDst = HBaseInfoUtil.getHBaseInfo(tableName, dstCluster.hbaseConn);
    return HBaseInfoUtil.checkEquals(respSrc, respDst);
}