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


Java KettleEnvironment.isInitialized方法代码示例

本文整理汇总了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 );
    }
}
 
开发者ID:majinju,项目名称:KettleUtil,代码行数:23,代码来源:KettleUtils.java

示例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();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:23,代码来源:MRUtil.java

示例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 );
    }
}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:17,代码来源:KettleUtils.java

示例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);
 		}
   }
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:11,代码来源:KettleJDBCStatement.java

示例5: setUpClass

import org.pentaho.di.core.KettleEnvironment; //导入方法依赖的package包/类
@BeforeClass
public static void setUpClass() throws Exception {
  if ( !KettleEnvironment.isInitialized() ) {
    KettleEnvironment.init();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:7,代码来源:RepositoriesMetaTest.java

示例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);
}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:22,代码来源:KettleUtils.java


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