250x250
๋ฐ˜์‘ํ˜•
arkhyeon
arkhyeon
arkhyeon
์ „์ฒด ๋ฐฉ๋ฌธ์ž
์˜ค๋Š˜
์–ด์ œ
  • ๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (88)
    • Spring (5)
    • Java (4)
    • React (25)
      • TypeScript (6)
      • JavaScript (1)
      • Jest (9)
    • NEXT (8)
    • SQL (1)
    • React native (1)
    • CSS (3)
    • Web (1)
    • Git (3)
    • ETC (6)
    • ๋น…๋ฐ์ดํ„ฐDB (8)
    • Docker (4)
    • Tool (1)

๋ธ”๋กœ๊ทธ ๋ฉ”๋‰ด

  • ํ™ˆ
  • ํƒœ๊ทธ
  • ๋ฐฉ๋ช…๋ก

๊ณต์ง€์‚ฌํ•ญ

์ธ๊ธฐ ๊ธ€

ํƒœ๊ทธ

  • react typescript
  • jest
  • react usetransition
  • react19
  • react loading
  • javasciprt websocket
  • docker tomcat
  • javascript wss
  • kudu
  • react jest
  • websocket server
  • WSS
  • react spring websocket
  • HIVE
  • Spring WebSocket
  • react websocket
  • react
  • node WebSocket
  • usetransition
  • websocket

์ตœ๊ทผ ๋Œ“๊ธ€

์ตœ๊ทผ ๊ธ€

ํ‹ฐ์Šคํ† ๋ฆฌ

hELLO ยท Designed By ์ •์ƒ์šฐ.
arkhyeon

arkhyeon

๋น…๋ฐ์ดํ„ฐDB

KUDU Docker JAVA API

2024. 2. 5. 13:31
728x90
๋ฐ˜์‘ํ˜•
๐Ÿ’ก JDBC ๋“œ๋ผ์ด๋ฒ„๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‚˜์š”?
Kudu๋Š” SQL ์—”์ง„์ด ์•„๋‹ˆ๋ผ ๋‹จ๋… ์‚ฌ์šฉ์€ ๋ถˆ๊ฐ€ํ•˜๋‚˜ ํ•จ๊ป˜ ์‚ฌ์šฉ๋˜๋Š” SQL ์—”์ง„์— ๋”ฐ๋ผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ธฐ์— ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ๋Š” Client API๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ SQL ์—”์ง„๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜์—ฌ์•ผ ํ•œ๋‹ค. ํ•ด๋‹น ์˜ˆ์ œ๋Š” Kudu ๋‹จ๋…์œผ๋กœ ์‚ฌ์šฉํ•˜๋Š” Java API์— ๋Œ€ํ•œ ์„ค๋ช…์ด๋‹ค.

Quick Start

https://github.com/apache/kudu/tree/master/examples/java/java-example

๋‹ค๋ฅธ ์„œ๋ฒ„ Docker Kudu ์‚ฌ์šฉ

๋กœ์ปฌ ์„œ๋ฒ„ Docker Kudu๋Š” localhost๋กœ ๋ฐ”๋กœ ๋ถ™์œผ๋ฉด ๋˜์ง€๋งŒ ๋‹ค๋ฅธ ์„œ๋ฒ„ Docker Kudu๋Š” Docker Hosts์— kudu-master ์„ค์ •์ด ํ•„์š”ํ•˜๋‹ค.

Kudu rpc_address ์„ธ๊ฐœ ๋ชจ๋‘ hosts ํŒŒ์ผ์— ์ž‘์„ฑ

# ํŒŒ์ผ ์œ„์น˜ : C:\\Windows\\System32\\drivers\\etc\\hosts

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
# Added by Docker Desktop
192.168.10.XXX host.docker.internal
192.168.10.XXX gateway.docker.internal
192.168.10.XXX kudu-master-1 # Kudu rpc_address
192.168.10.XXX kudu-master-2 # Kudu rpc_address
192.168.10.XXX kudu-master-3 # Kudu rpc_address
# To allow the same kube context to work on the host and the container:
XXX.X.X.X kubernetes.docker.internal
# End of section

Kudu Master Addrees ์ž‘์„ฑ

private static final String DOCKER_URL = "192.168.10.204";
private static final String KUDU_MASTERS = System.getProperty("KUDU_MASTERS", DOCKER_URL+":7051,"+DOCKER_URL+":7151,"+DOCKER_URL+":7251");

//OR

List<String> masterAddresses = new ArrayList<>();
masterAddresses.add("192.168.10.204:7051");
masterAddresses.add("192.168.10.204:7151");
masterAddresses.add("192.168.10.204:7251");

pom.xml

# ํŒŒ์ผ ์œ„์น˜ : C:\Windows\System32\drivers\etc\hosts

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
# Added by Docker Desktop
192.168.10.XXX host.docker.internal
192.168.10.XXX gateway.docker.internal
192.168.10.XXX kudu-master-1 # Kudu rpc_address
192.168.10.XXX kudu-master-2 # Kudu rpc_address
192.168.10.XXX kudu-master-3 # Kudu rpc_address
# To allow the same kube context to work on the host and the container:
XXX.X.X.X kubernetes.docker.internal
# End of section

Error Log ํ•œ๊ธ€ ๊นจ์ง

slf4j๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ํ˜ธํ™˜์„ฑ ๋ฌธ์ œ๋กœ Java Version์„ 1.8์—์„œ 11๋กœ ์˜ฌ๋ ธ๋”๋‹ˆ ํ•œ๊ธ€์ด ๊นจ์ง€์ง€ ์•Š์•˜๋‹ค.

728x90
๋ฐ˜์‘ํ˜•

'๋น…๋ฐ์ดํ„ฐDB' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Apache Impala + Kudu Query  (0) 2024.02.01
Kudu ๋…๋ฆฝ์ ์ธ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์‚ฌ์šฉ  (1) 2024.02.01
Presto JDBC ์—ฐ๊ฒฐ  (1) 2024.01.23
Single Store JDBC ์—ฐ๊ฒฐ  (0) 2024.01.23
Hive Create Update Delete Select Table  (0) 2024.01.23
    '๋น…๋ฐ์ดํ„ฐDB' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
    • Apache Impala + Kudu Query
    • Kudu ๋…๋ฆฝ์ ์ธ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์‚ฌ์šฉ
    • Presto JDBC ์—ฐ๊ฒฐ
    • Single Store JDBC ์—ฐ๊ฒฐ
    arkhyeon
    arkhyeon

    ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”