use of org.apache.asterix.tools.translator.ADGenDmlTranslator in project asterixdb by apache.
the class AdmDataGen method init.
public void init() throws IOException, ParseException, AsterixException, ACIDException, MetadataException, AlgebricksException {
FileReader aql = new FileReader(schemaFile);
IParser parser = parserFactory.createParser(aql);
List<Statement> statements = parser.parse();
aql.close();
// TODO: Need to fix how to use transactions here.
MetadataTransactionContext mdTxnCtx = new MetadataTransactionContext(new JobId(-1));
ADGenDmlTranslator dmlt = new ADGenDmlTranslator(mdTxnCtx, statements);
dmlt.translate();
typeMap = dmlt.getTypeMap();
typeAnnotMap = dmlt.getTypeDataGenMap();
dgCtx = new DataGeneratorContext();
}
Aggregations