Tabnine Logo
CubeMetastoreClient.createStorage
Code IndexAdd Tabnine to your IDE (free)

How to use
createStorage
method
in
org.apache.lens.cube.metadata.CubeMetastoreClient

Best Java code snippets using org.apache.lens.cube.metadata.CubeMetastoreClient.createStorage (Showing top 7 results out of 315)

origin: org.apache.lens/lens-cube

public void createStorage(XStorage storage) throws LensException {
 createStorage(JAXBUtils.storageFromXStorage(storage));
}
origin: apache/lens

public void createStorage(XStorage storage) throws LensException {
 createStorage(JAXBUtils.storageFromXStorage(storage));
}
origin: apache/lens

@Override
public void createStorage(LensSessionHandle sessionid, XStorage storage)
 throws LensException {
 try (SessionContext ignored = new SessionContext(sessionid)){
  getClient(sessionid).createStorage(storage);
  log.info("Created storage " + storage.getName());
 }
}
origin: apache/lens

/**
 * Test db storage.
 *
 * @throws HiveException the hive exception
 */
@Test(groups = "first")
public void testDBStorage() throws Exception {
 CubeMetastoreClient cc = CubeMetastoreClient.getInstance(conf);
 if (!cc.tableExists(DB_STORAGE1)) {
  cc.createStorage(db1);
 }
 if (!cc.tableExists(DB_STORAGE2)) {
  cc.createStorage(db2);
 }
}
origin: org.apache.lens/lens-cube

public <T extends Equals & HashCode & ToString> void createEntity(T entity) throws LensException {
 if (entity instanceof XStorage) {
  createStorage((XStorage) entity);
 } else if  (entity instanceof XCube) {
  createCube((XCube)entity);
 } else if (entity instanceof XDimension) {
  createDimension((XDimension) entity);
 } else if (entity instanceof XFact) {
  createFactTable((XFact) entity);
 } else if (entity instanceof XDimensionTable) {
  createCubeDimensionTable((XDimensionTable) entity);
 } else if (entity instanceof XSegmentation) {
  createSegmentation((XSegmentation) entity);
 } else {
  throw new LensException("Unable to create entity " + entity + " as it's unrecognizable: "+ entity.getClass());
 }
}
origin: apache/lens

public <T extends Equals & HashCode & ToString> void createEntity(T entity)
 throws LensException {
 if (entity instanceof XStorage) {
  createStorage((XStorage) entity);
 } else if (entity instanceof XCube) {
  createCube((XCube) entity);
 } else if (entity instanceof XDimension) {
  createDimension((XDimension) entity);
 } else if (entity instanceof XFact) {
  createFactTable((XFact) entity);
 } else if (entity instanceof XDimensionTable) {
  createCubeDimensionTable((XDimensionTable) entity);
 } else if (entity instanceof XSegmentation) {
  createSegmentation((XSegmentation) entity);
 } else {
  throw new LensException("Unable to create entity " + entity + " as it's unrecognizable: " + entity.getClass());
 }
}
origin: apache/lens

@Test(priority = 1)
public void testStorage() throws Exception {
 Storage hdfsStorage = new HDFSStorage(c1);
 client.createStorage(hdfsStorage);
 assertEquals(client.getAllStorages().size(), 1);
 Storage hdfsStorage2 = new HDFSStorage(c2);
 client.createStorage(hdfsStorage2);
 assertEquals(client.getAllStorages().size(), 2);
 Storage hdfsStorage3 = new HDFSStorage(c3);
 client.createStorage(hdfsStorage3);
 assertEquals(client.getAllStorages().size(), 3);
 Storage hdfsStorage4 = new HDFSStorage(c4);
 client.createStorage(hdfsStorage4);
 assertEquals(client.getAllStorages().size(), 4);
 assertEquals(hdfsStorage, client.getStorage(c1));
 assertEquals(hdfsStorage2, client.getStorage(c2));
 assertEquals(hdfsStorage3, client.getStorage(c3));
 assertEquals(hdfsStorage4, client.getStorage(c4));
}
org.apache.lens.cube.metadataCubeMetastoreClientcreateStorage

Popular methods of CubeMetastoreClient

  • getInstance
    Get the instance of CubeMetastoreClient corresponding to HiveConf
  • getHiveTable
    Get the hive Table corresponding to the name
  • createCubeDimensionTable
  • getConf
    Get cube metastore client conf
  • addPartitions
    batch addition
  • alterCube
  • alterCubeDimensionTable
  • alterCubeFactTable
  • alterDimension
    Alter dimension specified by the dimension name to new definition
  • alterSegmentation
  • createCube
    Create cube in metastore defined by Cube or DerivedCube object
  • createDimension
    Create dimension in metastore defined by Dimension object
  • createCube,
  • createDimension,
  • createSegmentation,
  • dropSegmentation,
  • dropStorageFromDim,
  • dropStorageFromFact,
  • getAllCubes,
  • getAllDimensionTables,
  • getAllFacts

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • JFileChooser (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now