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

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

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

origin: org.apache.lens/lens-cube

/**
 * Alter a virtual cube fact with new definition
 * @param cubeVirtualFactTable  cube virtual fact table
 * @throws HiveException
 */
public void alterVirtualCubeFactTable(CubeVirtualFactTable cubeVirtualFactTable)
 throws HiveException, LensException {
 alterCubeFactTable(cubeVirtualFactTable.getName(), cubeVirtualFactTable, null, new HashMap<>());
}
origin: apache/lens

/**
 * Alter a virtual cube fact with new definition
 * @param cubeVirtualFactTable  cube virtual fact table
 * @throws HiveException
 */
public void alterVirtualCubeFactTable(CubeVirtualFactTable cubeVirtualFactTable)
 throws HiveException, LensException {
 alterCubeFactTable(cubeVirtualFactTable.getName(), cubeVirtualFactTable, null, new HashMap<>());
}
origin: apache/lens

@Override
public void updateFactTable(LensSessionHandle sessionid, XFact fact) throws LensException {
 try (SessionContext ignored = new SessionContext(sessionid)){
  getClient(sessionid).alterCubeFactTable(fact);
  log.info("Updated fact table " + fact.getName());
 } catch (HiveException e) {
  throw new LensException(e);
 }
}
origin: apache/lens

public void alterCubeFactTable(XFact fact) throws LensException, HiveException {
 if (fact instanceof XVirtualFactTable) {
  XVirtualFactTable xvf = (XVirtualFactTable) fact;
  alterCubeFactTable(xvf.getName(), JAXBUtils.cubeVirtualFactFromFactTable(xvf,
   getFactTable(xvf.getSourceFactName())), null, new HashMap<>());
 } else {
  XFactTable xf = (XFactTable) fact;
  alterCubeFactTable(fact.getName(), JAXBUtils.cubeFactFromFactTable(xf),
   JAXBUtils.tableDescPrefixMapFromXStorageTables(xf.getStorageTables()),
   JAXBUtils.columnStartAndEndTimeFromXColumns(xf.getColumns()));
 }
}
origin: org.apache.lens/lens-cube

public void alterCubeFactTable(XFact fact) throws LensException, HiveException {
 if (fact instanceof XVirtualFactTable) {
  XVirtualFactTable xvf = (XVirtualFactTable) fact;
  alterCubeFactTable(xvf.getName(), JAXBUtils.cubeVirtualFactFromFactTable(xvf,
   getFactTable(xvf.getSourceFactName())), null, new HashMap<>());
 } else {
  XFactTable xf = (XFactTable) fact;
  alterCubeFactTable(fact.getName(), JAXBUtils.cubeFactFromFactTable(xf),
   JAXBUtils.tableDescPrefixMapFromXStorageTables(xf.getStorageTables()),
   JAXBUtils.columnStartAndEndTimeFromXColumns(xf.getColumns()));
 }
}
origin: apache/lens

public <T extends Equals & HashCode & ToString> void updateEntity(String name, T entity)
 throws LensException, HiveException {
 if (entity instanceof XStorage) {
  alterStorage((XStorage) entity);
 } else if (entity instanceof XCube) {
  alterCube((XCube)entity);
 } else if (entity instanceof XDimension) {
  alterDimension((XDimension) entity);
 } else if (entity instanceof XFact) {
  alterCubeFactTable((XFact) entity);
 } else if (entity instanceof XDimensionTable) {
  alterCubeDimensionTable((XDimensionTable) entity);
 } else if (entity instanceof XSegmentation) {
  alterSegmentation((XSegmentation) entity);
 } else {
  throw new LensException("Unable to alter entity " + entity + " as it's unrecognizable: " + entity.getClass());
 }
}
origin: org.apache.lens/lens-cube

public <T extends Equals & HashCode & ToString> void updateEntity(String name, T entity)
 throws LensException, HiveException {
 if (entity instanceof XStorage) {
  alterStorage((XStorage) entity);
 } else if  (entity instanceof XCube) {
  alterCube((XCube)entity);
 } else if (entity instanceof XDimension) {
  alterDimension((XDimension) entity);
 } else if (entity instanceof XFact) {
  alterCubeFactTable((XFact) entity);
 } else if (entity instanceof XDimensionTable) {
  alterCubeDimensionTable((XDimensionTable) entity);
 } else if (entity instanceof XSegmentation) {
  alterSegmentation((XSegmentation) entity);
 } else {
  throw new LensException("Unable to alter entity " + entity + " as it's unrecognizable: " + entity.getClass());
 }
}
origin: apache/lens

factTable.alterStorage(c2, alterupdates);
client.alterCubeFactTable(factName, factTable, storageTables, new HashMap<String, String>());
updatePeriodStoragePrefix.put(DAILY, c4);
factTable.addStorage(c4, hourlyAndDaily, updatePeriodStoragePrefix);
client.alterCubeFactTable(factName, factTable, storageTables, new HashMap<String, String>());
CubeFactTable altered2 = client.getCubeFactTable(factName);
assertTrue(client.tableExists(c1TableName));
origin: apache/lens

sourceFact.alterColumn(newcol);
sourceFact.alterWeight(100);
client.alterCubeFactTable(sourceFact.getName(), sourceFact, storageTables, new HashMap<String, String>());
actualcubeVirtualFact = (CubeVirtualFactTable) client.getFactTable(virtualFactName);
assertTrue(actualcubeVirtualFact.getColumns().contains(newcol));
origin: apache/lens

client.alterCubeFactTable(cubeFact.getName(), cubeFact, storageTables, new HashMap<String, String>());
String storageTableName = getFactOrDimtableStorageTableName(factName, c1);
assertEquals(client.getAllParts(storageTableName).size(), 1);
origin: apache/lens

client.alterCubeFactTable(factName, cubeFact, storageTables, new HashMap<String, String>());
assertSameTimelines(factName, storages, HOURLY, partColNames);
assertEquals(Hive.get(client.getConf()).getTable(c1TableName).getParameters().get(
org.apache.lens.cube.metadataCubeMetastoreClientalterCubeFactTable

Javadoc

Alter a cubefact with new definition and alter underlying storage tables as well.

Popular methods of CubeMetastoreClient

  • getInstance
    Get the instance of CubeMetastoreClient corresponding to HiveConf
  • getHiveTable
    Get the hive Table corresponding to the name
  • createCubeDimensionTable
  • createStorage
  • getConf
    Get cube metastore client conf
  • addPartitions
    batch addition
  • alterCube
  • alterCubeDimensionTable
  • 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
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • Menu (java.awt)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Top Vim 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