hadoop Hive日志在终端显示吗如何禁用它们?配置单元日志未存储在/tmp/user/hive. log文件中

xbp102n0  于 2023-08-03  发布在  Hadoop
关注(0)|答案(2)|浏览(226)

我使用的是hive 3.1.2和hadoop 3.3.6。每当我启动hive shell时,就有太多这样的日志

  1. 2023-07-15 13:24:52,407 INFO [main] conf.HiveConf (HiveConf.java:findConfigFile(187)) - Found configuration file file:/home/god/apache-hive-3.1.2-bin/conf/hive-site.xml
  2. Hive Session ID = c69e4b21-2df2-4434-965c-5c7a5255f6a0
  3. 2023-07-15 13:24:55,449 INFO [main] SessionState (SessionState.java:printInfo(1227)) - Hive Session ID = c69e4b21-2df2-4434-965c-5c7a5255f6a0
  4. Logging initialized using configuration in jar:file:/home/god/apache-hive-3.1.2-bin/lib/hive-common-3.1.2.jar!/hive-log4j2.properties Async: true
  5. 2023-07-15 13:24:55,528 INFO [main] SessionState (SessionState.java:printInfo(1227)) -
  6. Logging initialized using configuration in jar:file:/home/god/apache-hive-3.1.2-bin/lib/hive-common-3.1.2.jar!/hive-log4j2.properties Async: true
  7. 2023-07-15 13:24:57,056 INFO [main] session.SessionState (SessionState.java:createPath(790)) - Created HDFS directory: /tmp/hive/god/c69e4b21-2df2-4434-965c-5c7a5255f6a0
  8. 2023-07-15 13:24:57,088 INFO [main] session.SessionState (SessionState.java:createPath(790)) - Created local directory: /tmp/god/c69e4b21-2df2-4434-965c-5c7a5255f6a0
  9. 2023-07-15 13:24:57,094 INFO [main] session.SessionState (SessionState.java:createPath(790)) - Created HDFS directory: /tmp/hive/god/c69e4b21-2df2-4434-965c-5c7a5255f6a0/_tmp_space.db
  10. 2023-07-15 13:24:57,118 INFO [main] conf.HiveConf (HiveConf.java:getLogIdVar(5040)) - Using the default value passed in for log id: c69e4b21-2df2-4434-965c-5c7a5255f6a0
  11. 2023-07-15 13:24:57,118 INFO [main] session.SessionState (SessionState.java:updateThreadName(441)) - Updating thread name to c69e4b21-2df2-4434-965c-5c7a5255f6a0 main
  12. 2023-07-15 13:24:58,415 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.HiveMetaStore (HiveMetaStore.java:newRawStoreForConf(717)) - 0: Opening raw store with implementation class:org.apache.hadoop.hive.metastore.ObjectStore
  13. 2023-07-15 13:24:58,455 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.ObjectStore (ObjectStore.java:correctAutoStartMechanism(638)) - datanucleus.autoStartMechanismMode is set to unsupported value null . Setting it to value: ignored
  14. 2023-07-15 13:24:58,467 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.ObjectStore (ObjectStore.java:initializeHelper(481)) - ObjectStore, initialize called
  15. 2023-07-15 13:24:58,469 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1240)) - Found configuration file file:/home/god/apache-hive-3.1.2-bin/conf/hive-site.xml
  16. 2023-07-15 13:24:58,472 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1233)) - Unable to find config file hivemetastore-site.xml
  17. 2023-07-15 13:24:58,472 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1240)) - Found configuration file null
  18. 2023-07-15 13:24:58,475 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1233)) - Unable to find config file metastore-site.xml
  19. 2023-07-15 13:24:58,475 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1240)) - Found configuration file null
  20. 2023-07-15 13:24:58,773 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.Persistence (Log4JLogger.java:info(77)) - Property datanucleus.cache.level2 unknown - will be ignored
  21. 2023-07-15 13:24:59,130 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] hikari.HikariDataSource (HikariDataSource.java:<init>(71)) - HikariPool-1 - Starting...
  22. 2023-07-15 13:24:59,895 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] hikari.HikariDataSource (HikariDataSource.java:<init>(73)) - HikariPool-1 - Start completed.
  23. 2023-07-15 13:24:59,962 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] hikari.HikariDataSource (HikariDataSource.java:<init>(71)) - HikariPool-2 - Starting...
  24. 2023-07-15 13:25:00,045 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] hikari.HikariDataSource (HikariDataSource.java:<init>(73)) - HikariPool-2 - Start completed.
  25. 2023-07-15 13:25:00,238 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.ObjectStore (ObjectStore.java:getPMF(670)) - Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order"
  26. 2023-07-15 13:25:00,558 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(186)) - Using direct SQL, underlying DB is MYSQL
  27. 2023-07-15 13:25:00,560 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.ObjectStore (ObjectStore.java:setConf(396)) - Initialized ObjectStore
  28. 2023-07-15 13:25:00,916 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  29. 2023-07-15 13:25:00,938 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  30. 2023-07-15 13:25:00,940 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  31. 2023-07-15 13:25:00,940 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  32. 2023-07-15 13:25:00,942 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  33. 2023-07-15 13:25:00,943 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  34. 2023-07-15 13:25:03,562 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  35. 2023-07-15 13:25:03,564 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  36. 2023-07-15 13:25:03,565 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  37. 2023-07-15 13:25:03,566 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  38. 2023-07-15 13:25:03,567 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  39. 2023-07-15 13:25:03,568 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
  40. 2023-07-15 13:25:06,866 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.HiveMetaStore (HiveMetaStore.java:createDefaultCatalog(730)) - Setting location of default catalog, as it hasn't been done after upgrade
  41. 2023-07-15 13:25:06,913 WARN [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.ObjectStore (ObjectStore.java:getDatabase(999)) - Failed to get database hive.default, returning NoSuchObjectException
  42. 2023-07-15 13:25:07,027 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.HiveMetaStore (HiveMetaStore.java:createDefaultRoles_core(812)) - Added admin role in metastore
  43. 2023-07-15 13:25:07,037 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.HiveMetaStore (HiveMetaStore.java:createDefaultRoles_core(821)) - Added public role in metastore
  44. 2023-07-15 13:25:07,091 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.HiveMetaStore (HiveMetaStore.java:addAdminUsers_core(861)) - No user is added in admin role, since config is empty
  45. 2023-07-15 13:25:07,277 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.RetryingMetaStoreClient (RetryingMetaStoreClient.java:<init>(97)) - RetryingMetaStoreClient proxy=class org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient ugi=god (auth:SIMPLE) retries=1 delay=1 lifetime=0
  46. 2023-07-15 13:25:07,316 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(895)) - 0: get_all_functions
  47. 2023-07-15 13:25:07,318 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(347)) - ugi=god ip=unknown-ip-addr cmd=get_all_functions
  48. Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
  49. 2023-07-15 13:25:07,354 INFO [c69e4b21-2df2-4434-965c-5c7a5255f6a0 main] CliDriver (SessionState.java:printInfo(1227)) - Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
  50. Hive Session ID = 787c32b2-34f2-4af4-988b-e359b0a194a0
  51. 2023-07-15 13:25:07,355 INFO [pool-9-thread-1] SessionState (SessionState.java:printInfo(1227)) - Hive Session ID = 787c32b2-34f2-4af4-988b-e359b0a194a0
  52. 2023-07-15 13:25:07,391 INFO [pool-9-thread-1] session.SessionState (SessionState.java:createPath(790)) - Created HDFS directory: /tmp/hive/god/787c32b2-34f2-4af4-988b-e359b0a194a0
  53. 2023-07-15 13:25:07,396 INFO [pool-9-thread-1] session.SessionState (SessionState.java:createPath(790)) - Created local directory: /tmp/god/787c32b2-34f2-4af4-988b-e359b0a194a0
  54. 2023-07-15 13:25:07,403 INFO [pool-9-thread-1] session.SessionState (SessionState.java:createPath(790)) - Created HDFS directory: /tmp/hive/god/787c32b2-34f2-4af4-988b-e359b0a194a0/_tmp_space.db
  55. 2023-07-15 13:25:07,405 INFO [pool-9-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(895)) - 1: get_databases: @hive#
  56. 2023-07-15 13:25:07,410 INFO [pool-9-thread-1] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(347)) - ugi=god ip=unknown-ip-addr cmd=get_databases: @hive#
  57. 2023-07-15 13:25:07,416 INFO [pool-9-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:newRawStoreForConf(717)) - 1: Opening raw store with implementation class:org.apache.hadoop.hive.metastore.ObjectStore
  58. 2023-07-15 13:25:07,417 INFO [pool-9-thread-1] metastore.ObjectStore (ObjectStore.java:initializeHelper(481)) - ObjectStore, initialize called
  59. 2023-07-15 13:25:07,441 INFO [pool-9-thread-1] metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(186)) - Using direct SQL, underlying DB is MYSQL
  60. 2023-07-15 13:25:07,442 INFO [pool-9-thread-1] metastore.ObjectStore (ObjectStore.java:setConf(396)) - Initialized ObjectStore
  61. 2023-07-15 13:25:07,457 INFO [pool-9-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(895)) - 1: get_tables_by_type: db=@hive#default pat=.*,type=MATERIALIZED_VIEW
  62. 2023-07-15 13:25:07,458 INFO [pool-9-thread-1] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(347)) - ugi=god ip=unknown-ip-addr cmd=get_tables_by_type: db=@hive#default pat=.*,type=MATERIALIZED_VIEW
  63. 2023-07-15 13:25:07,472 INFO [pool-9-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(895)) - 1: get_multi_table : db=default tbls=
  64. 2023-07-15 13:25:07,472 INFO [pool-9-thread-1] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(347)) - ugi=god ip=unknown-ip-addr cmd=get_multi_table : db=default tbls=
  65. 2023-07-15 13:25:07,481 INFO [pool-9-thread-1] metadata.HiveMaterializedViewsRegistry (HiveMaterializedViewsRegistry.java:run(171)) - Materialized views registry has been initialized

