kagamihogeの日記

kagamihogeの日記です。

2019-01-01から1年間の記事一覧

アトラス作品ファンのオフ会 新年号に開催する眼鏡祭(2019/12/14)に行ってきた

12/14(土) スーパー眼鏡祭R(eiwa)35 - TwiPlaに行ってきました。 当日の肌寒さはそこまででもなく、冬にしては過ごしやすい一日となりました。今回も参加者は200人を超えての盛況振りで、発売まもないP5R - ペルソナ5 ザ・ロイヤルの話題などで盛り上がりま…

JEP 370: Foreign-Memory Access API (Incubator)をテキトーに訳した

https://openjdk.java.net/jeps/370 JEP 370: Foreign-Memory Access API (Incubator) Owner Maurizio Cimadamore Type Feature Scope JDK Status Proposed to Target Release 14 Component tools Discussion panama dash dev at openjdk dot java dot net C…

spring-bootでspring-mvcの依存性が解決される仕組みを調べる

spring-bootでは、例えば以下のようにparentとdependencyを指定しておけば、spring-webとかspring-mvcとかの依存性をよしなに解決してくれる。以下のように書くとspring-webmvc-5.2.1.RELEASE.jarが解決されるが、このエントリではそれがどのようにして行わ…

spring-amqpでPOJOをバイナリorJSONで送受信する

手順など pom.xml コメントアウトの箇所は後述。 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.0.RELEASE</version> <relativePath /> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceencoding></properties>

Local Variable Type Inference: Style Guidelinesを読んだ

javaのvarをどう使うかについて何か良い資料無いかな、とぐぐってたら本家にあったので読んで訳した。とはいえ、ごく当たり前のことで、まとめれば、極めて狭いスコープかつ変数名は可読性を損なわないように、プラスでジェネリクスとかダイヤモンド演算子と…

thymeleaf-extras-springsecurityつかう

Thymeleafコアには含まれない、spring-securityとThymeleafを結び付けて使うためのThymeleaf Extrasモジュールの基本的な使い方に関するメモ。基本的に、このエントリは https://github.com/thymeleaf/thymeleaf-extras-springsecurity のドキュメントを基に…

spring-bootでセッション保存先をredisにする

Spring BootでSpring Securityをredisでうごかすでは、spring-securityのセッション保存先をredisに変更した。このエントリはspring-securityを伴わない場合だが、やることはほとんど変わらない。 やること redisのインストール 他サイトを見て適当なマシン…

JEP 359: Records (Preview)をテキトーに訳した

http://openjdk.java.net/jeps/359 JEP 359: Records (Preview) Author Brian Goetz Owner Vicente Arturo Romero Zaldivar Type Feature Scope SE Status Candidate Component specification / language Discussion amber dash dev at openjdk dot java dot…

RedisのKEYSを同時に何個か実行する

RedisのkeysがO(N)を実際に見る で見たようにKEYSは登録キー件数によってはかなり遅くなる。次に、特に重いKEYS *を同時に複数実行すると、タイムアウトするらしいので、そこを実際にやってみる。 ソースコード <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-start</artifactid></parent>…

RedisのkeysがO(N)を実際に見る

RedisのKEYSはO(n)な点に注意が必要、と各種文献に書かれている。なので実際にデータ作ってみて試してみる。 ソースコード <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.7.RELEASE</version> <relativePath /> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceencoding></properties>

spring-data-redisでpipelineによるバルク処理

redis初心者です。以下は https://docs.spring.io/spring-data-redis/docs/current/reference/html/#pipeline の抄訳。 5.11. Pipelining Redisにはパイプライン(https://redis.io/topics/pipelining)があり、これはリプライを待たずにサーバへ複数コマン…

JEP 358: Helpful NullPointerExceptionsをテキトーに訳した

http://openjdk.java.net/jeps/358 JEP 358: Helpful NullPointerExceptions Authors Goetz Lindenmaier, Ralf Schmelter Owner Goetz Lindenmaier Type Feature Scope JDK Status Candidate Component hotspot / runtime Discussion hotspot dash runtime d…

アトラス作品ファンのオフ会 新年号に開催する眼鏡祭(2019/07/20)に行ってきた

7/20(土) 新年号に開催する眼鏡祭に行ってきました。 当日の天候は雨こそ降りませんでしたが、涼しい前日と比べていきなり夏らしい湿気のある1日になりました。今回も200人超の参加者となり、ペルソナをはじめとしたアトラス作品ファンの熱気で盛り上がりま…

spring-batchのMapJobRepositoryFactoryBeanでメタテーブルをDBに保存せず大量にstepを実行するとスローダウン

現象 ほぼタイトルで言い切っているけど。spring-batchでメタデータ保存でDBを使わなないようインメモリに格納するMapJobRepositoryFactoryBeanを使う場合が稀に良くある。この状況下で大量のstepを含むjobを実行すると徐々に実行速度が低下していく、という…

spring-integrationでjob名渡してspring-batchを起動

spring-integration勉強中です。 spring-integrationに文字列でjob名を渡し、その先でspring-batchを起動、をつくる。https://github.com/pakmans/spring-batch-integration-example/blob/master/pom.xml を参考にした。

spring-integrationでメッセージ送信

spring-integration勉強中です。 非常にシンプルな、spring-integrationのチャネルに文字列メッセージ送信して表示するだけ、を作ってみる。 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> </project>

spring-integrationでファイル作成を検出するサンプル

