本文整理汇总了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 );
}
示例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();
}
示例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();
}
示例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() );
}
}
示例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() );
}
}
示例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 );
}