字符串
以下是我迄今为止所做的尝试:
1.像这样启动hive:hive --hiveconfig hive.root.logger=(ERROR or FATAL or OFF)(console or DRFA)所有的组合,但它没有工作。
1.将hive-log4j.properties中的每个属性更改为ERROR或FATAL或OFF,但id也不起作用
1.将hive-site.xml中的属性hive.async.log.enabled更改为false。
1.将hadoop3.3.6更改为3.3.0和3.3.5以及3.2.4,但ID也不起作用。
1.我尝试在hive-log4j2.properties中更改hive.log.dir,但也不起作用
我注意到所有的日志都只显示在终端中,但它们并没有写入/tmp/user/hive. log中的hive.log文件
所以请告诉我哪里是真正的问题,因为我已经搜索了互联网,我找不到任何东西比我已经尝试过。
在Hive官方网站hadoop3.x.y是由hive 3.1.2支持的,但我仍然尝试了3.1.3版本,但也没有工作。
Linux Mint 21

y3bcpkx1

y3bcpkx11#

您可以在/home/.../apache-hive-3.1.2-bin/conf/下更改此文件hive-log4j2.properties
用这个

  1. # Root logger option
  2. log4j.rootLogger=INFO, console
  3. log4j.appender.file.fileName=/tmp/user/hive.log

字符串
检查日志文件和目录的所有权和权限。确保配置单元用户具有写入日志文件所需的权限。
如果日志文件仍然没有接收到日志,您可以尝试指定其他日志文件位置,并确保Hive用户可以写入新位置。

fcipmucu

fcipmucu2#

它在Ubuntu中运行良好,但在Linux Mint中不运行。

相关问题