spring-integration勉強中です。 というわけで https://github.com/pakmans/spring-batch-integration-example の方のコードを参考に、監視先ディレクトリにファイルが作られたらメッセージハンドラが呼び出される、というだけのコードを動かした。詳しいこ…

JEP 353: Reimplement the Legacy Socket APIをテキトーに訳した

http://openjdk.java.net/jeps/353 JEP 353: Reimplement the Legacy Socket API Owner Alan Bateman Type Feature Scope JDK Status Proposed to Target Release 13 Component core-libs / java.net Discussion net dash dev at openjdk dot java dot net E…

JEP 310: Application Class-Data Sharingをテキトーに訳した

https://openjdk.java.net/jeps/310 JEP 310: Application Class-Data Sharing Owner Ioi Lam Type Feature Scope Implementation Status Closed / Delivered Release 10 Component hotspot / runtime Discussion hotspot dash dev at openjdk dot java dot …

OracleからLogstashでElasticsearchにデータおくる

OracleからLogstashを経由してElasticsearchにデータを追加する。Oracleのtimestampカラムを使用して、Logstashが定期的に前回以降のデータを取得して、Elasticsearchのインデックスに追加する。KIbanaはデータ確認用としてのみ使用する。 なお、環境構築はd…

アトラス作品ファンのオフ会 平成最期の眼鏡祭(2019/04/13)に行ってきた

Twipla - 4/13 平成最期の眼鏡祭!に行ってきました。当日の様子はtwitterハッシュタグ#眼鏡祭0413で追えます。 眼鏡祭とは? 【固定告知】4/13 平成最期の眼鏡祭! https://t.co/hOUxpkpsYU 次回のご連絡は4/10(水)辺りを予定しております。予定がぽっか…

Spring Batch 4.1.x - Reference Documentation - Spring Batch Integrationのテキトー翻訳

https://docs.spring.io/spring-batch/4.1.x/reference/html/spring-batch-integration.html#springBatchIntegration https://qiita.com/kagamihoge/items/12fbbc2eac5b8a5ac1e0 俺の訳一覧リスト 1. Spring Batch Integration 1.1. Spring Batch Integratio…

JEP 351: ZGC: Uncommit Unused Memoryをテキトーに訳した

http://openjdk.java.net/jeps/351 JEP 351: ZGC: Uncommit Unused Memory Owner Per Liden Type Feature Scope Implementation Status Candidate Component hotspot / gc Discussion hotspot dash gc dash dev at openjdk dot java dot net Effort S Durati…

Spring Batch 4.1.x - Reference Documentation - JSR-352 Supportのテキトー翻訳

https://docs.spring.io/spring-batch/4.1.x/reference/html/jsr-352.html#jsr-352 https://qiita.com/kagamihoge/items/12fbbc2eac5b8a5ac1e0 俺の訳一覧リスト *1 1. JSR-352 Support Spring Batch 3.0以降はJSR-352を完全に実装しています。このセクショ…

Spring Batch 4.1.x - Reference Documentation - Common Batch Patternsのテキトー翻訳

https://docs.spring.io/spring-batch/4.1.x/reference/html/common-patterns.html#commonPatterns https://qiita.com/kagamihoge/items/12fbbc2eac5b8a5ac1e0 俺の訳一覧リスト 1. Common Batch Patterns ある種のジョブはSpring Batch標準コンポーネントの…

Spring Batch 4.1.x - Reference Documentation - Unit Testingのテキトー翻訳

https://docs.spring.io/spring-batch/4.1.x/reference/html/testing.html#testing https://qiita.com/kagamihoge/items/12fbbc2eac5b8a5ac1e0 俺の訳一覧リスト 1. Unit Testing バッチ以外のアプリケーション同様に、バッチジョブの一部として書いたコード…

Spring Batch 4.1.x - Reference Documentation - Retryのテキトー翻訳

https://docs.spring.io/spring-batch/4.1.x/reference/html/retry.html#retry https://qiita.com/kagamihoge/items/12fbbc2eac5b8a5ac1e0 俺の訳一覧リスト 1. Retry 処理をロバストかつ失敗の可能性を下げるには、次回以降には成功する確率が高い場合、そ…

Spring Batch 4.1.x - Reference Documentation - Repeatのテキトー翻訳

https://docs.spring.io/spring-batch/4.1.x/reference/html/repeat.html#repeat https://qiita.com/kagamihoge/items/12fbbc2eac5b8a5ac1e0 俺の訳一覧リスト 1. Repeat 1.1. RepeatTemplate バッチ処理とは繰り返し処理であり、simple optimizationとなる…

Spring Batch 4.1.x - Reference Documentation - Scaling and Parallel Processingのテキトー翻訳

https://docs.spring.io/spring-batch/4.1.x/reference/html/scalability.html#scalability https://qiita.com/kagamihoge/items/12fbbc2eac5b8a5ac1e0 俺の訳一覧リスト 1. Scaling and Parallel Processing 大半のバッチ処理はシングルスレッド・シングル…

Spring Batch 4.1.x - Reference Documentation - ItemReaders and ItemWriters - 1.7-1.15のテキトー翻訳

https://docs.spring.io/spring-batch/4.1.x/reference/html/readersAndWriters.html#readersAndWriters https://qiita.com/kagamihoge/items/12fbbc2eac5b8a5ac1e0 俺の訳一覧リスト 1.7. XML Item Readers and Writers Spring BatchはXMLを読み込みJavaオ…