当前位置: 首页>>代码示例>>Java>>正文


Java StepMetaInterface类代码示例

本文整理汇总了Java中org.pentaho.di.trans.step.StepMetaInterface的典型用法代码示例。如果您正苦于以下问题:Java StepMetaInterface类的具体用法?Java StepMetaInterface怎么用?Java StepMetaInterface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StepMetaInterface类属于org.pentaho.di.trans.step包,在下文中一共展示了StepMetaInterface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
@Override
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
  if ( !super.init( smi, sdi ) ) {
    return false;
  }
  meta = (ZendeskInputMeta) smi;
  data = (ZendeskInputData) sdi;

  String subDomain = environmentSubstitute( meta.getSubDomain() );
  String username = environmentSubstitute( meta.getUsername() );
  String password = Encr.decryptPasswordOptionallyEncrypted( environmentSubstitute( meta.getPassword() ) );

  if ( Const.isEmpty( subDomain ) || Const.isEmpty( username ) || Const.isEmpty( password ) ) {
    logError( BaseMessages.getString( PKG, "ZendeskInput.Error.MissingCredentials" ) );
    return false;
  }

  data.conn = createConnection( subDomain, username, password, meta.isToken() );
  if ( data.conn == null || data.conn.isClosed() ) {
    return false;
  }
  return true;
}
 
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:24,代码来源:ZendeskInput.java

示例2: dispose

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public void dispose(StepMetaInterface smi, StepDataInterface sdi) {

        try {
            if (data.recordWriter != null) {
                data.recordWriter.close();
            }
            if (data.uploadSession != null) {
                data.uploadSession.commit();
            }
        } catch (IOException e) {
            logError(e.getMessage(), e);
        } catch (TunnelException ex) {
            logError(ex.getMessage(), ex);
        }

        super.dispose(smi, sdi);
    }
 
开发者ID:aliyun,项目名称:aliyun-maxcompute-data-collectors,代码行数:18,代码来源:OdpsOutput.java

示例3: init

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
@Override
public boolean init(StepMetaInterface smi, StepDataInterface sdi) {
    this.meta = ((CassandraInputMeta) smi);
    this.data = ((CassandraInputData) sdi);
    String nodes = environmentSubstitute(this.meta.getCassandraNodes());
    String port = environmentSubstitute(this.meta.getCassandraPort());
    String username = environmentSubstitute(this.meta.getUsername());
    String password = environmentSubstitute(this.meta.getPassword());
    String keyspace = environmentSubstitute(this.meta.getKeyspace());
    Boolean withSSL = this.meta.getSslEnabled();
    String trustStoreFilePath = environmentSubstitute(this.meta.getTrustStoreFilePath());
    String trustStorePass = environmentSubstitute(this.meta.getTrustStorePass());
    String compression = environmentSubstitute(this.meta.getCompression().name());
    this.executeForEachInputRow = this.meta.getExecuteForEachInputRow();
    this.rowLimit = this.meta.getRowLimit();
    this.cqlStatement = environmentSubstitute(this.meta.getCqlStatement());
    try {
        this.connection = Utils.connect(nodes, port, username, password, keyspace, withSSL,
                trustStoreFilePath, trustStorePass, ConnectionCompression.fromString(compression));
    } catch (CassandraConnectionException e) {
        logError("Could not initialize step: " + e.getMessage());
    }
    logDetailed("Init connection OK : "+this.connection);
    return super.init(this.meta, this.data);
}
 
开发者ID:bcolas,项目名称:pentaho-cassandra-plugin,代码行数:26,代码来源:CassandraInput.java

示例4: processRow

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
	meta = (EasyExpandMeta) smi;
	data = (EasyExpandData) sdi;
	if(StringUtils.isNotBlank(meta.getClassName())){
           try {
               //实例化配置的类
               if(first){
                   kui = (EasyExpandRunBase) Class.forName(
                           environmentSubstitute(meta.getClassName())).newInstance();
                   kui.setKu(this);
                   kui.setMeta(meta,this);
               }
               kui.setData(data);
               return kui.run();
           } catch (Exception e) {
               setErrors(getErrors()+1);
               logError("运行失败,"+meta.getClassName()+","+Arrays.toString(getRow())+","
               +environmentSubstitute(meta.getConfigInfo()), e);
               return defaultRun();
           }
	}else{
        return defaultRun();
	}

}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:26,代码来源:EasyExpand.java

