由于zookeeper问题,无法在hbase中创建表

zzzyeukh  于 2021-06-08  发布在  Hbase
关注(0)|答案(0)|浏览(368)

我试图用address和order列族创建“customer”表,但出现以下错误
命令是:

hbase(main):003:0> create 'customer', 'address', 'order'

错误:

ERROR: Can't get master address from ZooKeeper; znode data == null

        Creates a table. Pass a table name, and a set of column family
        specifications (at least one), and, optionally, table configuration.
        Column specification can be a simple string (name), or a dictionary
        (dictionaries are described below in main help output), necessarily 
        including NAME attribute. 
        Examples:

        Create a table with namespace=ns1 and table qualifier=t1
          hbase> create 'ns1:t1', {NAME => 'f1', VERSIONS => 5}

        Create a table with namespace=default and table qualifier=t1
          hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
          hbase> # The above in shorthand would be the following:
          hbase> create 't1', 'f1', 'f2', 'f3'
          hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
          hbase> create 't1', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles' => '10'}}
          hbase> create 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 1000000, MOB_COMPACT_PARTITION_POLICY => 'weekly'}

        Table configuration options can be put at the end.
        Examples:

          hbase> create 'ns1:t1', 'f1', SPLITS => ['10', '20', '30', '40']
          hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40']
          hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'
          hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' => 'myvalue' }
          hbase> # Optionally pre-split the table into NUMREGIONS, using
          hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
          hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
          hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit', REGION_REPLICATION => 2, CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}
          hbase> create 't1', {NAME => 'f1', DFS_REPLICATION => 1}

        You can also keep around a reference to the created table:

          hbase> t1 = create 't1', 'f1'

        Which gives you a reference to the table named 't1', on which you can then
        call methods.

        hbase(main):004:0> list
        TABLE                                                                   

        ERROR: Can't get master address from ZooKeeper; znode data == null

        List all tables in hbase. Optional regular expression parameter could
        be used to filter the output. Examples:

          hbase> list
          hbase> list 'abc.*'
          hbase> list 'ns:abc.*'
          hbase> list 'ns:.*'

得到这个错误后。。。我运行了下面的命令来检查hbase服务状态
命令是:

[cloudera@quickstart ~]$ service --status-all

错误-

