You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2013/07/01 07:06:28 UTC
[jira] [Commented] (GORA-48) HBaseStore initialization of table
without configuration in constructor will throw Exception
[ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13696481#comment-13696481 ]
Hudson commented on GORA-48:
----------------------------
Integrated in goraOracle #6 (See [https://builds.apache.org/job/goraOracle/6/])
Commit to address GORA-48 and update to changes.txt (Revision 7ed697bb7c6d4c57d70993963c3996e112eac296)
Result = FAILURE
lewismc :
Files :
* CHANGES.txt
* gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java
> HBaseStore initialization of table without configuration in constructor will throw Exception
> --------------------------------------------------------------------------------------------
>
> Key: GORA-48
> URL: https://issues.apache.org/jira/browse/GORA-48
> Project: Apache Gora
> Issue Type: Bug
> Components: gora-hbase
> Reporter: Dino Keco
> Fix For: 0.2
>
> Attachments: GORA-48.patch
>
>
> Initialize method from HBaseStorage
> public void initialize(Class<K> keyClass, Class<T> persistentClass,
> Properties properties) throws IOException {
> super.initialize(keyClass, persistentClass, properties);
> this.conf = HBaseConfiguration.create(getConf());
> admin = new HBaseAdmin(this.conf);
> try {
> mapping = readMapping(getConf().get(PARSE_MAPPING_FILE_KEY, DEFAULT_MAPPING_FILE));
> } catch (FileNotFoundException ex) {
> try {
> mapping = readMapping(getConf().get(PARSE_MAPPING_FILE_KEY, DEPRECATED_MAPPING_FILE));
> log.warn(DEPRECATED_MAPPING_FILE + " is deprecated, please rename the file to "
> + DEFAULT_MAPPING_FILE);
> } catch (FileNotFoundException ex1) {
> throw ex; //throw the original exception
> } catch (Exception ex1) {
> log.warn(DEPRECATED_MAPPING_FILE + " is deprecated, please rename the file to "
> + DEFAULT_MAPPING_FILE);
> throw new RuntimeException(ex1);
> }
> } catch (Exception e) {
> throw new RuntimeException(e);
> }
> if(autoCreateSchema) {
> createSchema();
> }
> table = new HTable(mapping.getTableName());
> }
> is creating HTable without configuration parameter which is causing this error:
> java.net.ConnectException: Connection refused: no further information
> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
> at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
> 11/10/11 16:22:33 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181
> In my opinion HTable should be created using this code:
> table = new HTable(conf, mapping.getTableName());
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira