The First Cry of Atom Today is the first day of the rest of my life.

Guava ImmutableMap (implicit?) limitation

Following the last time, I found a new trivial thing about Guava usage. ImmutableList creates the List which is immutable for you. You can create any length list by using of method. So I thought I can any length ImmutableMap with this analogy. import com.google.common.collect.ImmutableMap; Map<String, String> l = ImmutableMap.of( ... Read more

ToStringHelper of Guava

In Java, toString() method is useful for debugging. It can print the object information in human readable format. Member variables and state can be returned. Only painful stuff of toString() is that we need to implement by ourselves for custom class. class User { private final String name; private final int age; public User(String nam... Read more

QueueManager and Resource Group in Presto

Presto is a fast distributed SQL engine originally developed by Facebook. From 0.153, pluggable resource group was introduced. This feature enables us to separate cluster resource in account workload. For example, you want to ensure daily batch job resource allocation even if you submit some adhoc queries. In short when 3 concurrent queries are ... Read more

Tag of ScalaTest

We often want to exclude some test cases. ScalaTest has @Ignore annotation to exclude that test case to be run as well as JUnit. But how can we include or exclude test cases in more fine-grained way? ScalaTest provides the feature called Tagging. By using tagging, you can specify which test cases to be run and which are not. You can use this fe... Read more

Learning CMU 15-721 (2)

2回目はIn-Memory Databaseに関する講義。第1回目に関してはここで書いた。 データを永続化した状態で保存するためには不揮発性のストレージにデータを保存する必要がある。ところがDiskは遅いのでいかにしてDiskアクセスを減らしてデータにアクセスするかという技術が不可欠だった。現在では大容量のDRAMが安価に手に入るようになったので、こいつをキャッシュとして使い、Diskアクセスを減らそうとしたのがDisk-Oriented DBMS. Disk Oriented DBMS DBMSではBuffer-Poolと呼ばれるメモリ領域にDisk(不揮発性のストレージ)からのPageをキャッシュする。データはPageと呼ばれる単位で管理されるがDiskにはSlott... Read more