FAQ
Hi,

I am working on CDH4 install. We do not have a MySQL or a PostGreSQL to
work with Hive. How can I allow multiple users to share the same space in
derby db?

I have tried giving 777 permission along with deleting the 2 lock files as
below but that does not work for me.
dbex.lck
db.lck

I get these errors:
hive> show tables;
FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot get
a connection, pool error Could not create a validated object, cause: A
read-only user or a user in a read-only database is not permitted to
disable read-only mode on a connection.
NestedThrowables:
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
error Could not create a validated object, cause: A read-only user or a
user in a read-only database is not permitted to disable read-only mode on
a connection.
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask
hive>
----------------------------------------------------------------------
And this error when the db is held under another id:

FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed to
start database '/cmls/hive/metastore/metastore_db', see the next exception
for details.
NestedThrowables:
java.sql.SQLException: Failed to start database
'/cmls/hive/metastore/metastore_db', see the next exception for details.
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask


Can you please share how you did it?

Thanks,
Sumit.

--

Search Discussions

  • Sumit Ghosh at Mar 7, 2013 at 7:21 am
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user.name}_db to
    /usr/lib/hive/metastore/metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh wrote:

    Hi,

    I am working on CDH4 install. We do not have a MySQL or a PostGreSQL to
    work with Hive. How can I allow multiple users to share the same space in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock files as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot
    get a connection, pool error Could not create a validated object, cause: A
    read-only user or a user in a read-only database is not permitted to
    disable read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
    error Could not create a validated object, cause: A read-only user or a
    user in a read-only database is not permitted to disable read-only mode on
    a connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask
    hive>
    ----------------------------------------------------------------------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed to
    start database '/cmls/hive/metastore/metastore_db', see the next exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/metastore_db', see the next exception for details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --
  • Harsh J at Mar 7, 2013 at 7:49 am
    Derby does not support multiple users using the same DB. It cannot be
    done. Users can each use their own derby DB but will not be able to
    see each other's definitions.

    I'd recommend either moving over to either a proper DB, running a
    metastore or HiveServer2 service serving over the derby DB; with the
    recommendation being the former (proper DB) foremost.
    On Thu, Mar 7, 2013 at 12:50 PM, Sumit Ghosh wrote:
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user.name}_db to
    /usr/lib/hive/metastore/metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh wrote:

    Hi,

    I am working on CDH4 install. We do not have a MySQL or a PostGreSQL to
    work with Hive. How can I allow multiple users to share the same space in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock files as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot
    get a connection, pool error Could not create a validated object, cause: A
    read-only user or a user in a read-only database is not permitted to disable
    read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
    error Could not create a validated object, cause: A read-only user or a user
    in a read-only database is not permitted to disable read-only mode on a
    connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask
    hive>
    ----------------------------------------------------------------------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed to
    start database '/cmls/hive/metastore/metastore_db', see the next exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/metastore_db', see the next exception for details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --



    --
    Harsh J

    --
  • Sumit Ghosh at Mar 7, 2013 at 8:02 am
    Hi Harsh,

    I tries starting the HiveServer2 and the HiveMetastore services. But I was
    still getting errors. Do you have the installation steps.

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:48 PM, Harsh J wrote:

    Derby does not support multiple users using the same DB. It cannot be
    done. Users can each use their own derby DB but will not be able to
    see each other's definitions.

    I'd recommend either moving over to either a proper DB, running a
    metastore or HiveServer2 service serving over the derby DB; with the
    recommendation being the former (proper DB) foremost.
    On Thu, Mar 7, 2013 at 12:50 PM, Sumit Ghosh wrote:
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user.name}_db to
    /usr/lib/hive/metastore/metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh wrote:

    Hi,

    I am working on CDH4 install. We do not have a MySQL or a PostGreSQL to
    work with Hive. How can I allow multiple users to share the same space
    in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock files
    as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot
    get a connection, pool error Could not create a validated object,
    cause: A
    read-only user or a user in a read-only database is not permitted to
    disable
    read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
    pool
    error Could not create a validated object, cause: A read-only user or a
    user
    in a read-only database is not permitted to disable read-only mode on a
    connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask
    hive>
    ----------------------------------------------------------------------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed
    to
    start database '/cmls/hive/metastore/metastore_db', see the next
    exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/metastore_db', see the next exception for details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --



    --
    Harsh J

    --


    --
  • Sumit Ghosh at Mar 7, 2013 at 8:31 am
    Hi Harsh,

    Do you mean these steps:
    https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringHiveServer2

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:02 AM, Sumit Ghosh wrote:

    Hi Harsh,

    I tries starting the HiveServer2 and the HiveMetastore services. But I was
    still getting errors. Do you have the installation steps.

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:48 PM, Harsh J wrote:

    Derby does not support multiple users using the same DB. It cannot be
    done. Users can each use their own derby DB but will not be able to
    see each other's definitions.

    I'd recommend either moving over to either a proper DB, running a
    metastore or HiveServer2 service serving over the derby DB; with the
    recommendation being the former (proper DB) foremost.

    On Thu, Mar 7, 2013 at 12:50 PM, Sumit Ghosh <sumit.ghosh@gmail.com>
    wrote:
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user.name}_db to
    /usr/lib/hive/metastore/metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit


    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh <sumit.ghosh@gmail.com>
    wrote:
    Hi,

    I am working on CDH4 install. We do not have a MySQL or a PostGreSQL to
    work with Hive. How can I allow multiple users to share the same space
    in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock
    files as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot
    get a connection, pool error Could not create a validated object,
    cause: A
    read-only user or a user in a read-only database is not permitted to
    disable
    read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
    pool
    error Could not create a validated object, cause: A read-only user or
    a user
    in a read-only database is not permitted to disable read-only mode on a
    connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask
    hive>
    ----------------------------------------------------------------------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException:
    Failed to
    start database '/cmls/hive/metastore/metastore_db', see the next
    exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/metastore_db', see the next exception for
    details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --



    --
    Harsh J

    --


    --
  • Sumit Ghosh at Mar 7, 2013 at 11:03 pm
    Hi,

    Tried this link however could not get it to work.

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:31 AM, Sumit Ghosh wrote:

    Hi Harsh,

    Do you mean these steps:

    https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringHiveServer2

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:02 AM, Sumit Ghosh wrote:

    Hi Harsh,

    I tries starting the HiveServer2 and the HiveMetastore services. But I
    was still getting errors. Do you have the installation steps.

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:48 PM, Harsh J wrote:

    Derby does not support multiple users using the same DB. It cannot be
    done. Users can each use their own derby DB but will not be able to
    see each other's definitions.

    I'd recommend either moving over to either a proper DB, running a
    metastore or HiveServer2 service serving over the derby DB; with the
    recommendation being the former (proper DB) foremost.

    On Thu, Mar 7, 2013 at 12:50 PM, Sumit Ghosh <sumit.ghosh@gmail.com>
    wrote:
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user.name}_db to
    /usr/lib/hive/metastore/metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit


    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh <sumit.ghosh@gmail.com>
    wrote:
    Hi,

    I am working on CDH4 install. We do not have a MySQL or a PostGreSQL
    to
    work with Hive. How can I allow multiple users to share the same
    space in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock
    files as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException:
    Cannot
    get a connection, pool error Could not create a validated object,
    cause: A
    read-only user or a user in a read-only database is not permitted to
    disable
    read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
    pool
    error Could not create a validated object, cause: A read-only user or
    a user
    in a read-only database is not permitted to disable read-only mode on
    a
    connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask
    hive>
    ----------------------------------------------------------------------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException:
    Failed to
    start database '/cmls/hive/metastore/metastore_db', see the next
    exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/metastore_db', see the next exception for
    details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --



    --
    Harsh J

    --


    --
  • Prasad Mujumdar at Mar 7, 2013 at 11:46 pm
    Hi Sumit,

    As Harsh suggested, you shouldn't be using derby for multiuser mode.
    Please try with MySQL or PostgreS. You can follow these MySQL install
    steps
    on https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringaremoteMySQLdatabasefortheHiveMetastore

    If you are running into errors with MySQL as well, could you please provide
    more details of the error ?


    thanks
    Prasad
    On Thursday, March 7, 2013 3:02:23 PM UTC-8, Sumit Ghosh wrote:

    Hi,

    Tried this link however could not get it to work.

    Have a great Day Ahead!
    Sumit


    On Thu, Mar 7, 2013 at 12:31 AM, Sumit Ghosh <sumit...@gmail.com<javascript:>
    wrote:
    Hi Harsh,

    Do you mean these steps:

    https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringHiveServer2

    Have a great Day Ahead!
    Sumit


    On Thu, Mar 7, 2013 at 12:02 AM, Sumit Ghosh <sumit...@gmail.com<javascript:>
    wrote:
    Hi Harsh,

    I tries starting the HiveServer2 and the HiveMetastore services. But I
    was still getting errors. Do you have the installation steps.

    Have a great Day Ahead!
    Sumit


    On Wed, Mar 6, 2013 at 11:48 PM, Harsh J <ha...@cloudera.com<javascript:>
    wrote:
    Derby does not support multiple users using the same DB. It cannot be
    done. Users can each use their own derby DB but will not be able to
    see each other's definitions.

    I'd recommend either moving over to either a proper DB, running a
    metastore or HiveServer2 service serving over the derby DB; with the
    recommendation being the former (proper DB) foremost.

    On Thu, Mar 7, 2013 at 12:50 PM, Sumit Ghosh <sumit...@gmail.com<javascript:>>
    wrote:
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user.name}_db to
    /usr/lib/hive/metastore/metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit


    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh <sumit...@gmail.com<javascript:>>
    wrote:
    Hi,

    I am working on CDH4 install. We do not have a MySQL or a PostGreSQL
    to
    work with Hive. How can I allow multiple users to share the same
    space in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock
    files as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException:
    Cannot
    get a connection, pool error Could not create a validated object,
    cause: A
    read-only user or a user in a read-only database is not permitted to
    disable
    read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
    pool
    error Could not create a validated object, cause: A read-only user
    or a user
    in a read-only database is not permitted to disable read-only mode
    on a
    connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask
    hive>
    ----------------------------------------------------------------------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException:
    Failed to
    start database '/cmls/hive/metastore/metastore_db', see the next
    exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/metastore_db', see the next exception for
    details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --



    --
    Harsh J

    --


    --
  • Sumit Ghosh at Mar 7, 2013 at 11:53 pm
    Hi Prasad,


    We do not have SQL or PostGreSQL and as of now we cannot install one.
    Without external DB and just using the HiveServer2/Hive-Metastore will not
    solve the problem?

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 3:46 PM, Prasad Mujumdar wrote:

    Hi Sumit,

    As Harsh suggested, you shouldn't be using derby for multiuser mode.
    Please try with MySQL or PostgreS. You can follow these MySQL install
    steps on
    https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringaremoteMySQLdatabasefortheHiveMetastore

    If you are running into errors with MySQL as well, could you please
    provide more details of the error ?


    thanks
    Prasad

    On Thursday, March 7, 2013 3:02:23 PM UTC-8, Sumit Ghosh wrote:

    Hi,

    Tried this link however could not get it to work.

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:31 AM, Sumit Ghosh wrote:

    Hi Harsh,

    Do you mean these steps:
    https://ccp.cloudera.com/**display/CDH4DOC/Hive+**
    Installation#HiveInstallation-**ConfiguringHiveServer2<https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringHiveServer2>

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:02 AM, Sumit Ghosh wrote:

    Hi Harsh,

    I tries starting the HiveServer2 and the HiveMetastore services. But I
    was still getting errors. Do you have the installation steps.

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:48 PM, Harsh J wrote:

    Derby does not support multiple users using the same DB. It cannot be
    done. Users can each use their own derby DB but will not be able to
    see each other's definitions.

    I'd recommend either moving over to either a proper DB, running a
    metastore or HiveServer2 service serving over the derby DB; with the
    recommendation being the former (proper DB) foremost.

    On Thu, Mar 7, 2013 at 12:50 PM, Sumit Ghosh <sumit...@gmail.com>
    wrote:
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user**.name <http://user.name>}_db to
    /usr/lib/hive/metastore/**metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit


    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh <sumit...@gmail.com>
    wrote:
    Hi,

    I am working on CDH4 install. We do not have a MySQL or a
    PostGreSQL to
    work with Hive. How can I allow multiple users to share the same
    space in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock
    files as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.**JDOFatalDataStoreException:
    Cannot
    get a connection, pool error Could not create a validated object,
    cause: A
    read-only user or a user in a read-only database is not permitted
    to disable
    read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.**SQLNestedException: Cannot get a
    connection, pool
    error Could not create a validated object, cause: A read-only user
    or a user
    in a read-only database is not permitted to disable read-only mode
    on a
    connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.**exec.DDLTask
    hive>
    ------------------------------**------------------------------**
    ----------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.**JDOFatalDataStoreException:
    Failed to
    start database '/cmls/hive/metastore/**metastore_db', see the next
    exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/**metastore_db', see the next exception for
    details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.**exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --



    --
    Harsh J

    --


    --

    --
  • Prasad Mujumdar at Mar 8, 2013 at 12:22 am
    Hi Sumit,

    unfortunately No. Both HiveServer2 and MetaStoreServer are
    multi-threaded server processes that require concurrent access to the
    external DB hosting the metadata.
    Note that these external DBs can be installed on the same physical box
    along with HiveServer2. If you absolutely can't connect to an external DB
    then I think the only option is to use multiple embedded derby DBs, one for
    each user. This will allow multiple users to run hive on single cluster,
    but they can NOT share the same schema. Each user will need its own schema
    definition.

    thanks
    Prasad

    On Thu, Mar 7, 2013 at 3:53 PM, Sumit Ghosh wrote:

    Hi Prasad,


    We do not have SQL or PostGreSQL and as of now we cannot install one.
    Without external DB and just using the HiveServer2/Hive-Metastore will not
    solve the problem?

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 3:46 PM, Prasad Mujumdar wrote:

    Hi Sumit,

    As Harsh suggested, you shouldn't be using derby for multiuser mode.
    Please try with MySQL or PostgreS. You can follow these MySQL install
    steps on
    https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringaremoteMySQLdatabasefortheHiveMetastore

    If you are running into errors with MySQL as well, could you please
    provide more details of the error ?


    thanks
    Prasad

    On Thursday, March 7, 2013 3:02:23 PM UTC-8, Sumit Ghosh wrote:

    Hi,

    Tried this link however could not get it to work.

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:31 AM, Sumit Ghosh wrote:

    Hi Harsh,

    Do you mean these steps:
    https://ccp.cloudera.com/**display/CDH4DOC/Hive+**
    Installation#HiveInstallation-**ConfiguringHiveServer2<https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringHiveServer2>

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:02 AM, Sumit Ghosh wrote:

    Hi Harsh,

    I tries starting the HiveServer2 and the HiveMetastore services. But I
    was still getting errors. Do you have the installation steps.

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:48 PM, Harsh J wrote:

    Derby does not support multiple users using the same DB. It cannot be
    done. Users can each use their own derby DB but will not be able to
    see each other's definitions.

    I'd recommend either moving over to either a proper DB, running a
    metastore or HiveServer2 service serving over the derby DB; with the
    recommendation being the former (proper DB) foremost.

    On Thu, Mar 7, 2013 at 12:50 PM, Sumit Ghosh <sumit...@gmail.com>
    wrote:
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user**.name <http://user.name>}_db to
    /usr/lib/hive/metastore/**metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit


    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh <sumit...@gmail.com>
    wrote:
    Hi,

    I am working on CDH4 install. We do not have a MySQL or a
    PostGreSQL to
    work with Hive. How can I allow multiple users to share the same
    space in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock
    files as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.**JDOFatalDataStoreException:
    Cannot
    get a connection, pool error Could not create a validated object,
    cause: A
    read-only user or a user in a read-only database is not permitted
    to disable
    read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.**SQLNestedException: Cannot get a
    connection, pool
    error Could not create a validated object, cause: A read-only user
    or a user
    in a read-only database is not permitted to disable read-only mode
    on a
    connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.**exec.DDLTask
    hive>
    ------------------------------**------------------------------**
    ----------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.**JDOFatalDataStoreException:
    Failed to
    start database '/cmls/hive/metastore/**metastore_db', see the
    next exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/**metastore_db', see the next exception for
    details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.**exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --



    --
    Harsh J

    --


    --

    --


    --
  • Sumit Ghosh at Mar 8, 2013 at 12:36 am
    Thanks a lot Prasad for the HiveServer and MetaStore concept. I have Derby
    setup as multiple embedded DB and looks like we have to live with the same
    for now.


    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 4:22 PM, Prasad Mujumdar wrote:

    Hi Sumit,

    unfortunately No. Both HiveServer2 and MetaStoreServer are
    multi-threaded server processes that require concurrent access to the
    external DB hosting the metadata.
    Note that these external DBs can be installed on the same physical box
    along with HiveServer2. If you absolutely can't connect to an external DB
    then I think the only option is to use multiple embedded derby DBs, one for
    each user. This will allow multiple users to run hive on single cluster,
    but they can NOT share the same schema. Each user will need its own schema
    definition.

    thanks
    Prasad

    On Thu, Mar 7, 2013 at 3:53 PM, Sumit Ghosh wrote:

    Hi Prasad,


    We do not have SQL or PostGreSQL and as of now we cannot install one.
    Without external DB and just using the HiveServer2/Hive-Metastore will not
    solve the problem?

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 3:46 PM, Prasad Mujumdar wrote:

    Hi Sumit,

    As Harsh suggested, you shouldn't be using derby for multiuser mode.
    Please try with MySQL or PostgreS. You can follow these MySQL install
    steps on
    https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringaremoteMySQLdatabasefortheHiveMetastore

    If you are running into errors with MySQL as well, could you please
    provide more details of the error ?


    thanks
    Prasad

    On Thursday, March 7, 2013 3:02:23 PM UTC-8, Sumit Ghosh wrote:

    Hi,

    Tried this link however could not get it to work.

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:31 AM, Sumit Ghosh wrote:

    Hi Harsh,

    Do you mean these steps:
    https://ccp.cloudera.com/**display/CDH4DOC/Hive+**
    Installation#HiveInstallation-**ConfiguringHiveServer2<https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-ConfiguringHiveServer2>

    Have a great Day Ahead!
    Sumit

    On Thu, Mar 7, 2013 at 12:02 AM, Sumit Ghosh wrote:

    Hi Harsh,

    I tries starting the HiveServer2 and the HiveMetastore services. But
    I was still getting errors. Do you have the installation steps.

    Have a great Day Ahead!
    Sumit

    On Wed, Mar 6, 2013 at 11:48 PM, Harsh J wrote:

    Derby does not support multiple users using the same DB. It cannot
    be
    done. Users can each use their own derby DB but will not be able to
    see each other's definitions.

    I'd recommend either moving over to either a proper DB, running a
    metastore or HiveServer2 service serving over the derby DB; with the
    recommendation being the former (proper DB) foremost.

    On Thu, Mar 7, 2013 at 12:50 PM, Sumit Ghosh <sumit...@gmail.com>
    wrote:
    More over in CDH3 it says

    The name of the default Derby database changed in CDH3 Production. If you
    used the default Derby database configuration in a previous
    release of CDH,
    you will need to change the name of the Derby database directory from
    /usr/lib/hive/metastore/${user**.name <http://user.name>}_db to
    /usr/lib/hive/metastore/**metastore_db.

    How can multiple users share the DB in derby?

    Have a great Day Ahead!
    Sumit


    On Wed, Mar 6, 2013 at 11:18 PM, Sumit Ghosh <sumit...@gmail.com>
    wrote:
    Hi,

    I am working on CDH4 install. We do not have a MySQL or a
    PostGreSQL to
    work with Hive. How can I allow multiple users to share the same
    space in
    derby db?

    I have tried giving 777 permission along with deleting the 2 lock
    files as
    below but that does not work for me.
    dbex.lck
    db.lck

    I get these errors:
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.**JDOFatalDataStoreException:
    Cannot
    get a connection, pool error Could not create a validated object,
    cause: A
    read-only user or a user in a read-only database is not permitted
    to disable
    read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.**SQLNestedException: Cannot get a
    connection, pool
    error Could not create a validated object, cause: A read-only
    user or a user
    in a read-only database is not permitted to disable read-only
    mode on a
    connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.**exec.DDLTask
    hive>
    ------------------------------**------------------------------**
    ----------
    And this error when the db is held under another id:

    FAILED: Error in metadata: javax.jdo.**JDOFatalDataStoreException:
    Failed to
    start database '/cmls/hive/metastore/**metastore_db', see the
    next exception
    for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database
    '/cmls/hive/metastore/**metastore_db', see the next exception
    for details.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.**exec.DDLTask


    Can you please share how you did it?

    Thanks,
    Sumit.

    --


    --



    --
    Harsh J

    --


    --

    --


    --


    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcdh-user @
categorieshadoop
postedMar 7, '13 at 7:18a
activeMar 8, '13 at 12:36a
posts10
users3
websitecloudera.com
irc#hadoop

People

Translate

site design / logo © 2019 Grokbase