當前位置: 首頁>>代碼示例>>Java>>正文


Java StepMeta.setName方法代碼示例

本文整理匯總了Java中org.pentaho.di.trans.step.StepMeta.setName方法的典型用法代碼示例。如果您正苦於以下問題:Java StepMeta.setName方法的具體用法?Java StepMeta.setName怎麽用?Java StepMeta.setName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.pentaho.di.trans.step.StepMeta的用法示例。


在下文中一共展示了StepMeta.setName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getSortStep

import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getSortStep(GraphConfigurationInfo graphConfiguration)
    throws GraphGeneratorException {
  String[] actualMeasures = graphConfiguration.getMeasures();

  SortKeyStepMeta sortRowsMeta = new SortKeyStepMeta();
  sortRowsMeta.setPartitionID(partitionID);
  sortRowsMeta.setSegmentId(segmentId);
  sortRowsMeta.setTaskNo(taskNo);
  sortRowsMeta.setTabelName(graphConfiguration.getTableName());
  sortRowsMeta.setTableName(schemaInfo.getTableName());
  sortRowsMeta.setDatabaseName(schemaInfo.getDatabaseName());
  sortRowsMeta.setOutputRowSize(actualMeasures.length + 1 + "");
  sortRowsMeta.setDimensionCount(graphConfiguration.getDimensions().length + "");
  sortRowsMeta.setComplexDimensionCount(graphConfiguration.getComplexTypeString().isEmpty() ?
      "0" :
      graphConfiguration.getComplexTypeString()
          .split(CarbonCommonConstants.SEMICOLON_SPC_CHARACTER).length + "");
  sortRowsMeta.setIsUpdateMemberRequest(isUpdateMemberRequest + "");
  sortRowsMeta.setMeasureCount(graphConfiguration.getMeasureCount() + "");
  sortRowsMeta.setNoDictionaryDims(graphConfiguration.getNoDictionaryDims());
  sortRowsMeta.setMeasureDataType(graphConfiguration.getMeasureDataTypeInfo());
  sortRowsMeta.setNoDictionaryDimsMapping(RemoveDictionaryUtil
      .convertBooleanArrToString(graphConfiguration.getIsNoDictionaryDimMapping()));

  StepMeta sortRowsStep = new StepMeta(
      GraphGeneratorConstants.SORT_KEY_AND_GROUPBY + graphConfiguration.getTableName(),
      (StepMetaInterface) sortRowsMeta);

  xAxixLocation += 120;
  sortRowsStep.setDraw(true);
  sortRowsStep.setLocation(xAxixLocation, yAxixLocation);
  sortRowsStep.setStepID(GraphGeneratorConstants.SORTKEY_ID);
  sortRowsStep.setDescription(
      "Sort Key: " + GraphGeneratorConstants.SORT_KEY + graphConfiguration.getTableName());
  sortRowsStep.setName(
      "Sort Key: " + GraphGeneratorConstants.SORT_KEY + graphConfiguration.getTableName());
  return sortRowsStep;
}
 
開發者ID:carbondata,項目名稱:carbondata,代碼行數:39,代碼來源:GraphGenerator.java

示例2: getMDKeyStep

