Search in sources :

Example 96 with BeforeClass

use of org.testng.annotations.BeforeClass in project incubator-gobblin by apache.

the class JsonStringToJsonIntermediateConverterTest method setUp.

@BeforeClass
public static void setUp() throws SchemaConversionException {
    converter = new JsonStringToJsonIntermediateConverter();
    WorkUnitState workUnit = new WorkUnitState();
    workUnit.getPropAsBoolean("gobblin.converter.jsonStringToJsonIntermediate.unpackComplexSchemas", true);
    converter.convertSchema("[]", workUnit);
    Type jsonType = new TypeToken<JsonObject>() {
    }.getType();
    Gson gson = new Gson();
    testJsonData = gson.fromJson(new InputStreamReader(JsonStringToJsonIntermediateConverterTest.class.getResourceAsStream("/converter/JsonStringToJsonIntermediateConverter.json")), jsonType);
}
Also used : Type(java.lang.reflect.Type) InputStreamReader(java.io.InputStreamReader) WorkUnitState(gobblin.configuration.WorkUnitState) JsonObject(com.google.gson.JsonObject) Gson(com.google.gson.Gson) BeforeClass(org.testng.annotations.BeforeClass)

Example 97 with BeforeClass

use of org.testng.annotations.BeforeClass in project incubator-gobblin by apache.

the class FsRenameCommitStepTest method setUp.

@BeforeClass
public void setUp() throws IOException {
    this.fs = FileSystem.getLocal(new Configuration());
    this.fs.delete(new Path(ROOT_DIR), true);
    Path dir1 = new Path(ROOT_DIR, "dir1");
    Path dir2 = new Path(ROOT_DIR, "dir2");
    this.fs.mkdirs(dir1);
    this.fs.mkdirs(dir2);
    Path src = new Path(dir1, "file");
    Path dst = new Path(dir2, "file");
    this.fs.createNewFile(src);
    this.step = (FsRenameCommitStep) new FsRenameCommitStep.Builder<>().from(src).to(dst).withProps(new State()).build();
}
Also used : Path(org.apache.hadoop.fs.Path) Configuration(org.apache.hadoop.conf.Configuration) State(org.apache.gobblin.configuration.State) BeforeClass(org.testng.annotations.BeforeClass)

Example 98 with BeforeClass

use of org.testng.annotations.BeforeClass in project incubator-gobblin by apache.

the class HiveSourceTest method setup.

@BeforeClass
public void setup() throws Exception {
    this.hiveMetastoreTestUtils = LocalHiveMetastoreTestUtils.getInstance();
    this.hiveSource = new HiveSource();
}
Also used : HiveSource(org.apache.gobblin.data.management.conversion.hive.source.HiveSource) BeforeClass(org.testng.annotations.BeforeClass)

Example 99 with BeforeClass

use of org.testng.annotations.BeforeClass in project incubator-gobblin by apache.

the class FileAwareInputStreamDataWriterTest method setup.

@BeforeClass
public void setup() throws Exception {
    fs = FileSystem.getLocal(new Configuration());
    testTempPath = new Path(Files.createTempDir().getAbsolutePath(), "InputStreamDataWriterTest");
    fs.mkdirs(testTempPath);
}
Also used : Path(org.apache.hadoop.fs.Path) Configuration(org.apache.hadoop.conf.Configuration) CopyConfiguration(org.apache.gobblin.data.management.copy.CopyConfiguration) BeforeClass(org.testng.annotations.BeforeClass)

Example 100 with BeforeClass

use of org.testng.annotations.BeforeClass in project incubator-gobblin by apache.

the class TarArchiveInputStreamDataWriterTest method setup.

@BeforeClass
public void setup() throws Exception {
    fs = FileSystem.getLocal(new Configuration());
    testTempPath = new Path(Files.createTempDir().getAbsolutePath(), "tarArchiveInputStreamDataWriterTest");
    fs.mkdirs(testTempPath);
}
Also used : Path(org.apache.hadoop.fs.Path) Configuration(org.apache.hadoop.conf.Configuration) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

BeforeClass (org.testng.annotations.BeforeClass)1186 Series (com.axibase.tsd.api.model.series.Series)178 File (java.io.File)157 ArrayList (java.util.ArrayList)78 HashMap (java.util.HashMap)43 ClusterControllerManager (org.apache.helix.integration.manager.ClusterControllerManager)37 Injector (com.google.inject.Injector)36 Properties (java.util.Properties)35 Path (org.apache.hadoop.fs.Path)33 ClusterSetup (org.apache.helix.tools.ClusterSetup)33 Configuration (org.apache.hadoop.conf.Configuration)31 BigDecimal (java.math.BigDecimal)29 URL (java.net.URL)28 MockParticipantManager (org.apache.helix.integration.manager.MockParticipantManager)27 Date (java.util.Date)26 Server (org.eclipse.jetty.server.Server)25 ServerConnector (org.eclipse.jetty.server.ServerConnector)25 ODatabaseDocumentTx (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)23 IOException (java.io.IOException)23 Path (java.nio.file.Path)23