示例5: processRow

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
	meta = (EasyExpandMeta) smi;
	data = (EasyExpandData) sdi;
	if(StringUtils.isNotBlank(meta.getClassName())){
           try {
               //实例化配置的类
               if(first){
                   kui = (EasyExpandRunBase) Class.forName(
                           environmentSubstitute(meta.getClassName())).newInstance();
                   kui.setKu(this);
                   kui.setMeta(meta,this);
               }
               kui.setData(data);
               return kui.run();
           } catch (Exception e) {
               setErrors(getErrors()+1);
               logError("运行失败,"+meta.getClassName()+","
               +environmentSubstitute(meta.getConfigInfo()), e);
               return defaultRun();
           }
	}else{
        return defaultRun();
	}

}
 
开发者ID:majinju,项目名称:KettleUtil,代码行数:26,代码来源:EasyExpand.java

示例6: getHadoopInputStep

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
private StepMeta getHadoopInputStep(GraphConfigurationInfo graphConfiguration)
    throws GraphGeneratorException {
  HadoopFileInputMeta fileInputMeta = new HadoopFileInputMeta();
  fileInputMeta.setFilenameField("filename");
  fileInputMeta.setFileName(new String[] { "${csvInputFilePath}" });
  fileInputMeta.setDefault();
  fileInputMeta.setEncoding("UTF-8");
  fileInputMeta.setEnclosure("\"");
  fileInputMeta.setHeader(true);
  fileInputMeta.setSeparator(",");
  fileInputMeta.setAcceptingFilenames(true);
  fileInputMeta.setAcceptingStepName("getFileNames");
  fileInputMeta.setFileFormat("mixed");
  StepMeta csvDataStep = new StepMeta("HadoopFileInputPlugin", (StepMetaInterface) fileInputMeta);
  csvDataStep.setLocation(100, 100);
  int copies = Integer.parseInt(instance.getProperty(CarbonCommonConstants.NUM_CORES_LOADING,
      CarbonCommonConstants.DEFAULT_NUMBER_CORES));
  if (copies > 1) {
    csvDataStep.setCopies(4);
  }
  csvDataStep.setDraw(true);
  csvDataStep.setDescription("Read raw data from " + GraphGeneratorConstants.CSV_INPUT);

  return csvDataStep;
}
 
开发者ID:carbondata,项目名称:carbondata,代码行数:26,代码来源:GraphGenerator.java

示例7: getTableInputStep

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
private StepMeta getTableInputStep(GraphConfigurationInfo configurationInfo)
    throws GraphGeneratorException {
  TableInputMeta tableInput = new TableInputMeta();
  tableInput.setDatabaseMeta(getDatabaseMeta(configurationInfo));
  tableInput.setSQL(configurationInfo.getTableInputSqlQuery());
  //
  StepMeta tableInputStep =
      new StepMeta(GraphGeneratorConstants.TABLE_INPUT, (StepMetaInterface) tableInput);
  xAxixLocation += 120;
  tableInputStep.setLocation(xAxixLocation, yAxixLocation);
  //
  tableInputStep.setDraw(true);
  tableInputStep
      .setDescription("Read Data From Fact Table: " + GraphGeneratorConstants.TABLE_INPUT);

  return tableInputStep;
}
 
开发者ID:carbondata,项目名称:carbondata,代码行数:18,代码来源:GraphGenerator.java

示例8: init

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public boolean init(StepMetaInterface smi, StepDataInterface sdi) {
  meta = (DOMConcatFieldsMeta) smi;
  data = (DOMConcatFieldsData) sdi;

  if (!super.init(smi, sdi)) {
    return false;
  }

  try {
    data.documentBuilder = DocumentBuilderFactory.newInstance()
        .newDocumentBuilder();
  } catch (ParserConfigurationException e) {

    logError("Could not create a document builder", e);
    return false;
  }

  return true;
}
 
