public APIResult addPartitionToDimensionTable(String dimTblName, String storage, String partitionSpec) { try { return addPartitionToDimensionTable(dimTblName, storage, (XPartition) readFromXML(partitionSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
public APIResult addPartitionToFactTable(String fact, String storage, String partitionSpec) { try { return addPartitionToFactTable(fact, storage, (XPartition) readFromXML(partitionSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
public APIResult addPartitionsToDimensionTable(String dimTblName, String storage, String partitionsSpec) { try { return addPartitionsToDimensionTable(dimTblName, storage, (XPartitionList) readFromXML(partitionsSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
public APIResult addPartitionsToFactTable(String fact, String storage, String partitionsSpec) { try { return addPartitionsToFactTable(fact, storage, (XPartitionList) readFromXML(partitionsSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
public APIResult createDimension(String dimSpec) { try { return createDimension(this.<XDimension>readFromXML(dimSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
if (args[0].equals("-db")) { String dbName = args[1]; metastore.metaClient.createDatabase(dbName, true); metastore.metaClient.setDatabase(dbName); System.out.println("Database:" + metastore.metaClient.getCurrentDatabase()); System.out.println("Storages:" + metastore.metaClient.getAllStorages()); System.out.println("Cubes:" + metastore.metaClient.getAllCubes()); System.out.println("Dimensions:" + metastore.metaClient.getAllDimensions()); System.out.println("Fact tables:" + metastore.metaClient.getAllFactTables()); System.out.println("Dimension tables:" + metastore.metaClient.getAllDimensionTables()); System.out.println("Segmentations:" + metastore.metaClient.getAllSegmentations()); if (metastore.retCode != 0) { System.exit(metastore.retCode);
public APIResult createCube(String cubeSpec) { try { return createCube(this.<XCube>readFromXML(cubeSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
public APIResult createDimensionTable(String tableXml) { try { return createDimensionTable(this.<XDimensionTable>readFromXML(tableXml)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
public APIResult createFactTable(String factSpec) { try { return createFactTable(this.<XFact>readFromXML(factSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
public static void main(String[] args) throws Exception { PopulateSampleMetastore populate = null; try { populate = new PopulateSampleMetastore(); if (args.length > 0) { if (args[0].equals("-db")) { String dbName = args[1]; populate.metaClient.createDatabase(dbName, true); populate.metaClient.setDatabase(dbName); } } populate.populateAll(); } finally { if (populate != null) { populate.close(); } } if (populate.retCode != 0) { System.exit(populate.retCode); } }
public LensClient(LensClientConfig conf, String username, String password) { this.conf = conf; conf.setUser(username); this.password = password; connectToLensServer(); mc = new LensMetadataClient(connection); statement = new LensStatement(connection); }
public APIResult addPartitionsToDim(String table, String storage, String partsSpec) { return mc.addPartitionsToDimensionTable(table, storage, partsSpec); } public APIResult updatePartitionOfFact(String table, String storage, String partSpec) {
public APIResult addPartitionsToFact(String table, String storage, String partsSpec) { return mc.addPartitionsToFactTable(table, storage, partsSpec); }
public APIResult addPartitionToDim(String table, String storage, XPartition xp) { return mc.addPartitionToDimensionTable(table, storage, xp); }
public APIResult addPartitionToFact(String table, String storage, String partSpec) { return mc.addPartitionToFactTable(table, storage, partSpec); }
public APIResult createDatabase(String database) { return createDatabase(database, false); }
public APIResult createCube(String cubeSpec) { return mc.createCube(cubeSpec); }
public APIResult createDimension(String dimSpec) { return mc.createDimension(dimSpec); }
public APIResult createFactTable(String factSpec) { return mc.createFactTable(factSpec); }
public APIResult createDimensionTable(String dimSpec) { return mc.createDimensionTable(dimSpec); }