首页 > 解决方案 > 显示表不显示配置单元中的所有表

问题描述

我正在使用 beeline 列出我们集群上所有现有的配置单元表:

c724199@analytics-01] ~ > beeline -u "jdbc:hive2://blah_blah_blah"

WARNING: Use "yarn jar" to launch YARN applications.

Beeline version 1.2.1000.2.4.2.0-258 by Apache Hive

Connected to: Apache Hive (version 1.2.1000.2.4.2.0-258)

Driver: Hive JDBC (version 1.2.1000.2.4.2.0-258)

Transaction isolation: TRANSACTION_REPEATABLE_READ

0: jdbc:hive2://zookeeper-01:2181,zookeeper-0> show tables;

+----------------------------------+--+

|             tab_name             |

+----------------------------------+--+

| s_addr_per                       |

| table_test_orc_schema_evolution  |

| table_test_schema_evolution_orc  |

| test1                            |

+----------------------------------+--+

上表是集群上的 hive 表列表;但是当我在直线上使用选择命令时

select * from datalab_network.cgbeat_high_freq;
DataFrame[at_timestamp: string, at_version: string, host: string, message: string, mode: string, port: bigint, program: string, rest: string, type: string, version: string, system_parameters_name: string, system_parameters_version: smallint, heartbeat_type: string, thor_parameters_deviceinfo_gatewayid: string, thor_parameters_deviceinfo_currentlocaltime: string, thor_parameters_deviceinfo_uptime: bigint, thor_parameters_diagnostic_activecalls: bigint, thor_parameters_diagnostic_authtelstraairusers: bigint, thor_parameters_diagnostic_preauthtelstraairusers: bigint, thor_parameters_diagnostic_nbethernethosts: bigint, thor_parameters_diagnostic_nb2ghosts: bigint, thor_parameters_diagnostic_nb5ghosts: bigint, thor_parameters_diagnostic_cpu_samples_mean: double, thor_parameters_diagnostic_cpu_samples_max: bigint, thor_parameters_diagnostic_mem_samples_mean: double, thor_parameters_diagnostic_mem_samples_max: bigint, thor_parameters_diagnostic_processes_samples_mean: double, thor_parameters_diagnostic_processes_samples_max: bigint, thor_parameters_diagnostic_processes_samples_min: bigint, thor_parameters_diagnostic_conntrack: bigint, thor_parameters_diagnostic_fixedupstreambytes_samples_current: bigint, thor_parameters_diagnostic_fixedupstreambytespersecond_samples_mean: double, thor_parameters_diagnostic_fixedupstreambytespersecond_samples_max: bigint, thor_parameters_diagnostic_fixeddownstreambytes_samples_current: bigint, thor_parameters_diagnostic_fixeddownstreambytespersecond_samples_mean: double, thor_parameters_diagnostic_fixeddownstreambytespersecond_samples_max: bigint, thor_parameters_diagnostic_mobileupstreambytes_samples_current: bigint, thor_parameters_diagnostic_mobileupstreambytespersecond_samples_mean: double, thor_parameters_diagnostic_mobileupstreambytespersecond_samples_max: bigint, thor_parameters_diagnostic_mobiledownstreambytes_samples_current: bigint, thor_parameters_diagnostic_mobiledownstreambytespersecond_samples_mean: double, thor_parameters_diagnostic_mobiledownstreambytespersecond_samples_max: bigint, thor_parameters_diagnostic_ltersrp: string, thor_parameters_diagnostic_ltersrq: string, thor_parameters_diagnostic_ltesnr: string, thor_parameters_diagnostic_lterssi: string, thor_parameters_diagnostic_temperature_cpu_samples_mean: double, thor_parameters_diagnostic_temperature_cpu_samples_max: bigint, thor_parameters_diagnostic_temperature_wifi_2g_samples_mean: bigint, thor_parameters_diagnostic_temperature_wifi_2g_samples_max: bigint, thor_parameters_diagnostic_temperature_wifi_5g_samples_mean: double, thor_parameters_diagnostic_temperature_wifi_5g_samples_max: bigint, thor_parameters_diagnostic_xdsl_dropcount_samples_current: bigint, device_ip_interface_9_lastchange: bigint, device_ip_interface_7_lastchange: bigint, device_dsl_channel_1_linkencapsulationused: string, device_dsl_channel_1_upstreamcurrrate: bigint, device_dsl_channel_1_downstreamcurrrate: bigint, device_dsl_line_1_upstreamattenuation: bigint, device_dsl_line_1_downstreamattenuation: bigint, device_dsl_line_1_upstreammaxbitrate: bigint, device_dsl_line_1_downstreammaxbitrate: bigint, device_dsl_line_1_upstreamnoisemargin: bigint, device_dsl_line_1_downstreamnoisemargin: bigint, device_dsl_line_1_upstreampower: bigint, device_dsl_line_1_downstreampower: bigint, device_dsl_line_1_trellisds: bigint, device_dsl_line_1_trellisus: bigint, device_dsl_line_1_powermanagementstate: string, device_dsl_line_1_stats_showtime_erroredsecs: bigint, device_dsl_line_1_stats_showtime_severelyerroredsecs: bigint, device_dsl_line_1_stats_showtimestart: bigint, device_dsl_line_1_stats_total_erroredsecs: bigint, device_dsl_line_1_stats_total_severelyerroredsecs: bigint, device_dsl_line_1_stats_total_x_000e50_unavailableseconds: bigint, device_dsl_line_1_stats_totalstart: bigint, device_dsl_line_1_stats_currentday_erroredsecs: bigint, device_dsl_line_1_stats_currentday_severelyerroredsecs: bigint, device_dsl_line_1_stats_quarterhour_erroredsecs: bigint, device_dsl_line_1_stats_quarterhour_severelyerroredsecs: bigint, device_dsl_line_1_stats_quarterhour_fecerrors: bigint, device_dsl_line_1_stats_quarterhour_hecerrors: bigint, device_dsl_line_1_stats_quarterhour_crcerrors: bigint, device_services_voiceservice_1_voiceprofile_1_line_1_stats_callsdropped: bigint, device_services_voiceservice_1_voiceprofile_1_line_1_stats_incomingcallsanswered: bigint, device_services_voiceservice_1_voiceprofile_1_line_1_stats_outgoingcallsanswered: bigint, src_date: date]

它给了我蜂巢表的描述?

为什么我无法使用“显示表​​”找到我的蜂巢表“cbgeat”?

标签: apache-sparkhivepysparkhiveqlbeeline

解决方案


默认情况下,beeline / hive shell 指向“默认”数据库。上面列出的表是“默认”数据库/模式的表。

use database_name在这种情况下 使用:切换到不同的数据库/模式USE datalab_network,您将能够看到这些表。


推荐阅读