本文整理汇总了Java中org.pentaho.di.core.KettleEnvironment.isInitialized方法的典型用法代码示例。如果您正苦于以下问题:Java KettleEnvironment.isInitialized方法的具体用法?Java KettleEnvironment.isInitialized怎么用?Java KettleEnvironment.isInitialized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.KettleEnvironment
的用法示例。
在下文中一共展示了KettleEnvironment.isInitialized方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initEnv
import org.pentaho.di.core.KettleEnvironment; //导入方法依赖的package包/类
/**
* 初始化环境变量 <br/>
* @author jingma
* @throws KettleException
*/
public static void initEnv() throws KettleException {
if(System.getenv("KETTLE_HOME")!=null){
System.setProperty("DI_HOME", System.getenv("KETTLE_HOME"));
System.setProperty("KETTLE_HOME", System.getenv("KETTLE_HOME"));
System.setProperty("org.osjava.sj.root", System.getenv("KETTLE_HOME")+"/simple-jndi");
log.debug("KETTLE_HOME配置[能自动加载该目录下plugins中的插件]:"+System.getenv("KETTLE_HOME"));
}
if(System.getenv("KETTLE_JNDI_ROOT")!=null){
System.setProperty("org.osjava.sj.root", System.getenv("KETTLE_JNDI_ROOT"));
log.debug("Simple-jndi配置根路径:"+System.getenv("KETTLE_JNDI_ROOT"));
}
//初始化kettle环境
if(!KettleEnvironment.isInitialized()){
KettleEnvironment.init();
KettleClientEnvironment.getInstance().setClient( KettleClientEnvironment.ClientType.SPOON );
}
}
示例2: initKettleEnvironment
import org.pentaho.di.core.KettleEnvironment; //导入方法依赖的package包/类
/**
* Initialize the Kettle environment with settings from the provided configuration
*
* @param conf
* Configuration to configure Kettle environment with
*/
private static void initKettleEnvironment( Configuration conf ) throws KettleException {
if ( !KettleEnvironment.isInitialized() ) {
String kettleHome = getKettleHomeProperty( conf );
String pluginDir = getPluginDirProperty( conf );
String metaStoreDir = getMetastoreDirProperty( conf );
System.setProperty( "KETTLE_HOME", kettleHome );
System.setProperty( Const.PLUGIN_BASE_FOLDERS_PROP, pluginDir );
System.setProperty( Const.PENTAHO_METASTORE_FOLDER, metaStoreDir );
System.out.println( BaseMessages.getString( MRUtil.class, "KettleHome.Info", kettleHome ) );
System.out.println( BaseMessages.getString( MRUtil.class, "PluginDirectory.Info", pluginDir ) );
System.out.println( BaseMessages.getString( MRUtil.class, "MetasStoreDirectory.Info", metaStoreDir ) );
KettleEnvironment.init();
}
}
示例3: initEnv
import org.pentaho.di.core.KettleEnvironment; //导入方法依赖的package包/类
/**
* 初始化环境变量 <br/>
* @author jingma
* @throws KettleException
*/
public static void initEnv() throws KettleException {
log.debug("KETTLE_HOME配置[能自动加载该目录下plugins中的插件]:"+System.getProperty("KETTLE_HOME"));
log.debug("Simple-jndi配置根路径:"+System.getProperty("org.osjava.sj.root"));
log.debug("日志最大行数:"+System.getProperty("KETTLE_MAX_LOG_SIZE_IN_LINES"));
log.debug("最大日志管道数:"+System.getProperty("KETTLE_MAX_LOGGING_REGISTRY_SIZE"));
//初始化kettle环境
if(!KettleEnvironment.isInitialized()){
KettleEnvironment.init();
KettleClientEnvironment.getInstance().setClient( KettleClientEnvironment.ClientType.SPOON );
}
}
示例4: initialize
import org.pentaho.di.core.KettleEnvironment; //导入方法依赖的package包/类
private void initialize() {
if (!KettleEnvironment.isInitialized()) {
try {
KettleEnvironment.init();
} catch (KettleException e) {
throw new RuntimeException("Unable to initialize Kettle", e);
}
}
}
示例5: setUpClass
import org.pentaho.di.core.KettleEnvironment; //导入方法依赖的package包/类
@BeforeClass
public static void setUpClass() throws Exception {
if ( !KettleEnvironment.isInitialized() ) {
KettleEnvironment.init();
}
}
示例6: createFileRep
import org.pentaho.di.core.KettleEnvironment; //导入方法依赖的package包/类
/**
* createFileRep:创建文件资源库. <br/>
* @author jingma
* @param id 资源库id
* @param repName 资源库名称
* @param description 资源库描述
* @param baseDirectory 资源库目录
* @return 已经初始化的资源库
* @throws KettleException
* @since JDK 1.6
*/
public static Repository createFileRep(String id, String repName,
String description, String baseDirectory) throws KettleException{
initEnv();
//初始化kettle环境
if(!KettleEnvironment.isInitialized()){
KettleEnvironment.init();
}
KettleFileRepositoryMeta fileRepMeta = new KettleFileRepositoryMeta( id, repName, description, baseDirectory);
return createRep(fileRepMeta, id, repName, description);
}