메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


./schematool -initSchema -dbType derby 를 실행해준다.

(-dbType은  derby|mysql|postgres|oracle중에 하나를 지정해준다.)


schematool실행시 오류가 발생하여 다시 schematool -initSchema를 실행할때 "Error: FUNCTION 'NUCLEUS_ASCII' already exists. (state=X0Y68,code=30000)"오류가 발생하는데 이때는 "ls -l | grep meta"로 metastore_db폴더를 찾아 삭제하고 schematool을 이용하여 initSchema를 수행하면 정상적으로 schema가 초기화 된다.


* 참조 : https://cwiki.apache.org/confluence/display/Hive/Hive+Schema+Tool


-----------------schema설정없이 hive를 최초에 실행했을때 발생하는 오류메세지 ----------

$ bin/hive

hive: line 86: readlink: command not found

which: 0652-141 There is no hbase in /usr/bin /etc /usr/sbin /usr/ucb /engine/bigdata/bin /usr/bin/X11 /sbin . /usr/java7_64/bin /engine/bigdata/hadoop/bin /engine/bigdata/hive/bin.

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/engine/bigdata/apache-hive-2.1.0-bin/lib/hive-jdbc-2.1.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/engine/bigdata/apache-hive-2.1.0-bin/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/engine/bigdata/hadoop-2.7.2/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]


Logging initialized using configuration in file:/engine/bigdata/apache-hive-2.1.0-bin/conf/hive-log4j2.properties Async: true

Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don'                         t forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))

        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:578)

        at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:518)

        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)

        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)

        at java.lang.reflect.Method.invoke(Method.java:620)

        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)

        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-creat                         e the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))

        at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:226)

        at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:366)

        at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310)

        at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290)

        at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266)

        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545)

        ... 9 more

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection                          string (e.g. ?createDatabaseIfNotExist=true for mysql))

        at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3593)

        at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236)

        at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221)

        ... 14 more

Caused by: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for my                         sql))

        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3364)

        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3336)

        at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3590)

        ... 16 more

번호 제목 글쓴이 날짜 조회 수
70 Apache Spark와 Drools를 이용한 CEP구현 테스트 총관리자 2016.07.15 342
69 spark-submit으로 spark application실행하는 다양한 방법 총관리자 2016.05.25 303
68 Spark에서 KafkaUtils.createStream()를 이용하여 이용하여 kafka topic에 접근하여 객채로 저장된 값을 가져오고 처리하는 예제 소스 총관리자 2017.04.26 292
67 Caused by: java.lang.ClassNotFoundException: org.apache.spark.Logging 발생시 조치사항 총관리자 2017.04.19 284
66 hive metastore db중 TBLS, TABLE_PARAMS테이블 설명 총관리자 2021.10.22 260
65 Windows7 64bit 환경에서 Apache Spark 2.2.0 설치하기 총관리자 2017.07.26 260
64 Scala에서 countByWindow를 이용하기(예제) 총관리자 2018.03.08 235
63 AIX 7.1에서 hive실행시 "hive: line 86: readlink: command not found" 오류가 발생시 임시 조치사항 총관리자 2016.09.25 234
62 hive 0.13.1 설치 + meta정보는 postgresql 9.3에 저장 총관리자 2015.04.30 227
61 [sentry]role부여후 테이블명이 변경되어 오류가 발생할때 조치방법 총관리자 2018.10.16 215
60 spark 2.0.0의 api를 이용하는 예제 프로그램 총관리자 2017.03.15 199
59 우분투 16.04LTS에 Zeppelin 0.7.3설치 총관리자 2018.04.18 198
58 RHEL 7.4에 zeppelin 0.7.4 설치 총관리자 2018.07.31 196
57 Could not compute split, block input-0-1517397051800 not found형태의 오류가 발생시 조치방법 총관리자 2018.02.01 196
56 beeline으로 접근시 "User: gooper is not allowed to impersonate anonymous (state=08S01,code=0)"가 발생하면서 "No current connection"이 발생하는 경우 조치 총관리자 2018.04.15 194
55 Soft memory limit exceeded (at 100.05% of capacity) 오류 조치 총관리자 2022.01.17 181
54 spark-sql실행시 ERROR log: Got exception: java.lang.NumberFormatException For input string: "2000ms" 오류발생시 조치사항 총관리자 2016.06.09 167
53 spark2.0.0에서 hive 2.0.1 table을 읽어 출력하는 예제 소스(HiveContext, SparkSession, SQLContext) 총관리자 2017.03.09 163
52 spark notebook 0.7.0설치및 설정 총관리자 2016.11.14 160
51 CDH 5.4.4 버전에서 hive on tez (0.7.0)설치하기 총관리자 2016.01.14 158

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로