Search in sources :

Example 1 with FilebasedSchemaProvider

use of org.apache.hudi.utilities.schema.FilebasedSchemaProvider in project hudi by apache.

the class TestJsonKafkaSource method init.

@BeforeEach
public void init() throws Exception {
    String schemaFilePath = Objects.requireNonNull(SCHEMA_FILE_URL).toURI().getPath();
    TypedProperties props = new TypedProperties();
    props.put("hoodie.deltastreamer.schemaprovider.source.schema.file", schemaFilePath);
    schemaProvider = new FilebasedSchemaProvider(props, jsc());
}
Also used : TypedProperties(org.apache.hudi.common.config.TypedProperties) FilebasedSchemaProvider(org.apache.hudi.utilities.schema.FilebasedSchemaProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with FilebasedSchemaProvider

use of org.apache.hudi.utilities.schema.FilebasedSchemaProvider in project hudi by apache.

the class TestDFSHoodieTestSuiteWriterAdapter method setup.

@BeforeEach
public void setup() throws Exception {
    super.setup();
    schemaProvider = new FilebasedSchemaProvider(Helpers.setupSchemaOnDFSWithAbsoluteScope(System.getProperty("user.dir") + "/.." + COMPLEX_SOURCE_SCHEMA_DOCKER_DEMO_RELATIVE_PATH, "complex-source.avsc"), jsc);
}
Also used : FilebasedSchemaProvider(org.apache.hudi.utilities.schema.FilebasedSchemaProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with FilebasedSchemaProvider

use of org.apache.hudi.utilities.schema.FilebasedSchemaProvider in project hudi by apache.

the class TestSqlSource method setup.

@BeforeEach
public void setup() throws Exception {
    dfsRoot = UtilitiesTestBase.dfsBasePath + "/parquetFiles";
    UtilitiesTestBase.dfs.mkdirs(new Path(dfsRoot));
    props = new TypedProperties();
    super.setup();
    schemaProvider = new FilebasedSchemaProvider(Helpers.setupSchemaOnDFS(), jsc);
    // Produce new data, extract new data
    generateTestTable("1", "001", 10000);
}
Also used : Path(org.apache.hadoop.fs.Path) TypedProperties(org.apache.hudi.common.config.TypedProperties) FilebasedSchemaProvider(org.apache.hudi.utilities.schema.FilebasedSchemaProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 4 with FilebasedSchemaProvider

use of org.apache.hudi.utilities.schema.FilebasedSchemaProvider in project hudi by apache.

the class AbstractCloudObjectsSourceTestBase method setup.

@BeforeEach
public void setup() throws Exception {
    super.setup();
    schemaProvider = new FilebasedSchemaProvider(Helpers.setupSchemaOnDFS(), jsc);
    MockitoAnnotations.initMocks(this);
}
Also used : FilebasedSchemaProvider(org.apache.hudi.utilities.schema.FilebasedSchemaProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 5 with FilebasedSchemaProvider

use of org.apache.hudi.utilities.schema.FilebasedSchemaProvider in project hudi by apache.

the class AbstractDFSSourceTestBase method setup.

@BeforeEach
public void setup() throws Exception {
    super.setup();
    schemaProvider = new FilebasedSchemaProvider(Helpers.setupSchemaOnDFS(), jsc);
}
Also used : FilebasedSchemaProvider(org.apache.hudi.utilities.schema.FilebasedSchemaProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

FilebasedSchemaProvider (org.apache.hudi.utilities.schema.FilebasedSchemaProvider)7 BeforeEach (org.junit.jupiter.api.BeforeEach)7 TypedProperties (org.apache.hudi.common.config.TypedProperties)2 Path (org.apache.hadoop.fs.Path)1