ablog

不器用で落着きのない技術者のメモ

2023-07-01から1ヶ月間の記事一覧

Java アプリから Amazon KeySpaces に insert すると"Consistency level LOCAL_ONE is not supported for this operation. Supported consistency levels are: LOCAL_QUORUM" エラー

AWS

事象 DataStax の Java ドライバを使って、Java アプリケーションから Amazon KeySpaces に insert すると、"Consistency level LOCAL_ONE is not supported for this operation. Supported consistency levels are: LOCAL_QUORUM" エラーになる。 src/main/…

Maven で依存するクラスライブラリを同梱した jar を作成する

Maven で依存するクラスライブラリを同梱した jar を作成したい場合は pom.xml のプラグインで maven-assembly-plugin、maven-dependency-plugin を指定する。 pom.xml

VS Code で XML を整形する

VS Code に XML Tools をインストールする VS Code で XML ファイルを開いて、[右クリック]-[Format Document] ショートカットは以下の通り Mac: Option + Shift + F Windows: Shift + ALT + F 参考 VSCodeでXMLを自動整形する - FROM ME TO YOU

rpm でインストールされたファイルを確認する

$ rpm -ql apache-maven /etc/bash_completion.d/maven /etc/m2.conf /etc/maven /etc/maven/logging /etc/maven/logging/simplelogger.properties /etc/maven/settings.xml /etc/profile.d/apache-maven.csh /etc/profile.d/apache-maven.sh /usr/bin/mvn /…

RHEL 8.6 の起動・停止スクリプトをデバッグする

/etc/init.d/aws-kinesis-agent に set -x を追記 #! /usr/bin/env bash set -x # ★追記 ### BEGIN INIT INFO # Provides: aws-kinesis-agent # Required-Start: $network # Required-Stop: $network # Short-Description: Daemon for Amazon Kinesis Agent.…

RHEL8.6 に Kinesis Agent をインストールする

環境 環境は RHEL 8.6(AMI ID: ami-064d2a8f528240c59) $ cat /etc/system-release Red Hat Enterprise Linux release 8.6 (Ootpa) $ uname -a Linux ip-172-17-3-155.ap-northeast-1.compute.internal 4.18.0-372.9.1.el8.x86_64 #1 SMP Fri Apr 15 22:12…

mvn compile で "Source option 5 is no longer supported. Use 6 or later." と怒られる

事象 mvn compile で "Source option 5 is no longer supported. Use 6 or later." と怒られる $ mvn compile [INFO] Compiling 1 source file to /home/ec2-user/myapp/target/classes [INFO] -----------------------------------------------------------…

EMR で s3-dist-cp が見つからない

AWS

事象 アプリケーションバンドル "Spark" で作成したEMRクラスター(6.10.0)で s3-dist-cp が見つからない。 [hadoop@ip-10-5-143-241 ~]$ s3-dist-cp -bash: s3-dist-cp: command not found 原因 Hadoop がインストールされてないため。 解決策 アプリケー…

Amazon Linux 2023 に Maven をインストールする

AWS

$ sudo wget https://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo $ sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo $ sudo yum install -y apache-mav…

Amazon Linux 2023 に JDK 11 をインストールする

AWS

手順 Amazon Linux のリリースとカーネルバージョンの確認 $ uname -a Linux ip-172-17-1-142.ap-northeast-1.compute.internal 6.1.34-58.102.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jun 27 21:38:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux $ cat …

Amazon Keyspaces を使ってみる

AWS

Maven でビルドしたアプリから DataStax の Cassandra ドライバーを使って Amazon Keyspaces に CQL を投げてみた。 手順 サーバーサイド(KeySpaces) テーブルを作成する マネコンから Amazon Keyspaces のトップページから [Getting started] をクリック…