Search in sources :

Example 26 with SimpleLoggingObject

use of org.pentaho.di.core.logging.SimpleLoggingObject in project pentaho-kettle by pentaho.

the class TableCompareIT method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    KettleEnvironment.init();
    log = new SimpleLoggingObject("junit", LoggingObjectType.GENERAL, null);
    databaseMeta = new DatabaseMeta("TableCompare", "Hypersonic", "JDBC", null, "mem:HSQLDB-JUNIT-LOGJOB", null, null, null);
}
Also used : SimpleLoggingObject(org.pentaho.di.core.logging.SimpleLoggingObject) DatabaseMeta(org.pentaho.di.core.database.DatabaseMeta) BeforeClass(org.junit.BeforeClass)

Example 27 with SimpleLoggingObject

use of org.pentaho.di.core.logging.SimpleLoggingObject in project pentaho-kettle by pentaho.

the class JobTrackerExecution method setUpBeforeClass.

@Before
public void setUpBeforeClass() throws Exception {
    KettleEnvironment.init();
    LoggingObjectInterface log = new SimpleLoggingObject("junit", LoggingObjectType.GENERAL, null);
    File file = File.createTempFile(JobTrackerExecution.class.getSimpleName(), "");
    file.deleteOnExit();
    DatabaseMeta databaseMeta = new DatabaseMeta(NAME, "Hypersonic", "JDBC", null, "mem:HSQLDB-JUNIT-LOGJOB", null, null, null);
    Database logDataBase = new Database(log, databaseMeta);
    logDataBase.connect();
    // run sql create for database
    InputStream input = JobTrackerExecution.class.getClassLoader().getResourceAsStream(PKG + CREATE);
    String sql = getStringFromInput(input);
    logDataBase.execStatements(sql);
    logDataBase.commit(true);
    logDataBase.disconnect();
}
Also used : InputStream(java.io.InputStream) Database(org.pentaho.di.core.database.Database) LoggingObjectInterface(org.pentaho.di.core.logging.LoggingObjectInterface) SimpleLoggingObject(org.pentaho.di.core.logging.SimpleLoggingObject) File(java.io.File) DatabaseMeta(org.pentaho.di.core.database.DatabaseMeta) Before(org.junit.Before)

Aggregations

SimpleLoggingObject (org.pentaho.di.core.logging.SimpleLoggingObject)27 KettleException (org.pentaho.di.core.exception.KettleException)16 Repository (org.pentaho.di.repository.Repository)11 IOException (java.io.IOException)10 PrintWriter (java.io.PrintWriter)10 ServletException (javax.servlet.ServletException)10 Trans (org.pentaho.di.trans.Trans)10 Job (org.pentaho.di.job.Job)9 TransMeta (org.pentaho.di.trans.TransMeta)8 JobConfiguration (org.pentaho.di.job.JobConfiguration)7 JobMeta (org.pentaho.di.job.JobMeta)7 JobAdapter (org.pentaho.di.job.JobAdapter)6 JobExecutionConfiguration (org.pentaho.di.job.JobExecutionConfiguration)6 TransExecutionConfiguration (org.pentaho.di.trans.TransExecutionConfiguration)6 LoggingObjectInterface (org.pentaho.di.core.logging.LoggingObjectInterface)5 TransConfiguration (org.pentaho.di.trans.TransConfiguration)5 Path (javax.ws.rs.Path)4 Produces (javax.ws.rs.Produces)4 DatabaseMeta (org.pentaho.di.core.database.DatabaseMeta)4 LogLevel (org.pentaho.di.core.logging.LogLevel)4