Tabnine Logo
org.apache.lens.cube.metadata
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.lens.cube.metadata

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

origin: org.apache.lens/lens-cube

@Override
public void addProperties() {
 super.addProperties();
 MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getDimAttributeListKey(getName()), attributes);
 setAttributedProperties(getProperties(), attributes);
}
origin: org.apache.lens/lens-cube

/** extract storage name and check in timeline cache for existance */
public boolean factPartitionExists(FactTable fact, FactPartition part, String storageTableName)
 throws HiveException, LensException {
 String storage = extractStorageName(fact, storageTableName);
 return partitionTimelineCache.partitionTimeExists(fact.getSourceFactName(), storage,
  part.getPeriod(), part.getPartCol(), part.getPartSpec());
}
origin: org.apache.lens/lens-cube

@Override
public void addProperties() {
 super.addProperties();
 MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getCubeMeasureListKey(getName()), measures);
 setMeasureProperties(getProperties(), measures);
 MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getCubeDimensionListKey(getName()), dimensions);
 setDimensionProperties(getProperties(), dimensions);
}
origin: apache/lens

boolean latestPartitionExists(String factOrDimTblName, String storageName, String latestPartCol)
 throws HiveException, LensException {
 String storageTableName = MetastoreUtil.getStorageTableName(factOrDimTblName, Storage.getPrefix(storageName));
 if (isDimensionTable(factOrDimTblName)) {
  return dimTableLatestPartitionExists(storageTableName);
 } else {
  return !partitionTimelineCache.noPartitionsExist(factOrDimTblName, storageName, latestPartCol);
 }
}
origin: org.apache.lens/lens-cube

@Override
public void addProperties() {
 super.addProperties();
 MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getExpressionListKey(getName()), expressions);
 setExpressionProperties(getProperties(), expressions);
 MetastoreUtil.addNameStrings(getProperties(), getJoinChainListPropKey(getName()), joinChains);
 setJoinChainProperties(joinChains);
}
origin: org.apache.lens/lens-cube

private void mergeRanges() {
 for (int i = 0; i < ranges.size() - 1; i++) {
  if (ranges.get(i).getEnd().compareTo(ranges.get(i + 1).getBegin()) >= 0) {
   TimePartitionRange removed = ranges.remove(i + 1);
   ranges.get(i).setEnd(TimePartition.max(removed.getEnd(), ranges.get(i).getEnd()));
   i--; // check again at same index
  } else if (ranges.get(i).isEmpty()) {
   ranges.remove(i);
   i--;
  }
 }
}
origin: apache/lens

public void createStorage(Storage storage) throws LensException {
 checkIfAuthorized();
 createCubeHiveTable(storage);
 // do a get to update cache
 getStorage(storage.getName());
}
origin: org.apache.lens/lens-cube

@Override
protected void addProperties() {
 super.addProperties();
 addCubeName(getName(), getProperties(), cubeName);
 addSegmentProperties(getName(), getProperties(), segments);
}
origin: org.apache.lens/lens-cube

public void createStorage(Storage storage) throws LensException {
 createCubeHiveTable(storage);
 // do a get to update cache
 getStorage(storage.getName());
}
origin: org.apache.lens/lens-cube

public CubeColumn getColumnByName(String column) {
 CubeColumn cubeCol = super.getExpressionByName(column);
 if (cubeCol == null) {
  cubeCol = getMeasureByName(column);
  if (cubeCol == null) {
   cubeCol = getDimAttributeByName(column);
  }
 }
 return cubeCol;
}
origin: apache/lens

/**
 * Create cube in metastore defined by {@link Cube} or {@link DerivedCube} object
 *
 * @param cube the {@link Cube} object.
 * @throws LensException
 */
public void createCube(CubeInterface cube) throws LensException {
 checkIfAuthorized();
 createCubeHiveTable((AbstractCubeTable) cube);
 // do a get to update cache
 getCube(cube.getName());
}
origin: apache/lens

 public String getStorageTableName(String factOrDimTableName, String storage, UpdatePeriod updatePeriod)
  throws LensException {
  return MetastoreUtil.getFactOrDimtableStorageTableName(factOrDimTableName,
   getStorageTablePrefixFromStorage(factOrDimTableName, storage, updatePeriod));
 }
}
origin: org.apache.lens/lens-cube

