本文整理汇总了Java中org.pentaho.di.core.logging.LoggingRegistry类的典型用法代码示例。如果您正苦于以下问题:Java LoggingRegistry类的具体用法?Java LoggingRegistry怎么用?Java LoggingRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LoggingRegistry类属于org.pentaho.di.core.logging包,在下文中一共展示了LoggingRegistry类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getAllDurations
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
public static List<MetricsDuration> getAllDurations(String parentLogChannelId) {
List<MetricsDuration> durations = new ArrayList<MetricsDuration>();
// System.out.println("-------------------------------------------");
//
List<String> logChannelIds = LoggingRegistry.getInstance().getLogChannelChildren(parentLogChannelId);
for (String logChannelId : logChannelIds) {
LoggingObjectInterface object = LoggingRegistry.getInstance().getLoggingObject(logChannelId);
if (object!=null) {
// System.out.println(object.getObjectName());
durations.addAll(getDurations(logChannelId));
}
}
return durations;
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:17,代码来源:MetricsUtil.java
示例2: getLoggingHierarchy
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
public List<LoggingHierarchy> getLoggingHierarchy() {
List<LoggingHierarchy> hierarchy = new ArrayList<LoggingHierarchy>();
List<String> childIds = LoggingRegistry.getInstance().getLogChannelChildren(getLogChannelId());
for (String childId : childIds) {
LoggingObjectInterface loggingObject = LoggingRegistry.getInstance().getLoggingObject(childId);
if (loggingObject!=null) {
hierarchy.add(new LoggingHierarchy(getLogChannelId(), batchId, loggingObject));
}
}
return hierarchy;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:13,代码来源:Job.java
示例3: dumpLoggingRegistry
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
public void dumpLoggingRegistry() {
LoggingRegistry registry = LoggingRegistry.getInstance();
Map<String, LoggingObjectInterface> loggingMap = registry.getMap();
for (LoggingObjectInterface loggingObject : loggingMap.values()) {
System.out.println(loggingObject.getLogChannelId()+" - "+loggingObject.getObjectName()+" - "+loggingObject.getObjectType()); //$NON-NLS-1$ //$NON-NLS-2$
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:10,代码来源:TransGraph.java
示例4: getLoggingHierarchy
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
/**
* Gets the logging hierarchy.
* @return the logging hierarchy
*/
public List<LoggingHierarchy> getLoggingHierarchy() {
List<LoggingHierarchy> hierarchy = new ArrayList<LoggingHierarchy>();
List<String> childIds = LoggingRegistry.getInstance().getLogChannelChildren(getLogChannelId());
for (String childId : childIds) {
LoggingObjectInterface loggingObject = LoggingRegistry.getInstance().getLoggingObject(childId);
if (loggingObject!=null) {
hierarchy.add(new LoggingHierarchy(getLogChannelId(), batchId, loggingObject));
}
}
return hierarchy;
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:17,代码来源:Job.java
示例5: getLoggingHierarchy
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
/**
* Gets the logging hierarchy.
*
* @return the logging hierarchy
*/
public List<LoggingHierarchy> getLoggingHierarchy() {
List<LoggingHierarchy> hierarchy = new ArrayList<LoggingHierarchy>();
List<String> childIds = LoggingRegistry.getInstance().getLogChannelChildren(getLogChannelId());
for (String childId : childIds) {
LoggingObjectInterface loggingObject = LoggingRegistry.getInstance().getLoggingObject(childId);
if (loggingObject!=null) {
hierarchy.add(new LoggingHierarchy(getLogChannelId(), batchId, loggingObject));
}
}
return hierarchy;
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:18,代码来源:Trans.java
示例6: testLogChannelLeaking
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
@Test
public void testLogChannelLeaking() throws Exception {
transMeta = new TransMeta(
getClass().getResource( MRTestUtil.PATH_TO_WORDCOUNT_REDUCER_TEST_TRANSFORMATION ).toURI().getPath() );
MRTestUtil.configJobReducerBaseCase( transMeta, mrJobConfig, genericTransReduce );
int logChannels = LoggingRegistry.getInstance().getMap().size();
Text wordToCount = null;
int expectedOutputCollectorMockSize = 0;
assertEquals( "Incorrect output", expectedOutputCollectorMockSize, outputCollectorMock.getCollection().size() );
for ( int i = 0; i < RUNS; i++ ) {
// set up test key and value for reducer as a pair of elements: word1-->[1], word2-->[1,2] ...,
// wordN-->[1,...,N-1,N]
wordToCount = new Text( "word" + ( i + 1 ) );
List<IntWritable> wordCounts =
IntStream.rangeClosed( 1, i + 1 ).mapToObj( value -> new IntWritable( value ) ).collect( Collectors.toList() );
IntWritable expectedWordCount = new IntWritable( wordCounts.stream().mapToInt( IntWritable::get ).sum() );
genericTransReduce.reduce( wordToCount, wordCounts.iterator(), outputCollectorMock, reporterMock );
genericTransReduce.close();
expectedOutputCollectorMockSize++;
assertNull( "Exception thrown", genericTransReduce.getException() );
assertEquals( "Incorrect output", expectedOutputCollectorMockSize, outputCollectorMock.getCollection().size() );
assertEquals( expectedWordCount, outputCollectorMock.getCollection().get( wordToCount ).get( 0 ) );
assertEquals( "LogChannels are not being cleaned up. On Run #" + ( i + 1 ) + " we have too many.",
logChannels + EXPECTED_CHANNELS_PER_RUN, LoggingRegistry.getInstance().getMap().size() );
}
outputCollectorMock.close();
assertEquals( logChannels + EXPECTED_CHANNELS_PER_RUN, LoggingRegistry.getInstance().getMap().size() );
}
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:33,代码来源:GenericTransReduceTest.java
示例7: testLogChannelLeaking
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
@Test
public void testLogChannelLeaking() throws Exception {
transMeta = new TransMeta(
getClass().getResource( MRTestUtil.PATH_TO_WORDCOUNT_MAPPER_TEST_TRANSFORMATION ).toURI().getPath() );
MRTestUtil.configJobMapBaseCase( transMeta, mrJobConfig, mapRunnable );
int logChannels = LoggingRegistry.getInstance().getMap().size();
int expectedOutputCollectorMockSize = 0;
List<IntWritable> expectedWordCountArrays = null;
assertEquals( "Incorrect output ", expectedOutputCollectorMockSize, outputCollectorMock.getCollection().size() );
for ( int i = 0; i < RUNS; i++ ) {
// set up test value rows
List<String> wordsToCount =
IntStream.rangeClosed( 1, i + 1 ).mapToObj( value -> String.valueOf( WORD_TO_COUNT_TEMPLATE + value ) )
.collect( Collectors.toList() );
reader = new MockRecordReader( wordsToCount );
mapRunnable.run( reader, outputCollectorMock, reporterMock );
expectedOutputCollectorMockSize++;
assertNull( "Exception thrown", mapRunnable.getException() );
assertEquals( "Incorrect output", expectedOutputCollectorMockSize, outputCollectorMock.getCollection().size() );
assertEquals( "LogChannels are not being cleaned up. On Run #" + ( i + 1 ) + " we have too many.",
logChannels + EXPECTED_CHANNELS_PER_RUN, LoggingRegistry.getInstance().getMap().size() );
}
outputCollectorMock.close();
// outputCollectorMock.getCollection().forEach( ( k, v ) -> System.out.println( "outputCollectorMock: Item : " + k +
// " Count : " + v ) );
// verifying the arrays of word count for the each word
for ( int i = RUNS; i > 0; i-- ) {
expectedWordCountArrays = IntStream.rangeClosed( 1, RUNS - i + 1 ).mapToObj( value -> new IntWritable( 1 ) )
.collect( Collectors.toList() );
assertEquals( "Incorrect count array for the word: " + WORD_TO_COUNT_TEMPLATE + i, expectedWordCountArrays,
outputCollectorMock.getCollection().get( new Text( WORD_TO_COUNT_TEMPLATE + i ) ) );
}
assertEquals( logChannels + EXPECTED_CHANNELS_PER_RUN, LoggingRegistry.getInstance().getMap().size() );
}
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:39,代码来源:PentahoMapRunnableTest.java
示例8: testLogChannelLeaking
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
@Test
public void testLogChannelLeaking() throws Exception {
transMeta = new TransMeta(
getClass().getResource( MRTestUtil.PATH_TO_WORDCOUNT_REDUCER_TEST_TRANSFORMATION ).toURI().getPath() );
MRTestUtil.configJobCombinerBaseCase( transMeta, mrJobConfig, genericTransCombiner );
int logChannels = LoggingRegistry.getInstance().getMap().size();
Text wordToCount = null;
int expectedOutputCollectorMockSize = 0;
assertEquals( "Incorrect output", expectedOutputCollectorMockSize, outputCollectorMock.getCollection().size() );
for ( int i = 0; i < RUNS; i++ ) {
// set up test key and value for reducer as a pair of elements: word1-->[1], word2-->[1,2] ...,
// wordN-->[1,...,N-1,N]
wordToCount = new Text( "word" + ( i + 1 ) );
List<IntWritable> wordCounts =
IntStream.rangeClosed( 1, i + 1 ).mapToObj( value -> new IntWritable( value ) ).collect( Collectors.toList() );
IntWritable expectedWordCount = new IntWritable( wordCounts.stream().mapToInt( IntWritable::get ).sum() );
genericTransCombiner.reduce( wordToCount, wordCounts.iterator(), outputCollectorMock, reporterMock );
genericTransCombiner.close();
expectedOutputCollectorMockSize++;
assertNull( "Exception thrown", genericTransCombiner.getException() );
assertEquals( "Incorrect output", expectedOutputCollectorMockSize, outputCollectorMock.getCollection().size() );
assertEquals( expectedWordCount, outputCollectorMock.getCollection().get( wordToCount ).get( 0 ) );
assertEquals( "LogChannels are not being cleaned up. On Run #" + ( i + 1 ) + " we have too many.",
logChannels + EXPECTED_CHANNELS_PER_RUN, LoggingRegistry.getInstance().getMap().size() );
}
outputCollectorMock.close();
assertEquals( logChannels + EXPECTED_CHANNELS_PER_RUN, LoggingRegistry.getInstance().getMap().size() );
}
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:33,代码来源:GenericTransCombinerTest.java
示例9: toString
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
@Override
public String toString() {
LoggingObjectInterface loggingObject = LoggingRegistry.getInstance().getLoggingObject(logChannelId);
String subject = null;
if (loggingObject != null) {
subject = loggingObject.getObjectName() + "(" + loggingObject.getObjectType() + ")";
} else {
subject = "-";
}
return subject + " - " + getKey() + " @ " + StringUtil.getFormattedDateTime(date, true) + " : " + type.toString();
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:14,代码来源:MetricsSnapshot.java
示例10: getLoggingHierarchy
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
/**
* Gets the logging hierarchy.
*
* @return the logging hierarchy
*/
public List<LoggingHierarchy> getLoggingHierarchy() {
List<LoggingHierarchy> hierarchy = new ArrayList<LoggingHierarchy>();
List<String> childIds = LoggingRegistry.getInstance().getLogChannelChildren( getLogChannelId() );
for ( String childId : childIds ) {
LoggingObjectInterface loggingObject = LoggingRegistry.getInstance().getLoggingObject( childId );
if ( loggingObject != null ) {
hierarchy.add( new LoggingHierarchy( getLogChannelId(), batchId, loggingObject ) );
}
}
return hierarchy;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:Job.java
示例11: getLoggingHierarchy
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
/**
* Gets the logging hierarchy.
*
* @return the logging hierarchy
*/
public List<LoggingHierarchy> getLoggingHierarchy() {
List<LoggingHierarchy> hierarchy = new ArrayList<>();
List<String> childIds = LoggingRegistry.getInstance().getLogChannelChildren( getLogChannelId() );
for ( String childId : childIds ) {
LoggingObjectInterface loggingObject = LoggingRegistry.getInstance().getLoggingObject( childId );
if ( loggingObject != null ) {
hierarchy.add( new LoggingHierarchy( getLogChannelId(), batchId, loggingObject ) );
}
}
return hierarchy;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:Trans.java
示例12: discardLogLines
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的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
示例13: discardLogLines
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的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
示例14: dumpLoggingRegistry
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
public void dumpLoggingRegistry() {
LoggingRegistry registry = LoggingRegistry.getInstance();
Map<String, LoggingObjectInterface> loggingMap = registry.getMap();
for ( LoggingObjectInterface loggingObject : loggingMap.values() ) {
System.out.println( loggingObject.getLogChannelId() + " - " + loggingObject.getObjectName() + " - "
+ loggingObject.getObjectType() );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:TransGraph.java
示例15: getAllDurations
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
public static List<MetricsDuration> getAllDurations( String parentLogChannelId ) {
List<MetricsDuration> durations = new ArrayList<MetricsDuration>();
List<String> logChannelIds = LoggingRegistry.getInstance().getLogChannelChildren( parentLogChannelId );
for ( String logChannelId : logChannelIds ) {
LoggingObjectInterface object = LoggingRegistry.getInstance().getLoggingObject( logChannelId );
if ( object != null ) {
durations.addAll( getDurations( logChannelId ) );
}
}
return durations;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:MetricsUtil.java
示例16: toString
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
@Override
public String toString() {
LoggingObjectInterface loggingObject = LoggingRegistry.getInstance().getLoggingObject( logChannelId );
String subject = null;
if ( loggingObject != null ) {
subject = loggingObject.getObjectName() + "(" + loggingObject.getObjectType() + ")";
} else {
subject = "-";
}
return subject
+ " - " + getKey() + " @ " + StringUtil.getFormattedDateTime( date, true ) + " : " + type.toString();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:MetricsSnapshot.java
示例17: testValueMetaBaseOnlyHasOneLogger
import org.pentaho.di.core.logging.LoggingRegistry; //导入依赖的package包/类
@Test
public void testValueMetaBaseOnlyHasOneLogger() throws NoSuchFieldException, IllegalAccessException {
Field log = ValueMetaBase.class.getDeclaredField( "log" );
assertTrue( Modifier.isStatic( log.getModifiers() ) );
assertTrue( Modifier.isFinal( log.getModifiers() ) );
log.setAccessible( true );
try {
assertEquals( LoggingRegistry.getInstance().findExistingLoggingSource( new LoggingObject( "ValueMetaBase" ) )
.getLogChannelId(),
( (LogChannelInterface) log.get( null ) ).getLogChannelId() );
} finally {
log.setAccessible( false );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:ValueMetaBaseTest.java
注:本文中的org.pentaho.di.core.logging.LoggingRegistry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论