> abrt-ccpp hook is installed abrtd (pid  5220) is running...
> abrt-dump-oops is stopped acpid (pid  4508) is running... atd (pid 
> 8186) is running... auditd (pid  4351) is running...
> 
> if [ "$1" == "start" ] ; then
>     if [ "${EC2}" == 'true' ]; then
>         FIRST_BOOT_FLAG=/var/lib/cloudera-quickstart/.ec2-key-installed
>         if [ ! -f "${FIRST_BOOT_FLAG}" ]; then
>             METADATA_API=http://169.254.169.254/latest/meta-data
>             KEY_URL=${METADATA_API}/public-keys/0/openssh-key
>             SSH_DIR=/home/cloudera/.ssh
>             mkdir -p ${SSH_DIR}
>             chown cloudera:cloudera ${SSH_DIR}
>             curl ${KEY_URL} >> ${SSH_DIR}/authorized_keys
>             touch ${FIRST_BOOT_FLAG}
>         fi
>     fi
>     if [ "${DOCKER}" != 'true' ]; then
>         if [ -f /sys/kernel/mm/redhat_transparent_hugepage/defrag ]; then
>             echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
>         fi
> 
>         cloudera-quickstart-ip
>         HOSTNAME=quickstart.cloudera
>         hostname ${HOSTNAME}
>         sed -i -e "s/HOSTNAME=.*/HOSTNAME=${HOSTNAME}/" /etc/sysconfig/network
>     fi
> 
>     (
>         cd /var/lib/cloudera-quickstart/tutorial;
>         nohup python -m SimpleHTTPServer 80 &
>     )
> 
>     # TODO: check for expired CM license and update config.js accordingly fi
> + '[' status == start ']'
> 
> By default, the Cloudera QuickStart VM run Cloudera's Distribution
> including Apache Hadoop (CDH) under Linux's service and configuration
> management. If you wish to migrate to Cloudera Manager, you must run
> one of the following commands.
> 
> To use Cloudera Express (free), run:
> 
>     sudo /home/cloudera/cloudera-manager --express
> 
> This requires at least 8 GB of RAM and at least 2 virtual CPUs.
> 
> To begin a 60-day trial of Cloudera Enterprise with advanced
> management features, run:
> 
>     sudo /home/cloudera/cloudera-manager --enterprise
> 
> This requires at least 10 GB or RAM and at least 2 virtual CPUs.
> 
> Be aware that after rebooting, it may take several minutes before
> Cloudera Manager has started all of the services it manages and is
> ready to accept connections from clients. By default, the Cloudera
> QuickStart VM run Cloudera's Distribution including Apache Hadoop
> (CDH) under Linux's service and configuration management. If you wish
> to migrate to Cloudera Manager, you must run one of the following
> commands.
> 
> To use Cloudera Express (free), run:
> 
>     sudo /home/cloudera/cloudera-manager --express
> 
> This requires at least 8 GB of RAM and at least 2 virtual CPUs.
> 
> To begin a 60-day trial of Cloudera Enterprise with advanced
> management features, run:
> 
>     sudo /home/cloudera/cloudera-manager --enterprise
> 
> This requires at least 10 GB or RAM and at least 2 virtual CPUs.
> 
> Be aware that after rebooting, it may take several minutes before
> Cloudera Manager has started all of the services it manages and is
> ready to accept connections from clients. cpuspeed is stopped crond
> (pid  7327) is running... Usage: /etc/init.d/dkms_autoinstaller
> {start|stop} dnsmasq is stopped Flume NG agent is running             
> [  OK  ] Hadoop datanode is running                                 [ 
> OK  ] Hadoop journalnode is running                              [  OK
> ] Hadoop namenode is running                                 [  OK  ]
> Hadoop secondarynamenode is running                        [  OK  ]
> Hadoop httpfs is running                                   [  OK  ]
> Hadoop historyserver is running                            [  OK  ]
> Hadoop nodemanager is running                              [  OK  ]
> Hadoop proxyserver is dead and pid file exists             [FAILED]
> Hadoop resourcemanager is running                          [  OK  ]
> hald (pid  4526) is running... HBase master daemon is not running     
> [FAILED] hbase-regionserver is not running. HBase rest daemon is
> running                               [  OK  ] HBase Solr Indexer is
> not running                          [FAILED] HBase thrift daemon is
> running                             [  OK  ] Hive Metastore is running
> [  OK  ] Hive Server2 is running                                    [ 
> OK  ] htcacheclean is stopped httpd status unknown due to insufficient
> privileges. supervisor (pid  7405) is running... Impala Catalog Server
> is running                           [  OK  ] Impala Server is running
> [  OK  ] Impala State Store Server is running                       [ 
> OK  ] ip6tables: Only usable by root.                           
> [WARNING] iptables: Only usable by root.                            
> [WARNING] /etc/init.d/kdump: line 47: /var/lock/kdump: Permission
> denied lvmetad is stopped dmeventd is stopped mdmonitor status unknown
> due to insufficient privileges. messagebus (pid  4454) is running...
> mysqld (pid  12463) is running... netconsole module not loaded
> Configured devices: lo eth0 Currently active devices: lo eth0
> NetworkManager (pid  4467) is running... grep: /proc/fs/nfsd/portlist:
> No such file or directory ntpd (pid  4840) is running... running
> master status unknown due to insufficient privileges. pppoe-server is
> stopped Process accounting is disabled. quota_nld is stopped rdisc is
> stopped Low level hardware support loaded:    none found
> 
> Upper layer protocol modules:     none found
> 
> User space access modules:    none found
> 
> Connection management modules:    none found
> 
> rngd is stopped rpcbind (pid  4431) is running... rsyslogd status
> unknown due to insufficient privileges. sandbox is stopped saslauthd
> is stopped Sentry DB Store Service is dead and pid file exists       
> [FAILED] smartd is stopped Solr server daemon is running              
> [  OK  ] Spark history-server is running                            [ 
> OK  ] Sqoop Server is running                                    [  OK
> ] sqoop-metastore is not running. /etc/init.d/sshd: line 33:
> /etc/sysconfig/sshd: Permission denied openssh-daemon (pid  4826) is
> running... The VirtualBox Additions are currently running. Checking
> for VBoxService ...running winbindd is stopped wpa_supplicant (pid 
> 4525) is running... zookeeper-server is running

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题