Java Code Examples for org.apache.kylin.common.KylinConfig#getMetadataUrlPrefix()
The following examples show how to use
org.apache.kylin.common.KylinConfig#getMetadataUrlPrefix() .
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 File: AclTableMigrationTool.java From kylin-on-parquet-v2 with Apache License 2.0 | 6 votes |
public void migrate(KylinConfig kylinConfig) throws IOException { if (!checkIfNeedMigrate(kylinConfig)) { logger.info("Do not need to migrate acl table data"); return; } else { if (!kylinConfig.getServerMode().equals("all")) { throw new IllegalStateException( "Please make sure that you have config kylin.server.mode=all before migrating data"); } logger.info("Start to migrate acl table data"); ResourceStore store = ResourceStore.getStore(kylinConfig); String userTableName = kylinConfig.getMetadataUrlPrefix() + AclConstant.USER_TABLE_NAME; //System.out.println("user table name : " + userTableName); String aclTableName = kylinConfig.getMetadataUrlPrefix() + AclConstant.ACL_TABLE_NAME; if (needMigrateTable(aclTableName, store)) { logger.info("Migrate table : {}", aclTableName); migrate(store, AclConstant.ACL_TABLE_NAME, kylinConfig); } if (needMigrateTable(userTableName, store)) { logger.info("Migrate table : {}", userTableName); migrate(store, AclConstant.USER_TABLE_NAME, kylinConfig); } } }
Example 2
Source File: AclTableMigrationTool.java From kylin with Apache License 2.0 | 6 votes |
public void migrate(KylinConfig kylinConfig) throws IOException { if (!checkIfNeedMigrate(kylinConfig)) { logger.info("Do not need to migrate acl table data"); return; } else { if (!kylinConfig.getServerMode().equals("all")) { throw new IllegalStateException( "Please make sure that you have config kylin.server.mode=all before migrating data"); } logger.info("Start to migrate acl table data"); ResourceStore store = ResourceStore.getStore(kylinConfig); String userTableName = kylinConfig.getMetadataUrlPrefix() + AclConstant.USER_TABLE_NAME; //System.out.println("user table name : " + userTableName); String aclTableName = kylinConfig.getMetadataUrlPrefix() + AclConstant.ACL_TABLE_NAME; if (needMigrateTable(aclTableName, store)) { logger.info("Migrate table : {}", aclTableName); migrate(store, AclConstant.ACL_TABLE_NAME, kylinConfig); } if (needMigrateTable(userTableName, store)) { logger.info("Migrate table : {}", userTableName); migrate(store, AclConstant.USER_TABLE_NAME, kylinConfig); } } }
Example 3
Source File: AclTableMigrationTool.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
public boolean checkIfNeedMigrate(KylinConfig kylinConfig) throws IOException { ResourceStore store = ResourceStore.getStore(kylinConfig); if (!(store instanceof HBaseResourceStore)) { logger.info("HBase enviroment not found. Not necessary to migrate data"); return false; } String userTableName = kylinConfig.getMetadataUrlPrefix() + AclConstant.USER_TABLE_NAME; String aclTableName = kylinConfig.getMetadataUrlPrefix() + AclConstant.ACL_TABLE_NAME; if (needMigrateTable(aclTableName, store) || needMigrateTable(userTableName, store)) return true; return false; }
Example 4
Source File: AclTableMigrationTool.java From kylin with Apache License 2.0 | 5 votes |
public boolean checkIfNeedMigrate(KylinConfig kylinConfig) throws IOException { ResourceStore store = ResourceStore.getStore(kylinConfig); if (!(store instanceof HBaseResourceStore)) { logger.info("HBase enviroment not found. Not necessary to migrate data"); return false; } String userTableName = kylinConfig.getMetadataUrlPrefix() + AclConstant.USER_TABLE_NAME; String aclTableName = kylinConfig.getMetadataUrlPrefix() + AclConstant.ACL_TABLE_NAME; if (needMigrateTable(aclTableName, store) || needMigrateTable(userTableName, store)) return true; return false; }
Example 5
Source File: ResourceStoreTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 4 votes |
public static String mockUrl(String tag, KylinConfig kylinConfig) { String str = kylinConfig.getMetadataUrlPrefix() + "@" + tag; return str; }
Example 6
Source File: ResourceStoreTest.java From kylin with Apache License 2.0 | 4 votes |
public static String mockUrl(String tag, KylinConfig kylinConfig) { String str = kylinConfig.getMetadataUrlPrefix() + "@" + tag; return str; }