public CubeColumn getColumnByName(String column) {
 CubeColumn cubeCol = super.getExpressionByName(column);
 if (cubeCol == null) {
  cubeCol = getAttributeByName(column);
 }
 return cubeCol;
}
origin: org.apache.lens/lens-cube

private static String getTimeDimOfPartitionColumn(CubeInterface cube, String partCol) {
 if (cube == null) {
  return partCol;
 }
 if (cube instanceof DerivedCube) {
  return ((DerivedCube) cube).getParent().getTimeDimOfPartitionColumn(partCol);
 } else {
  return ((Cube) cube).getTimeDimOfPartitionColumn(partCol);
 }
}
origin: apache/lens

 @Override
 public String toString() {
  String str = super.toString();
  str += ", hierarchy:" + MetastoreUtil.getObjectStr(hierarchy);
  return str;
 }
}
origin: org.apache.lens/lens-cube

boolean latestPartitionExists(String factOrDimTblName, String storageName, String latestPartCol)
 throws HiveException, LensException {
 String storageTableName = MetastoreUtil.getStorageTableName(factOrDimTblName, Storage.getPrefix(storageName));
 if (isDimensionTable(factOrDimTblName)) {
  return dimTableLatestPartitionExists(storageTableName);
 } else {
  return !partitionTimelineCache.noPartitionsExist(factOrDimTblName, storageName, latestPartCol);
 }
}
origin: apache/lens

@Override
public void addProperties() {
 super.addProperties();
 MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getCubeMeasureListKey(getName()), measures);
 setMeasureProperties(getProperties(), measures);
 MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getCubeDimensionListKey(getName()), dimensions);
 setDimensionProperties(getProperties(), dimensions);
}
origin: apache/lens

@Override
public void addProperties() {
 super.addProperties();
 MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getExpressionListKey(getName()), expressions);
 setExpressionProperties(getProperties(), expressions);
 MetastoreUtil.addNameStrings(getProperties(), getJoinChainListPropKey(getName()), joinChains);
 setJoinChainProperties(joinChains);
}
origin: apache/lens

private void mergeRanges() {
 for (int i = 0; i < ranges.size() - 1; i++) {
  if (ranges.get(i).getEnd().compareTo(ranges.get(i + 1).getBegin()) >= 0) {
   TimePartitionRange removed = ranges.remove(i + 1);
   ranges.get(i).setEnd(TimePartition.max(removed.getEnd(), ranges.get(i).getEnd()));
   i--; // check again at same index
  } else if (ranges.get(i).isEmpty()) {
   ranges.remove(i);
   i--;
  }
 }
}
origin: apache/lens

/** extract storage name and check in timeline cache for existance */
public boolean factPartitionExists(FactTable fact, FactPartition part, String storageTableName)
 throws HiveException, LensException {
 String storage = extractStorageName(fact, storageTableName);
 return partitionTimelineCache.partitionTimeExists(fact.getSourceFactName(), storage,
  part.getPeriod(), part.getPartCol(), part.getPartSpec());
}
org.apache.lens.cube.metadata

Most used classes

  • CubeMetastoreClient
    Wrapper class around Hive metastore to do cube metastore operations.
  • UpdatePeriod
  • MetastoreUtil
  • Storage
    Storage is Named Interface which would represent the underlying storage of the data.
  • CubeDimensionTable
  • Dimension,
  • JAXBUtils,
  • JoinChain,
  • Segmentation,
  • BaseDimAttribute,
  • ColumnMeasure,
  • Cube,
  • CubeDimAttribute,
  • CubeInterface,
  • CubeMeasure,
  • CubeVirtualFactTable,
  • DateUtil$TimeDiff,
  • DateUtil,
  • DerivedCube
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