import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getMDKeyStep(GraphConfigurationInfo graphConfiguration) {
  MDKeyGenStepMeta carbonMdKey = new MDKeyGenStepMeta();
  carbonMdKey.setIsUseInvertedIndex(
      RemoveDictionaryUtil.convertBooleanArrToString(graphConfiguration.getIsUseInvertedIndex()));
  carbonMdKey.setPartitionID(partitionID);
  carbonMdKey.setSegmentId(segmentId);
  carbonMdKey.setNumberOfCores(graphConfiguration.getNumberOfCores());
  carbonMdKey.setTableName(graphConfiguration.getTableName());
  carbonMdKey.setDatabaseName(schemaInfo.getDatabaseName());
  carbonMdKey.setTableName(schemaInfo.getTableName());
  carbonMdKey.setComplexTypeString(graphConfiguration.getComplexTypeString());
  carbonMdKey.setAggregateLevels(CarbonDataProcessorUtil
      .getLevelCardinalitiesString(graphConfiguration.getDimCardinalities(),
          graphConfiguration.getDimensions()));
  carbonMdKey.setNoDictionaryDimsMapping(RemoveDictionaryUtil
      .convertBooleanArrToString(graphConfiguration.getIsNoDictionaryDimMapping()));
  carbonMdKey.setMeasureCount(graphConfiguration.getMeasureCount() + "");
  carbonMdKey.setColumnGroupsString(graphConfiguration.getColumnGroupsString());
  carbonMdKey.setDimensionCount(graphConfiguration.getActualDims().length + "");
  carbonMdKey.setComplexDimsCount(graphConfiguration.getComplexTypeString().isEmpty() ?
      "0" :
      graphConfiguration.getComplexTypeString()
          .split(CarbonCommonConstants.SEMICOLON_SPC_CHARACTER).length + "");
  carbonMdKey.setMeasureDataType(graphConfiguration.getMeasureDataTypeInfo());
  carbonMdKey.setTaskNo(taskNo);
  carbonMdKey.setFactTimeStamp(factTimeStamp);
  StepMeta mdkeyStepMeta =
      new StepMeta(GraphGeneratorConstants.MDKEY_GENERATOR + graphConfiguration.getTableName(),
          (StepMetaInterface) carbonMdKey);
  mdkeyStepMeta
      .setName(GraphGeneratorConstants.MDKEY_GENERATOR_ID + graphConfiguration.getTableName());
  mdkeyStepMeta.setStepID(GraphGeneratorConstants.MDKEY_GENERATOR_ID);
  //
  xAxixLocation += 120;
  mdkeyStepMeta.setLocation(xAxixLocation, yAxixLocation);
  mdkeyStepMeta.setDraw(true);
  mdkeyStepMeta.setDescription(
      "Generate MDKey For Table Data: " + GraphGeneratorConstants.MDKEY_GENERATOR
          + graphConfiguration.getTableName());
  carbonMdKey.setNoDictionaryDims(graphConfiguration.getNoDictionaryDims());

  return mdkeyStepMeta;
}
 
開發者ID:carbondata,項目名稱:carbondata,代碼行數:44,代碼來源:GraphGenerator.java

示例3: getSelectValueToChangeTheDataType

import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getSelectValueToChangeTheDataType(GraphConfigurationInfo graphConfiguration,
    int counter) {
  //
  SelectValuesMeta selectValues = new SelectValuesMeta();
  selectValues.allocate(0, 0, 0);
  StepMeta selectValueMeta = new StepMeta(
      GraphGeneratorConstants.SELECT_REQUIRED_VALUE + "Change Dimension And Measure DataType"
          + System.currentTimeMillis() + counter, (StepMetaInterface) selectValues);
  xAxixLocation += 120;
  selectValueMeta.setName("SelectValueToChangeChangeData");
  selectValueMeta.setLocation(xAxixLocation, yAxixLocation);
  selectValueMeta.setDraw(true);
  selectValueMeta.setDescription(
      "Change The Data Type For Measures: " + GraphGeneratorConstants.SELECT_REQUIRED_VALUE);

  String inputQuery = graphConfiguration.getTableInputSqlQuery();
  String[] columns = parseQueryAndReturnColumns(inputQuery);

  SelectMetadataChange[] changeMeta = new SelectMetadataChange[columns.length];
  Map<String, Boolean> measureDatatypeMap =
      getMeasureDatatypeMap(graphConfiguration.getMeasureDataTypeInfo());
  String[] measures = graphConfiguration.getMeasures();
  String dimensionString = graphConfiguration.getActualDimensionColumns();
  String[] dimension = dimensionString.split(CarbonCommonConstants.AMPERSAND_SPC_CHARACTER);

  for (int i = 0; i < columns.length; i++) {
    changeMeta[i] = new SelectMetadataChange(selectValues);
    changeMeta[i].setName(columns[i]);
    changeMeta[i].setType(2);
    if (isMeasureColumn(measures, columns[i]) && isNotDimesnionColumn(dimension, columns[i])) {
      Boolean isString = measureDatatypeMap.get(columns[i]);
      if (isString != null && isString) {
        changeMeta[i].setType(2);
      } else {
        changeMeta[i].setType(6);
      }
    }
    changeMeta[i].setStorageType(0);
  }
  //
  selectValues.setMeta(changeMeta);
  return selectValueMeta;
}
 
開發者ID:carbondata,項目名稱:carbondata,代碼行數:44,代碼來源:GraphGenerator.java


注:本文中的org.pentaho.di.trans.step.StepMeta.setName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。