Search in sources :

Example 1 with TestHDFSParquetImporter

use of org.apache.hudi.utilities.functional.TestHDFSParquetImporter in project hudi by apache.

the class ITTestHDFSParquetImportCommand method init.

@BeforeEach
public void init() throws IOException, ParseException {
    tableName = "test_table";
    tablePath = basePath + Path.SEPARATOR + tableName;
    sourcePath = new Path(basePath, "source");
    targetPath = new Path(tablePath);
    schemaFile = new Path(basePath, "file.schema").toString();
    // create schema file
    try (FSDataOutputStream schemaFileOS = fs.create(new Path(schemaFile))) {
        schemaFileOS.write(HoodieTestDataGenerator.TRIP_EXAMPLE_SCHEMA.getBytes());
    }
    importer = new TestHDFSParquetImporter();
    insertData = importer.createInsertRecords(sourcePath);
}
Also used : Path(org.apache.hadoop.fs.Path) TestHDFSParquetImporter(org.apache.hudi.utilities.functional.TestHDFSParquetImporter) FSDataOutputStream(org.apache.hadoop.fs.FSDataOutputStream) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

FSDataOutputStream (org.apache.hadoop.fs.FSDataOutputStream)1 Path (org.apache.hadoop.fs.Path)1 TestHDFSParquetImporter (org.apache.hudi.utilities.functional.TestHDFSParquetImporter)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1