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


Java InfobrightNamedPipeLoader.killQuery方法代码示例

本文整理汇总了Java中com.infobright.io.InfobrightNamedPipeLoader.killQuery方法的典型用法代码示例。如果您正苦于以下问题:Java InfobrightNamedPipeLoader.killQuery方法的具体用法?Java InfobrightNamedPipeLoader.killQuery怎么用?Java InfobrightNamedPipeLoader.killQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.infobright.io.InfobrightNamedPipeLoader的用法示例。


在下文中一共展示了InfobrightNamedPipeLoader.killQuery方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: databaseSetup

import com.infobright.io.InfobrightNamedPipeLoader; //导入方法依赖的package包/类
void databaseSetup(InfobrightLoaderMeta meta, InfobrightLoader step) throws KettleException {
  
  db = new Database(meta.getDatabaseMeta());
  db.connect();

  // FIXME: This will fail if the first row of the table contains a value that
  // cannot be read by Java. For example, a DATE field that contains the value
  // '0000-00-00'. In this case, the Kettle error message will misleadingly say
  // that the table doesn't exist. There doesn't seem to be any workaround.
  // See Pentaho JIRA: PDI-2117.
  //
  requiredRowMeta = meta.getRequiredFields(step); 
  requiredFields = requiredRowMeta.getFieldNames();
  
  try {
    // once the loader is built, this db connection cannot be used by this thread anymore.
    // the loader is using it and any other uses of the connection will block.
    if (meta.getInfobrightProductType() == null) {
      meta.setDataFormat(DataFormat.TXT_VARIABLE); // default for ICE
    }
    DataFormat dataFormat = DataFormat.valueForDisplayName(meta.getInfobrightProductType());

    Connection conn = db.getConnection();
    String tableName = meta.getDatabaseMeta().getQuotedSchemaTableCombination(step.environmentSubstitute(meta.getSchemaName()), step.environmentSubstitute(meta.getTablename()));
    EtlLogger logger = new KettleEtlLogger(step);
    loader = new InfobrightNamedPipeLoader(tableName, conn, logger, dataFormat);
    record = loader.createRecord(false); // TODO set to true to support error path
    loader.start();
    
  } catch (Exception e) {
    db.disconnect();
    db = null;
    if (loader != null) {
      try {
        loader.killQuery();
      } catch (SQLException e1) {
        throw new KettleDatabaseException(e1);
      }
    }
    throw new KettleDatabaseException(e);
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:43,代码来源:InfobrightLoaderData.java

示例2: databaseSetup

import com.infobright.io.InfobrightNamedPipeLoader; //导入方法依赖的package包/类
void databaseSetup(InfobrightLoaderMeta meta, InfobrightLoader step) throws KettleException {
  
  db = new Database(step, meta.getDatabaseMeta());
  db.connect();

  // FIXME: This will fail if the first row of the table contains a value that
  // cannot be read by Java. For example, a DATE field that contains the value
  // '0000-00-00'. In this case, the Kettle error message will misleadingly say
  // that the table doesn't exist. There doesn't seem to be any workaround.
  // See Pentaho JIRA: PDI-2117.
  //
  requiredRowMeta = meta.getRequiredFields(step); 
  requiredFields = requiredRowMeta.getFieldNames();
  
  try {
    // once the loader is built, this db connection cannot be used by this thread anymore.
    // the loader is using it and any other uses of the connection will block.
    if (meta.getInfobrightProductType() == null) {
      meta.setDataFormat(DataFormat.TXT_VARIABLE); // default for ICE
    }
    DataFormat dataFormat = DataFormat.valueForDisplayName(meta.getInfobrightProductType());
    int agentPort = meta.getAgentPort();
    Charset charset = meta.getCharset();
    Connection conn = db.getConnection();
    String tableName = meta.getDatabaseMeta().getQuotedSchemaTableCombination(step.environmentSubstitute(meta.getSchemaName()), step.environmentSubstitute(meta.getTablename()));
    EtlLogger logger = new KettleEtlLogger(step);
    loader = new InfobrightNamedPipeLoader(tableName, conn, logger, dataFormat, charset, agentPort);
    loader.setTimeout(30);
    String debugFile = meta.getDebugFile();
    if (debugFile != null) {
      OutputStream debugOutputStream = new FileOutputStream(debugFile);
      loader.setDebugOutputStream(debugOutputStream);
    }
    record = loader.createRecord(false); // TODO set to true to support error path
    loader.start();
    
  } catch (Exception e) {
    db.disconnect();
    db = null;
    if (loader != null) {
      try {
        loader.killQuery();
      } catch (SQLException e1) {
        throw new KettleDatabaseException(e1);
      }
    }
    throw new KettleDatabaseException(e);
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:50,代码来源:InfobrightLoaderData.java

示例3: databaseSetup

import com.infobright.io.InfobrightNamedPipeLoader; //导入方法依赖的package包/类
void databaseSetup(InfobrightLoaderMeta meta, InfobrightLoader step) throws KettleException {
  
  db = new Database(step, meta.getDatabaseMeta());
  db.connect();

  // FIXME: This will fail if the first row of the table contains a value that
  // cannot be read by Java. For example, a DATE field that contains the value
  // '0000-00-00'. In this case, the Kettle error message will misleadingly say
  // that the table doesn't exist. There doesn't seem to be any workaround.
  // See Pentaho JIRA: PDI-2117.
  //
  requiredRowMeta = meta.getRequiredFields(step); 
  requiredFields = requiredRowMeta.getFieldNames();
  
  try {
    // once the loader is built, this db connection cannot be used by this thread anymore.
    // the loader is using it and any other uses of the connection will block.
    if (meta.getInfobrightProductType() == null) {
      meta.setDataFormat(DataFormat.TXT_VARIABLE); // default for ICE
    }
    DataFormat dataFormat = DataFormat.valueForDisplayName(meta.getInfobrightProductType());
    int agentPort = meta.getAgentPort();
    Charset charset = meta.getCharset();
    Connection conn = db.getConnection();
    String tableName = meta.getDatabaseMeta().getQuotedSchemaTableCombination(step.environmentSubstitute(meta.getSchemaName()), step.environmentSubstitute(meta.getTableName()));
    EtlLogger logger = new KettleEtlLogger(step);
    loader = new InfobrightNamedPipeLoader(tableName, conn, logger, dataFormat, charset, agentPort);
    loader.setTimeout(30);
    String debugFile = meta.getDebugFile();
    if (debugFile != null) {
      OutputStream debugOutputStream = new FileOutputStream(debugFile);
      loader.setDebugOutputStream(debugOutputStream);
    }
    record = loader.createRecord(false); // TODO set to true to support error path
    loader.start();
    
  } catch (Exception e) {
    db.disconnect();
    db = null;
    if (loader != null) {
      try {
        loader.killQuery();
      } catch (SQLException e1) {
        throw new KettleDatabaseException(e1);
      }
    }
    throw new KettleDatabaseException(e);
  }
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:50,代码来源:InfobrightLoaderData.java

示例4: databaseSetup

import com.infobright.io.InfobrightNamedPipeLoader; //导入方法依赖的package包/类
void databaseSetup( InfobrightLoaderMeta meta, InfobrightLoader step ) throws KettleException {

    db = new Database( step, meta.getDatabaseMeta() );
    db.connect();

    // FIXME: This will fail if the first row of the table contains a value that
    // cannot be read by Java. For example, a DATE field that contains the value
    // '0000-00-00'. In this case, the Kettle error message will misleadingly say
    // that the table doesn't exist. There doesn't seem to be any workaround.
    // See Pentaho JIRA: PDI-2117.
    //
    requiredRowMeta = meta.getRequiredFields( step );
    requiredFields = requiredRowMeta.getFieldNames();

    try {
      // once the loader is built, this db connection cannot be used by this thread anymore.
      // the loader is using it and any other uses of the connection will block.
      if ( meta.getInfobrightProductType() == null ) {
        meta.setDataFormat( DataFormat.TXT_VARIABLE ); // default for ICE
      }
      DataFormat dataFormat = DataFormat.valueForDisplayName( meta.getInfobrightProductType() );
      int agentPort = meta.getAgentPort();
      Charset charset = meta.getCharset();
      Connection conn = db.getConnection();
      String tableName =
        meta
          .getDatabaseMeta().getQuotedSchemaTableCombination(
            step.environmentSubstitute( meta.getSchemaName() ),
            step.environmentSubstitute( meta.getTableName() ) );
      EtlLogger logger = new KettleEtlLogger( step );
      loader = new InfobrightNamedPipeLoader( tableName, conn, logger, dataFormat, charset, agentPort );
      loader.setTimeout( 30 );
      String debugFile = meta.getDebugFile();
      if ( debugFile != null ) {
        OutputStream debugOutputStream = new FileOutputStream( debugFile );
        loader.setDebugOutputStream( debugOutputStream );
      }
      record = loader.createRecord( false ); // TODO set to true to support error path
      loader.start();

    } catch ( Exception e ) {
      db.disconnect();
      db = null;
      if ( loader != null ) {
        try {
          loader.killQuery();
        } catch ( SQLException e1 ) {
          throw new KettleDatabaseException( e1 );
        }
      }
      throw new KettleDatabaseException( e );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:54,代码来源:InfobrightLoaderData.java


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