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


Java KettleLogStore.discardLines方法代码示例

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


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

示例1: startTransformation

import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@GET
@Path( "/start/{id : .+}" )
@Produces( { MediaType.APPLICATION_JSON } )
public TransformationStatus startTransformation( @PathParam( "id" ) String id ) {
  Trans trans = CarteResource.getTransformation( id );
  try {
    // Discard old log lines from old transformation runs
    //
    KettleLogStore.discardLines( trans.getLogChannelId(), true );

    String carteObjectId = UUID.randomUUID().toString();
    SimpleLoggingObject servletLoggingObject =
      new SimpleLoggingObject( getClass().getName(), LoggingObjectType.CARTE, null );
    servletLoggingObject.setContainerObjectId( carteObjectId );
    servletLoggingObject.setLogLevel( trans.getLogLevel() );
    trans.setParent( servletLoggingObject );
    trans.execute( null );
  } catch ( KettleException e ) {
    e.printStackTrace();
  }
  return getTransformationStatus( id );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:TransformationResource.java

示例2: removeTransformation

import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@GET
@Path( "/remove/{id : .+}" )
public Response removeTransformation( @PathParam( "id" ) String id ) {
  Trans trans = CarteResource.getTransformation( id );
  CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id );
  KettleLogStore.discardLines( trans.getLogChannelId(), true );
  CarteSingleton.getInstance().getTransformationMap().removeTransformation( entry );
  return Response.ok().build();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:TransformationResource.java

示例3: removeJob

import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@GET
@Path( "/remove/{id : .+}" )
public Response removeJob( @PathParam( "id" ) String id ) {
  Job job = CarteResource.getJob( id );
  CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id );
  KettleLogStore.discardLines( job.getLogChannelId(), true );
  CarteSingleton.getInstance().getJobMap().removeJob( entry );
  return Response.ok().build();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:JobResource.java

示例4: discardLogLines

import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@VisibleForTesting
void discardLogLines( TransExecutorData transExecutorData ) {
  // Keep the strain on the logging back-end conservative.
  // TODO: make this optional/user-defined later
  Trans executorTrans = transExecutorData.getExecutorTrans();
  if ( executorTrans != null ) {
    KettleLogStore.discardLines( executorTrans.getLogChannelId(), false );
    LoggingRegistry.getInstance().removeIncludingChildren( executorTrans.getLogChannelId() );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:TransExecutor.java

示例5: discardLogLines

import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@VisibleForTesting
void discardLogLines( JobExecutorData data ) {
  // Keep the strain on the logging back-end conservative.
  // TODO: make this optional/user-defined later
  if ( data.executorJob != null ) {
    KettleLogStore.discardLines( data.executorJob.getLogChannelId(), false );
    LoggingRegistry.getInstance().removeIncludingChildren( data.executorJob.getLogChannelId() );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:JobExecutor.java

示例6: startJob

import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@GET
@Path( "/start/{id : .+}" )
@Produces( { MediaType.APPLICATION_JSON } )
public JobStatus startJob( @PathParam( "id" ) String id ) {
  Job job = CarteResource.getJob( id );
  CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id );
  try {
    if ( job.isInitialized() && !job.isActive() ) {
      // Re-create the job from the jobMeta
      //
      // We might need to re-connect to the repository
      //
      if ( job.getRep() != null && !job.getRep().isConnected() ) {
        if ( job.getRep().getUserInfo() != null ) {
          job.getRep().connect( job.getRep().getUserInfo().getLogin(), job.getRep().getUserInfo().getPassword() );
        } else {
          job.getRep().connect( null, null );
        }
      }

      // Create a new job object to start from a sane state. Then replace
      // the new job in the job map
      //
      synchronized ( this ) {
        JobConfiguration jobConfiguration = CarteSingleton.getInstance().getJobMap().getConfiguration( entry );

        String carteObjectId = UUID.randomUUID().toString();
        SimpleLoggingObject servletLoggingObject =
          new SimpleLoggingObject( getClass().getName(), LoggingObjectType.CARTE, null );
        servletLoggingObject.setContainerObjectId( carteObjectId );

        Job newJob = new Job( job.getRep(), job.getJobMeta(), servletLoggingObject );
        newJob.setLogLevel( job.getLogLevel() );

        // Discard old log lines from the old job
        //
        KettleLogStore.discardLines( job.getLogChannelId(), true );

        CarteSingleton.getInstance().getJobMap().replaceJob( entry, newJob, jobConfiguration );
        job = newJob;
      }
    }
    job.start();
  } catch ( KettleException e ) {
    e.printStackTrace();
  }
  return getJobStatus( id );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:49,代码来源:JobResource.java


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