开发者ID:griddynamics,项目名称:xml-dom-kettle-etl-plugin,代码行数:20,代码来源:DOMConcatFields.java

示例9: processRow

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
	meta=(DummyTransMeta)smi;
	data=(DummyTransData)sdi;

	Object[] r=getRow();    // get row, set busy!
	if (r==null)  // no more input to be expected...
	{
		setOutputDone();
		return false;
	}
	
	putRow(getInputRowMeta(), r);     // copy row to possible alternate rowset(s).

       if (checkFeedback(getLinesRead())) 
       {
       	if(log.isBasic()) logBasic(Messages.getString("DummyTrans.Log.LineNumber")+getLinesRead()); //$NON-NLS-1$
       }
		
	return true;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:DummyTrans.java

示例10: dispose

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public void dispose(StepMetaInterface smi, StepDataInterface sdi)
{
   meta = (AddSequenceMeta) smi;
   data = (AddSequenceData) sdi;

   if (meta.isCounterUsed()) {
     if (data.getLookup() != null) {
       getTransMeta().getCounters().remove(data.getLookup());
     }
     data.counter = null;
   }

   if (meta.isDatabaseUsed()) {
     if (data.getDb() != null) {
       data.getDb().disconnect();
     }
   }

   super.dispose(smi, sdi);
 }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:AddSequence.java

示例11: stopRunning

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public void stopRunning(StepMetaInterface smi, StepDataInterface sdi)
		throws KettleException {

	MQTTProducerData data = (MQTTProducerData) sdi;
	if (data.client != null) {
		try {
			if (data.client.isConnected()) {
				data.client.disconnect();
			}
			data.client.close();
			data.client = null;
		} catch (MqttException e) {
			logError(
					Messages.getString("MQTTClientStep.ErrorClosingMQTTClient.Message"),
					e);
		}
	}
	super.stopRunning(smi, sdi);
}
 
开发者ID:RuckusWirelessIL,项目名称:pentaho-mqtt-producer,代码行数:20,代码来源:MQTTProducerStep.java

示例12: init

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
@Override
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
  if ( super.init( smi, sdi ) ) {
    try {
      // Create client and connect to memcached server(s)
      Set<InetSocketAddress> servers = ( (MemcachedOutputMeta) smi ).getServers();
      memcachedClient = new MemcachedClient( servers.toArray( new InetSocketAddress[servers.size()] ) );

      return true;
    } catch ( Exception e ) {
      logError( BaseMessages.getString( PKG, "MemcachedOutput.Error.ConnectError" ), e );
      return false;
    }
  } else {
    return false;
  }
}
 
开发者ID:mattyb149,项目名称:pdi-memcached-plugin,代码行数:18,代码来源:MemcachedOutput.java

示例13: init

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
{
	meta=(ClosureGeneratorMeta)smi;
	data=(ClosureGeneratorData)sdi;

	if (super.init(smi, sdi))
	{
		data.reading = true;
		data.map = new HashMap<Object, Object>();
		
		data.topLevel = null;
		if (meta.isRootIdZero()) {
			data.topLevel = new Long(0);
		}
		
		return true;
	}
	
	return false;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:ClosureGenerator.java

示例14: init

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
{
    meta=(MailValidatorMeta)smi;
    data=(MailValidatorData)sdi;

    if (super.init(smi, sdi))
    {
    	if(Const.isEmpty(meta.getResultFieldName()))
    	{
    		log.logError(toString(), Messages.getString("MailValidator.Error.ResultFieldMissing"));
    		return false;
    	}
        return true;
    }
    return false;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:MailValidator.java

示例15: init

import org.pentaho.di.trans.step.StepMetaInterface; //导入依赖的package包/类
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
{
	meta=(SystemDataMeta)smi;
	data=(SystemDataData)sdi;
	
	if (super.init(smi, sdi))
	{
	    // Add init code here.
		data.readsRows = false;
        List<StepMeta> previous = getTransMeta().findPreviousSteps(getStepMeta());
		if (previous!=null && previous.size()>0)
		{
			data.readsRows = true;
		}
		
	    return true;
	}
	return false;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:SystemData.java


注:本文中的org.pentaho.di.trans.step.StepMetaInterface类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。