You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Dino Keco (Created) (JIRA)" <ji...@apache.org> on 2011/10/11 22:19:11 UTC

[jira] [Created] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

HBaseStore initialization of table without configuration in constructor will throw Exception
--------------------------------------------------------------------------------------------

                 Key: GORA-48
                 URL: https://issues.apache.org/jira/browse/GORA-48
             Project: Gora
          Issue Type: Bug
          Components: storage-hbase
            Reporter: Dino Keco


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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Ferdy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferdy updated GORA-48:
----------------------

    Attachment: GORA-48.patch
                GORA-48.patch

Very trivial (one-liner) change. Could anyone commit this?

Thanks.
                
> HBaseStore initialization of table without configuration in constructor will throw Exception
> --------------------------------------------------------------------------------------------
>
>                 Key: GORA-48
>                 URL: https://issues.apache.org/jira/browse/GORA-48
>             Project: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>         Attachments: GORA-48.patch, 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Dino Keco (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dino Keco closed GORA-48.
-------------------------


I have tested this issue and now it is working fine. Thanks Lewis
                
> HBaseStore initialization of table without configuration in constructor will throw Exception
> --------------------------------------------------------------------------------------------
>
>                 Key: GORA-48
>                 URL: https://issues.apache.org/jira/browse/GORA-48
>             Project: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>             Fix For: 0.2-incubating
>
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13136778#comment-13136778 ] 

Hudson commented on GORA-48:
----------------------------

Integrated in gora-trunk-ant #13 (See [https://builds.apache.org/job/gora-trunk-ant/13/])
    Commit to address GORA-48 and update to changes.txt

lewismc : http://svn.apache.org/viewvc/incubator/gora/trunk/viewvc/?view=rev&root=&revision=1189108
Files : 
* /incubator/gora/trunk/CHANGES.txt
* /incubator/gora/trunk/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: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>             Fix For: 0.2-incubating
>
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13136792#comment-13136792 ] 

Hudson commented on GORA-48:
----------------------------

Integrated in gora-trunk #20 (See [https://builds.apache.org/job/gora-trunk/20/])
    Commit to address GORA-48 and update to changes.txt

lewismc : http://svn.apache.org/viewvc/incubator/gora/trunk/viewvc/?view=rev&root=&revision=1189108
Files : 
* /incubator/gora/trunk/CHANGES.txt
* /incubator/gora/trunk/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: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>             Fix For: 0.2-incubating
>
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Ferdy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferdy updated GORA-48:
----------------------

    Attachment:     (was: GORA-48.patch)
    
> HBaseStore initialization of table without configuration in constructor will throw Exception
> --------------------------------------------------------------------------------------------
>
>                 Key: GORA-48
>                 URL: https://issues.apache.org/jira/browse/GORA-48
>             Project: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Ferdy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133934#comment-13133934 ] 

Ferdy commented on GORA-48:
---------------------------

I totally agree. Creating HTable instances with configuration is the recommended way. If it's fine with you I will be creating a patch for this issue as I'm working on HBaseStore anyway.
                
> HBaseStore initialization of table without configuration in constructor will throw Exception
> --------------------------------------------------------------------------------------------
>
>                 Key: GORA-48
>                 URL: https://issues.apache.org/jira/browse/GORA-48
>             Project: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Lewis John McGibbney (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney resolved GORA-48.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.2-incubating

committed @ revision 1189108 in Gora trunk

Up to Dino to check and close out, thanks Ferdy for submitting the patch.
                
> HBaseStore initialization of table without configuration in constructor will throw Exception
> --------------------------------------------------------------------------------------------
>
>                 Key: GORA-48
>                 URL: https://issues.apache.org/jira/browse/GORA-48
>             Project: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>             Fix For: 0.2-incubating
>
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Ferdy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135836#comment-13135836 ] 

Ferdy commented on GORA-48:
---------------------------

I'm having a terrible time trying to run the tests in the provided testing structure of Gora (ant/maven) therefore I'm running the tests completely isolated. I will do this until the current flaws are smoothed out (as you know this is still in progress). Let me explain my test method:
-Compile gora-hbase from trunk using ant target.
-Put its dependencies (gora-hbase/lib) in a new project
-Copy raw java source files from gora-hbase/src in this project
-Add a mapping file
-Apply changes (in this case just a one-line no-brainer)
-Run a basic store test (actually using a testSinglethreaded variant of the recently modified TestGoraStorage in Nutch). This test sets up a mini hbase environment and tests the store.
-Profit!

Here's my ouput:
http://pastebin.com/jvjTi72U
                
> HBaseStore initialization of table without configuration in constructor will throw Exception
> --------------------------------------------------------------------------------------------
>
>                 Key: GORA-48
>                 URL: https://issues.apache.org/jira/browse/GORA-48
>             Project: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GORA-48) HBaseStore initialization of table without configuration in constructor will throw Exception

Posted by "Lewis John McGibbney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135814#comment-13135814 ] 

Lewis John McGibbney commented on GORA-48:
------------------------------------------

Is anyone else using Gora on HBase and can test this? I am happy to commit (further to following comments), however I don't have a running HBase instance atm to test myself. If you can provide some logs Ferdy which shows that the connection is accepted, then I will commit today. Thank you
                
> HBaseStore initialization of table without configuration in constructor will throw Exception
> --------------------------------------------------------------------------------------------
>
>                 Key: GORA-48
>                 URL: https://issues.apache.org/jira/browse/GORA-48
>             Project: Gora
>          Issue Type: Bug
>          Components: storage-hbase
>            Reporter: Dino Keco
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira