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

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

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

origin: apache/lens

/**
 * Is the table name passed a cube?
 *
 * @param tableName table name
 * @return true if it is cube, false otherwise
 * @throws LensException
 */
public boolean isCube(String tableName) throws LensException {
 if (allCubesPopulated) {
  if (allCubes.containsKey(tableName.trim().toLowerCase())) {
   return true;
  }
 } else {
  Table tbl = getTable(tableName);
  return isCube(tbl);
 }
 return false;
}
origin: org.apache.lens/lens-cube

/**
 * Is the table name passed a cube?
 *
 * @param tableName table name
 * @return true if it is cube, false otherwise
 * @throws LensException
 */
public boolean isCube(String tableName) throws LensException {
 if (allCubesPopulated) {
  if (allCubes.containsKey(tableName.trim().toLowerCase())) {
   return true;
  }
 } else {
  Table tbl = getTable(tableName);
  return isCube(tbl);
 }
 return false;
}
origin: org.apache.lens/lens-cube

if (metastoreClient.isCube(tblName)) {
 if (cube != null) {
  if (!cube.getName().equalsIgnoreCase(tblName)) {
origin: apache/lens

if (metastoreClient.isCube(tblName)) {
 if (cube != null) {
  if (!cube.getName().equalsIgnoreCase(tblName)) {
origin: apache/lens

assertTrue(client.tableExists(cubeName));
Table cubeTbl = client.getHiveTable(cubeName);
assertTrue(client.isCube(cubeTbl));
Cube cube2 = new Cube(cubeTbl);
assertTrue(cube.equals(cube2));
assertTrue(client.tableExists(derivedCubeName));
Table derivedTbl = client.getHiveTable(derivedCubeName);
assertTrue(client.isCube(derivedTbl));
DerivedCube dcube2 = new DerivedCube(derivedTbl, cube);
assertTrue(derivedCube.equals(dcube2));
origin: apache/lens

@Override
public XJoinChains getAllJoinChains(LensSessionHandle sessionHandle, String tableName) throws LensException {
 try (SessionContext ignored = new SessionContext(sessionHandle)){
  CubeMetastoreClient client = getClient(sessionHandle);
  Set<JoinChain> chains;
  if (client.isCube(tableName)) {
   chains = client.getCube(tableName).getJoinChains();
  } else if (client.isDimension(tableName)) {
   chains = client.getDimension(tableName).getJoinChains();
  } else {
   throw new BadRequestException("Can't get join chains. '"
    + tableName + "' is neither a cube nor a dimension");
  }
  XJoinChains xJoinChains = new XJoinChains();
  List<XJoinChain> joinChains = xJoinChains.getJoinChain();
  if (chains != null) {
   for (JoinChain chain : chains) {
    joinChains.add(JAXBUtils.getXJoinChainFromJoinChain(chain));
   }
  }
  return xJoinChains;
 }
}
origin: apache/lens

 cubeMeasures, cubeDimensions, cubeExpressions, null, null);
Table cubeTbl = client.getHiveTable(cubename);
assertTrue(client.isCube(cubeTbl));
Cube cube2 = new Cube(cubeTbl);
origin: apache/lens

assertTrue(client.tableExists(CUBE_NAME));
Table cubeTbl = client.getHiveTable(CUBE_NAME);
assertTrue(client.isCube(cubeTbl));
Cube cube2 = new Cube(cubeTbl);
assertTrue(cube.equals(cube2));
assertTrue(client.tableExists(DERIVED_CUBE_NAME));
Table derivedTbl = client.getHiveTable(DERIVED_CUBE_NAME);
assertTrue(client.isCube(derivedTbl));
DerivedCube dcube2 = new DerivedCube(derivedTbl, cube);
assertTrue(derivedCube.equals(dcube2));
assertTrue(client.tableExists(CUBE_NAME_WITH_PROPS));
cubeTbl = client.getHiveTable(CUBE_NAME_WITH_PROPS);
assertTrue(client.isCube(cubeTbl));
cube2 = new Cube(cubeTbl);
assertTrue(cubeWithProps.equals(cube2));
assertTrue(client.tableExists(DERIVED_CUBE_NAME_WITH_PROPS));
derivedTbl = client.getHiveTable(DERIVED_CUBE_NAME_WITH_PROPS);
assertTrue(client.isCube(derivedTbl));
dcube2 = new DerivedCube(derivedTbl, cubeWithProps);
assertTrue(derivedCubeWithProps.equals(dcube2));
origin: org.apache.lens/lens-cube

/**
 * return Cube or Dimension relationship depending on the source table of the join chain.
 *
 * @param client
 * @return
 * @throws HiveException
 */
TableRelationship toCubeOrDimRelationship(CubeMetastoreClient client) throws HiveException, LensException {
 if (relationShip == null) {
  AbstractCubeTable fromTable = null;
  if (client.isCube(from.getDestTable())) {
   fromTable = (AbstractCubeTable) client.getCube(from.getDestTable());
  } else if (client.isDimension(from.getDestTable())) {
   fromTable = client.getDimension(from.getDestTable());
  }
  if (fromTable != null) {
   relationShip = new TableRelationship(from.getDestColumn(),
    fromTable,
    to.getDestColumn(),
    client.getDimension(to.getDestTable()),
    to.isMapsToMany());
  }
 }
 return relationShip;
}
origin: apache/lens

/**
 * return Cube or Dimension relationship depending on the source table of the join chain.
 *
 * @param client
 * @return
 * @throws HiveException
 */
TableRelationship toCubeOrDimRelationship(CubeMetastoreClient client) throws HiveException, LensException {
 if (relationShip == null) {
  AbstractCubeTable fromTable = null;
  if (client.isCube(from.getDestTable())) {
   fromTable = (AbstractCubeTable) client.getCube(from.getDestTable());
  } else if (client.isDimension(from.getDestTable())) {
   fromTable = client.getDimension(from.getDestTable());
  }
  if (fromTable != null) {
   relationShip = new TableRelationship(from.getDestColumn(),
    fromTable,
    to.getDestColumn(),
    client.getDimension(to.getDestTable()),
    to.isMapsToMany());
  }
 }
 return relationShip;
}
origin: apache/lens

assertTrue(client.isCube(cubeTbl));
origin: apache/lens

List<XFlattenedColumn> columnList = flattenedColumns.getFlattenedColumn();
if (client.isCube(tableName)) {
 CubeInterface cube = client.getCube(tableName);
 addAllMeasuresToFlattenedList(objectFactory, cube, columnList);
org.apache.lens.cube.metadataCubeMetastoreClientisCube

Javadoc

Is the table name passed a cube?

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
  • alterCubeFactTable
  • alterDimension
    Alter dimension specified by the dimension name to new definition
  • alterSegmentation
  • createCube
    Create cube in metastore defined by Cube or DerivedCube object
  • alterSegmentation,
  • createCube,
  • createDimension,
  • createSegmentation,
  • dropSegmentation,
  • dropStorageFromDim,
  • dropStorageFromFact,
  • getAllCubes,
  • getAllDimensionTables,
  • getAllFacts

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • 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