@@ -0,0 +1,2405 @@
+/*%0A * Licensed to the University of California, Berkeley under one or more contributor license%0A * agreements. See the NOTICE file distributed with this work for additional information regarding%0A * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance with the License. You may obtain a%0A * copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software distributed under the License%0A * is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express%0A * or implied. See the License for the specific language governing permissions and limitations under%0A * the License.%0A */%0A%0Apackage tachyon.examples.keyvalue;%0A%0Aimport tachyon.TachyonURI;%0Aimport tachyon.Version;%0Aimport tachyon.client.keyvalue.KeyValueStoreReader;%0Aimport tachyon.client.keyvalue.KeyValueStoreWriter;%0Aimport tachyon.client.keyvalue.KeyValueStores;%0A%0A/**%0A * A quick start tutorial for creating a key-value store, putting and getting some key-value pairs.%0A */%0Apublic class KeyValueStoreQuickStart %7B%0A  /**%0A   * The main program.%0A   *%0A   * @param args one argument which is the path of the new key-value store%0A   * @throws Exception if any exception happens%0A   */%0A  public static void main(String%5B%5D args) throws Exception %7B%0A    if (args.length != 1) %7B%0A      System.out.println(%22java -cp %22 + Version.TACHYON_JAR + %22 %22%0A          + KeyValueStoreQuickStart.class.getName() + %22 %3Ckey-value store URI%3E%22);%0A      System.exit(-1);%0A    %7D%0A%0A    TachyonURI storeUri = new TachyonURI(args%5B0%5D);%0A    KeyValueStores kvStore = KeyValueStores.Factory.create();%0A%0A    // Creates a store.%0A    KeyValueStoreWriter writer = kvStore.create(storeUri);%0A%0A    // Puts a key-value pair (%22key%22, %22value%22).%0A    String key = %22key%22;%0A    String value = %22value%22;%0A    writer.put(key.getBytes(), value.getBytes());%0A    System.out.println(String.format(%22(%25s, %25s) is put into the key-value store%22, key, value));%0A%0A    // Completes the store.%0A    writer.close();%0A%0A    // Opens a store.%0A    KeyValueStoreReader reader = kvStore.open(storeUri);%0A%0A    // Gets the value for %22key%22.%0A    System.out.println(String.format(%22Value for key '%25s' got from the store is '%25s'%22, key,%0A        new String(reader.get(key.getBytes()))));%0A%0A    // Closes the reader.%0A    reader.close();%0A  %7D%0A%7D%0A

Add a quickstart example for key-value store