gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry Papaxenopoulos <hpapa...@gmail.com>
Subject HBaseStore configuration-based schemaName
Date Fri, 05 Jun 2015 12:13:07 GMT

I'm working on a hadoop project that uses HBaseStore as a backend and need
to use a different table per DataStore object on every hadoop run. To
achieve this I need to alter my hadoop configuration on every run, but
unfortunately it seems that for this use case, there is only one
configuration variable for all tables 'preferred.schema.name'. To alleviate
this I had to extend from HBaseStore and override 'getSchemaName(args)' as

protected String getSchemaName(String mappingSchemaName, Class<?>
persistentClass) {

    String fullKey = "preferred." +
                    + "." + DataStoreFactory.SCHEMA_NAME;

    String confSchemaName = getOrCreateConf().get(fullKey);

    if (confSchemaName != null) {
        LOG.info("Preferred schema for " + persistentClass + ": "
                + confSchemaName);

        return confSchemaName;

    return super.getSchemaName(mappingSchemaName, persistentClass);

I'm thinking it would probably be best if it was incorporated into
HBaseStore instead. Thoughts?


Harry Papaxenopoulos

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message