本文整理了Java中org.apache.kylin.common.persistence.ResourceStore.getStore
方法的一些代码示例,展示了ResourceStore.getStore
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceStore.getStore
方法的具体详情如下:
包路径:org.apache.kylin.common.persistence.ResourceStore
类名称:ResourceStore
方法名:getStore
暂无
代码示例来源:origin: apache/kylin
private ResourceStore getStore() {
return ResourceStore.getStore(this.config);
}
}
代码示例来源:origin: apache/kylin
private ResourceStore getStore() {
return ResourceStore.getStore(this.config);
}
}
代码示例来源:origin: apache/kylin
public void remove(KylinConfig config, String path) throws IOException {
ResourceStore store = ResourceStore.getStore(config);
resetR(store, path);
}
}
代码示例来源:origin: apache/kylin
public NavigableSet<String> list(KylinConfig config, String path) throws IOException {
ResourceStore store = ResourceStore.getStore(config);
NavigableSet<String> result = store.listResources(path);
System.out.println("" + result);
return result;
}
代码示例来源:origin: apache/kylin
public CubeSignatureRefresher(String[] cubes) {
config = KylinConfig.getInstanceFromEnv();
store = ResourceStore.getStore(config);
cubeNames = cubes;
}
代码示例来源:origin: apache/kylin
public void copy(KylinConfig srcConfig, KylinConfig dstConfig, String path, boolean copyImmutableResource)
throws IOException {
ResourceStore src = ResourceStore.getStore(srcConfig);
ResourceStore dst = ResourceStore.getStore(dstConfig);
logger.info("Copy from {} to {}", src, dst);
copyR(src, dst, path, getPathsSkipChildren(src), copyImmutableResource);
}
代码示例来源:origin: apache/kylin
public void reset(KylinConfig config) throws IOException {
ResourceStore store = ResourceStore.getStore(config);
resetR(store, "/");
}
代码示例来源:origin: apache/kylin
public void copy(KylinConfig srcConfig, KylinConfig dstConfig, List<String> paths,
boolean copyImmutableResource) throws IOException {
ResourceStore src = ResourceStore.getStore(srcConfig);
ResourceStore dst = ResourceStore.getStore(dstConfig);
logger.info("Copy from {} to {}", src, dst);
for (String path : paths) {
copyR(src, dst, path, getPathsSkipChildren(src), copyImmutableResource);
}
}
代码示例来源:origin: apache/kylin
public CubeMetadataUpgrade(String newMetadataUrl) {
KylinConfig.destroyInstance();
config = KylinConfig.createInstanceFromUri(newMetadataUrl);
store = ResourceStore.getStore(config);
}
代码示例来源:origin: apache/kylin
public static String getMetaStoreId() throws IOException {
KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
ResourceStore store = ResourceStore.getStore(kylinConfig);
return store.getMetaStoreUUID();
}
代码示例来源:origin: apache/kylin
public static void main(String[] args) throws IOException {
String modelName = args[0];
int nRows = Integer.parseInt(args[1]);
String outputDir = args.length > 2 ? args[2] : null;
KylinConfig conf = KylinConfig.getInstanceFromEnv();
DataModelDesc model = DataModelManager.getInstance(conf).getDataModelDesc(modelName);
ResourceStore store = outputDir == null ? ResourceStore.getStore(conf)
: ResourceStore.getStore(mockup(outputDir));
ModelDataGenerator gen = new ModelDataGenerator(model, nRows, store);
gen.generate();
}
代码示例来源:origin: apache/kylin
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;
}
代码示例来源:origin: apache/kylin
public QueryService() {
queryStore = ResourceStore.getStore(getConfig());
preparedContextPool = createPreparedContextPool();
badQueryDetector.start();
}
代码示例来源:origin: apache/kylin
private void attachSegmentMetadataWithDict(CubeSegment segment) throws IOException {
Set<String> dumpList = new LinkedHashSet<>();
dumpList.addAll(JobRelatedMetaUtil.collectCubeMetadata(segment.getCubeInstance()));
dumpList.addAll(segment.getDictionaryPaths());
ResourceStore rs = ResourceStore.getStore(segment.getConfig());
if (rs.exists(segment.getStatisticsResourcePath())) {
// cube statistics is not available for new segment
dumpList.add(segment.getStatisticsResourcePath());
}
JobRelatedMetaUtil.dumpAndUploadKylinPropsAndMetadata(dumpList, (KylinConfigExt) segment.getConfig(),
this.getParam(SparkCubingByLayer.OPTION_META_URL.getOpt()));
}
代码示例来源:origin: apache/kylin
public ExtendCubeToHybridCLI() {
this.kylinConfig = KylinConfig.getInstanceFromEnv();
this.store = ResourceStore.getStore(kylinConfig);
this.cubeManager = CubeManager.getInstance(kylinConfig);
this.cubeDescManager = CubeDescManager.getInstance(kylinConfig);
this.metadataManager = DataModelManager.getInstance(kylinConfig);
}
代码示例来源:origin: apache/kylin
public ExtendCubeToHybridCLI() {
this.kylinConfig = KylinConfig.getInstanceFromEnv();
this.store = ResourceStore.getStore(kylinConfig);
this.cubeManager = CubeManager.getInstance(kylinConfig);
this.cubeDescManager = CubeDescManager.getInstance(kylinConfig);
this.metadataManager = DataModelManager.getInstance(kylinConfig);
}
代码示例来源:origin: apache/kylin
public static void testPerformance(String url, KylinConfig kylinConfig) throws Exception {
String oldUrl = replaceMetadataUrl(kylinConfig, url);
testPerformance(ResourceStore.getStore(kylinConfig));
replaceMetadataUrl(kylinConfig, oldUrl);
}
代码示例来源:origin: apache/kylin
public static void testAStore(String url, KylinConfig kylinConfig) throws Exception {
String oldUrl = replaceMetadataUrl(kylinConfig, url);
testAStore(ResourceStore.getStore(kylinConfig));
replaceMetadataUrl(kylinConfig, oldUrl);
}
代码示例来源:origin: apache/kylin
@Test
public void testGetAllCubes() throws Exception {
final ResourceStore store = ResourceStore.getStore(getTestConfig());
final NavigableSet<String> cubePath = store.listResources(ResourceStore.CUBE_RESOURCE_ROOT);
assertTrue(cubePath.size() > 1);
final List<CubeInstance> cubes = store.getAllResources(ResourceStore.CUBE_RESOURCE_ROOT,
CubeManager.CUBE_SERIALIZER);
assertEquals(cubePath.size(), cubes.size());
}
代码示例来源:origin: apache/kylin
@Test
public void testCopy() throws IOException {
KylinConfig dstConfig = KylinConfig.createInstanceFromUri(dstPath);
ResourceStore srcStore = ResourceStore.getStore(KylinConfig.getInstanceFromEnv());
ResourceStore dstStore = ResourceStore.getStore(dstConfig);
//metadata under source path and destination path are not equal before copy
Assert.assertNotEquals(srcStore.listResources("/"), dstStore.listResources("/"));
new ResourceTool().copy(KylinConfig.getInstanceFromEnv(), dstConfig, "/");
//After copy, two paths have same metadata
Assert.assertEquals(srcStore.listResources("/"), dstStore.listResources("/"));
}
}
内容来源于网络,如有侵权,请联系作者删除!