hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject [10/51] [partial] hbase-site git commit: Published site at df829ea7d1b4d2ef745e29d2b25b12966000eeb2.
Date Wed, 10 Feb 2016 16:27:20 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/40ef21e4/testdevapidocs/src-html/org/apache/hadoop/hbase/PerformanceEvaluation.CASTableTest.html
----------------------------------------------------------------------
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/PerformanceEvaluation.CASTableTest.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/PerformanceEvaluation.CASTableTest.html
index 9b74031..92e0e39 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/PerformanceEvaluation.CASTableTest.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/PerformanceEvaluation.CASTableTest.html
@@ -1835,395 +1835,397 @@
 <span class="sourceLineNo">1827</span>    System.err.println("Usage: java " + className + " \\");<a name="line.1827"></a>
 <span class="sourceLineNo">1828</span>    System.err.println("  &lt;OPTIONS&gt; [-D&lt;property=value&gt;]* &lt;command&gt; &lt;nclients&gt;");<a name="line.1828"></a>
 <span class="sourceLineNo">1829</span>    System.err.println();<a name="line.1829"></a>
-<span class="sourceLineNo">1830</span>    System.err.println("Options:");<a name="line.1830"></a>
+<span class="sourceLineNo">1830</span>    System.err.println("General Options:");<a name="line.1830"></a>
 <span class="sourceLineNo">1831</span>    System.err.println(" nomapred        Run multiple clients using threads " +<a name="line.1831"></a>
 <span class="sourceLineNo">1832</span>      "(rather than use mapreduce)");<a name="line.1832"></a>
-<span class="sourceLineNo">1833</span>    System.err.println(" rows            Rows each client runs. Default: One million");<a name="line.1833"></a>
-<span class="sourceLineNo">1834</span>    System.err.println(" size            Total size in GiB. Mutually exclusive with --rows. " +<a name="line.1834"></a>
-<span class="sourceLineNo">1835</span>      "Default: 1.0.");<a name="line.1835"></a>
-<span class="sourceLineNo">1836</span>    System.err.println(" sampleRate      Execute test on a sample of total " +<a name="line.1836"></a>
-<span class="sourceLineNo">1837</span>      "rows. Only supported by randomRead. Default: 1.0");<a name="line.1837"></a>
-<span class="sourceLineNo">1838</span>    System.err.println(" traceRate       Enable HTrace spans. Initiate tracing every N rows. " +<a name="line.1838"></a>
-<span class="sourceLineNo">1839</span>      "Default: 0");<a name="line.1839"></a>
-<span class="sourceLineNo">1840</span>    System.err.println(" table           Alternate table name. Default: 'TestTable'");<a name="line.1840"></a>
-<span class="sourceLineNo">1841</span>    System.err.println(" multiGet        If &gt;0, when doing RandomRead, perform multiple gets " +<a name="line.1841"></a>
-<span class="sourceLineNo">1842</span>      "instead of single gets. Default: 0");<a name="line.1842"></a>
-<span class="sourceLineNo">1843</span>    System.err.println(" compress        Compression type to use (GZ, LZO, ...). Default: 'NONE'");<a name="line.1843"></a>
-<span class="sourceLineNo">1844</span>    System.err.println(" flushCommits    Used to determine if the test should flush the table. " +<a name="line.1844"></a>
-<span class="sourceLineNo">1845</span>      "Default: false");<a name="line.1845"></a>
-<span class="sourceLineNo">1846</span>    System.err.println(" writeToWAL      Set writeToWAL on puts. Default: True");<a name="line.1846"></a>
-<span class="sourceLineNo">1847</span>    System.err.println(" autoFlush       Set autoFlush on htable. Default: False");<a name="line.1847"></a>
-<span class="sourceLineNo">1848</span>    System.err.println(" oneCon          all the threads share the same connection. Default: False");<a name="line.1848"></a>
-<span class="sourceLineNo">1849</span>    System.err.println(" presplit        Create presplit table. Recommended for accurate perf " +<a name="line.1849"></a>
-<span class="sourceLineNo">1850</span>      "analysis (see guide).  Default: disabled");<a name="line.1850"></a>
-<span class="sourceLineNo">1851</span>    System.err.println(" inmemory        Tries to keep the HFiles of the CF " +<a name="line.1851"></a>
-<span class="sourceLineNo">1852</span>      "inmemory as far as possible. Not guaranteed that reads are always served " +<a name="line.1852"></a>
-<span class="sourceLineNo">1853</span>      "from memory.  Default: false");<a name="line.1853"></a>
-<span class="sourceLineNo">1854</span>    System.err.println(" usetags         Writes tags along with KVs. Use with HFile V3. " +<a name="line.1854"></a>
+<span class="sourceLineNo">1833</span>    System.err.println(" oneCon          all the threads share the same connection. Default: False");<a name="line.1833"></a>
+<span class="sourceLineNo">1834</span>    System.err.println(" sampleRate      Execute test on a sample of total " +<a name="line.1834"></a>
+<span class="sourceLineNo">1835</span>      "rows. Only supported by randomRead. Default: 1.0");<a name="line.1835"></a>
+<span class="sourceLineNo">1836</span>    System.err.println(" period          Report every 'period' rows: " +<a name="line.1836"></a>
+<span class="sourceLineNo">1837</span>      "Default: opts.perClientRunRows / 10");<a name="line.1837"></a>
+<span class="sourceLineNo">1838</span>    System.err.println(" cycles          How many times to cycle the test. Defaults: 1.");<a name="line.1838"></a>
+<span class="sourceLineNo">1839</span>    System.err.println(" traceRate       Enable HTrace spans. Initiate tracing every N rows. " +<a name="line.1839"></a>
+<span class="sourceLineNo">1840</span>      "Default: 0");<a name="line.1840"></a>
+<span class="sourceLineNo">1841</span>    System.err.println(" latency         Set to report operation latencies. Default: False");<a name="line.1841"></a>
+<span class="sourceLineNo">1842</span>    System.err.println(" measureAfter    Start to measure the latency once 'measureAfter'" +<a name="line.1842"></a>
+<span class="sourceLineNo">1843</span>        " rows have been treated. Default: 0");<a name="line.1843"></a>
+<span class="sourceLineNo">1844</span>    System.err.println(" valueSize       Pass value size to use: Default: 1024");<a name="line.1844"></a>
+<span class="sourceLineNo">1845</span>    System.err.println(" valueRandom     Set if we should vary value size between 0 and " +<a name="line.1845"></a>
+<span class="sourceLineNo">1846</span>        "'valueSize'; set on read for stats on size: Default: Not set.");<a name="line.1846"></a>
+<span class="sourceLineNo">1847</span>    System.err.println();<a name="line.1847"></a>
+<span class="sourceLineNo">1848</span>    System.err.println("Table Creation / Write Tests:");<a name="line.1848"></a>
+<span class="sourceLineNo">1849</span>    System.err.println(" table           Alternate table name. Default: 'TestTable'");<a name="line.1849"></a>
+<span class="sourceLineNo">1850</span>    System.err.println(" rows            Rows each client runs. Default: One million");<a name="line.1850"></a>
+<span class="sourceLineNo">1851</span>    System.err.println(" size            Total size in GiB. Mutually exclusive with --rows. " +<a name="line.1851"></a>
+<span class="sourceLineNo">1852</span>      "Default: 1.0.");<a name="line.1852"></a>
+<span class="sourceLineNo">1853</span>    System.err.println(" compress        Compression type to use (GZ, LZO, ...). Default: 'NONE'");<a name="line.1853"></a>
+<span class="sourceLineNo">1854</span>    System.err.println(" flushCommits    Used to determine if the test should flush the table. " +<a name="line.1854"></a>
 <span class="sourceLineNo">1855</span>      "Default: false");<a name="line.1855"></a>
-<span class="sourceLineNo">1856</span>    System.err.println(" numoftags       Specify the no of tags that would be needed. " +<a name="line.1856"></a>
-<span class="sourceLineNo">1857</span>       "This works only if usetags is true.");<a name="line.1857"></a>
-<span class="sourceLineNo">1858</span>    System.err.println(" filterAll       Helps to filter out all the rows on the server side"<a name="line.1858"></a>
-<span class="sourceLineNo">1859</span>        + " there by not returning any thing back to the client.  Helps to check the server side"<a name="line.1859"></a>
-<span class="sourceLineNo">1860</span>        + " performance.  Uses FilterAllFilter internally. ");<a name="line.1860"></a>
-<span class="sourceLineNo">1861</span>    System.err.println(" latency         Set to report operation latencies. Default: False");<a name="line.1861"></a>
-<span class="sourceLineNo">1862</span>    System.err.println(" measureAfter    Start to measure the latency once 'measureAfter'" +<a name="line.1862"></a>
-<span class="sourceLineNo">1863</span>        " rows have been treated. Default: 0");<a name="line.1863"></a>
-<span class="sourceLineNo">1864</span>    System.err.println(" bloomFilter      Bloom filter type, one of " + Arrays.toString(BloomType.values()));<a name="line.1864"></a>
-<span class="sourceLineNo">1865</span>    System.err.println(" valueSize       Pass value size to use: Default: 1024");<a name="line.1865"></a>
-<span class="sourceLineNo">1866</span>    System.err.println(" valueRandom     Set if we should vary value size between 0 and " +<a name="line.1866"></a>
-<span class="sourceLineNo">1867</span>        "'valueSize'; set on read for stats on size: Default: Not set.");<a name="line.1867"></a>
-<span class="sourceLineNo">1868</span>    System.err.println(" valueZipf       Set if we should vary value size between 0 and " +<a name="line.1868"></a>
-<span class="sourceLineNo">1869</span>        "'valueSize' in zipf form: Default: Not set.");<a name="line.1869"></a>
-<span class="sourceLineNo">1870</span>    System.err.println(" period          Report every 'period' rows: " +<a name="line.1870"></a>
-<span class="sourceLineNo">1871</span>      "Default: opts.perClientRunRows / 10");<a name="line.1871"></a>
-<span class="sourceLineNo">1872</span>    System.err.println(" multiGet        Batch gets together into groups of N. Only supported " +<a name="line.1872"></a>
-<span class="sourceLineNo">1873</span>      "by randomRead. Default: disabled");<a name="line.1873"></a>
-<span class="sourceLineNo">1874</span>    System.err.println(" addColumns      Adds columns to scans/gets explicitly. Default: true");<a name="line.1874"></a>
-<span class="sourceLineNo">1875</span>    System.err.println(" replicas        Enable region replica testing. Defaults: 1.");<a name="line.1875"></a>
-<span class="sourceLineNo">1876</span>    System.err.println(" cycles          How many times to cycle the test. Defaults: 1.");<a name="line.1876"></a>
-<span class="sourceLineNo">1877</span>    System.err.println(" splitPolicy     Specify a custom RegionSplitPolicy for the table.");<a name="line.1877"></a>
-<span class="sourceLineNo">1878</span>    System.err.println(" randomSleep     Do a random sleep before each get between 0 and entered value. Defaults: 0");<a name="line.1878"></a>
-<span class="sourceLineNo">1879</span>    System.err.println(" columns         Columns to write per row. Default: 1");<a name="line.1879"></a>
-<span class="sourceLineNo">1880</span>    System.err.println(" caching         Scan caching to use. Default: 30");<a name="line.1880"></a>
-<span class="sourceLineNo">1881</span>    System.err.println();<a name="line.1881"></a>
-<span class="sourceLineNo">1882</span>    System.err.println(" Note: -D properties will be applied to the conf used. ");<a name="line.1882"></a>
-<span class="sourceLineNo">1883</span>    System.err.println("  For example: ");<a name="line.1883"></a>
-<span class="sourceLineNo">1884</span>    System.err.println("   -Dmapreduce.output.fileoutputformat.compress=true");<a name="line.1884"></a>
-<span class="sourceLineNo">1885</span>    System.err.println("   -Dmapreduce.task.timeout=60000");<a name="line.1885"></a>
-<span class="sourceLineNo">1886</span>    System.err.println();<a name="line.1886"></a>
-<span class="sourceLineNo">1887</span>    System.err.println("Command:");<a name="line.1887"></a>
-<span class="sourceLineNo">1888</span>    for (CmdDescriptor command : COMMANDS.values()) {<a name="line.1888"></a>
-<span class="sourceLineNo">1889</span>      System.err.println(String.format(" %-15s %s", command.getName(), command.getDescription()));<a name="line.1889"></a>
-<span class="sourceLineNo">1890</span>    }<a name="line.1890"></a>
-<span class="sourceLineNo">1891</span>    System.err.println();<a name="line.1891"></a>
-<span class="sourceLineNo">1892</span>    System.err.println("Args:");<a name="line.1892"></a>
-<span class="sourceLineNo">1893</span>    System.err.println(" nclients        Integer. Required. Total number of " +<a name="line.1893"></a>
-<span class="sourceLineNo">1894</span>      "clients (and HRegionServers)");<a name="line.1894"></a>
-<span class="sourceLineNo">1895</span>    System.err.println("                 running: 1 &lt;= value &lt;= 500");<a name="line.1895"></a>
-<span class="sourceLineNo">1896</span>    System.err.println("Examples:");<a name="line.1896"></a>
-<span class="sourceLineNo">1897</span>    System.err.println(" To run a single client doing the default 1M sequentialWrites:");<a name="line.1897"></a>
-<span class="sourceLineNo">1898</span>    System.err.println(" $ bin/hbase " + className + " sequentialWrite 1");<a name="line.1898"></a>
-<span class="sourceLineNo">1899</span>    System.err.println(" To run 10 clients doing increments over ten rows:");<a name="line.1899"></a>
-<span class="sourceLineNo">1900</span>    System.err.println(" $ bin/hbase " + className + " --rows=10 --nomapred increment 10");<a name="line.1900"></a>
-<span class="sourceLineNo">1901</span>  }<a name="line.1901"></a>
-<span class="sourceLineNo">1902</span><a name="line.1902"></a>
-<span class="sourceLineNo">1903</span>  /**<a name="line.1903"></a>
-<span class="sourceLineNo">1904</span>   * Parse options passed in via an arguments array. Assumes that array has been split<a name="line.1904"></a>
-<span class="sourceLineNo">1905</span>   * on white-space and placed into a {@code Queue}. Any unknown arguments will remain<a name="line.1905"></a>
-<span class="sourceLineNo">1906</span>   * in the queue at the conclusion of this method call. It's up to the caller to deal<a name="line.1906"></a>
-<span class="sourceLineNo">1907</span>   * with these unrecognized arguments.<a name="line.1907"></a>
-<span class="sourceLineNo">1908</span>   */<a name="line.1908"></a>
-<span class="sourceLineNo">1909</span>  static TestOptions parseOpts(Queue&lt;String&gt; args) {<a name="line.1909"></a>
-<span class="sourceLineNo">1910</span>    TestOptions opts = new TestOptions();<a name="line.1910"></a>
-<span class="sourceLineNo">1911</span><a name="line.1911"></a>
-<span class="sourceLineNo">1912</span>    String cmd = null;<a name="line.1912"></a>
-<span class="sourceLineNo">1913</span>    while ((cmd = args.poll()) != null) {<a name="line.1913"></a>
-<span class="sourceLineNo">1914</span>      if (cmd.equals("-h") || cmd.startsWith("--h")) {<a name="line.1914"></a>
-<span class="sourceLineNo">1915</span>        // place item back onto queue so that caller knows parsing was incomplete<a name="line.1915"></a>
-<span class="sourceLineNo">1916</span>        args.add(cmd);<a name="line.1916"></a>
-<span class="sourceLineNo">1917</span>        break;<a name="line.1917"></a>
-<span class="sourceLineNo">1918</span>      }<a name="line.1918"></a>
-<span class="sourceLineNo">1919</span><a name="line.1919"></a>
-<span class="sourceLineNo">1920</span>      final String nmr = "--nomapred";<a name="line.1920"></a>
-<span class="sourceLineNo">1921</span>      if (cmd.startsWith(nmr)) {<a name="line.1921"></a>
-<span class="sourceLineNo">1922</span>        opts.nomapred = true;<a name="line.1922"></a>
-<span class="sourceLineNo">1923</span>        continue;<a name="line.1923"></a>
-<span class="sourceLineNo">1924</span>      }<a name="line.1924"></a>
-<span class="sourceLineNo">1925</span><a name="line.1925"></a>
-<span class="sourceLineNo">1926</span>      final String rows = "--rows=";<a name="line.1926"></a>
-<span class="sourceLineNo">1927</span>      if (cmd.startsWith(rows)) {<a name="line.1927"></a>
-<span class="sourceLineNo">1928</span>        opts.perClientRunRows = Integer.parseInt(cmd.substring(rows.length()));<a name="line.1928"></a>
-<span class="sourceLineNo">1929</span>        continue;<a name="line.1929"></a>
-<span class="sourceLineNo">1930</span>      }<a name="line.1930"></a>
-<span class="sourceLineNo">1931</span><a name="line.1931"></a>
-<span class="sourceLineNo">1932</span>      final String cycles = "--cycles=";<a name="line.1932"></a>
-<span class="sourceLineNo">1933</span>      if (cmd.startsWith(cycles)) {<a name="line.1933"></a>
-<span class="sourceLineNo">1934</span>        opts.cycles = Integer.parseInt(cmd.substring(cycles.length()));<a name="line.1934"></a>
-<span class="sourceLineNo">1935</span>        continue;<a name="line.1935"></a>
-<span class="sourceLineNo">1936</span>      }<a name="line.1936"></a>
-<span class="sourceLineNo">1937</span><a name="line.1937"></a>
-<span class="sourceLineNo">1938</span>      final String sampleRate = "--sampleRate=";<a name="line.1938"></a>
-<span class="sourceLineNo">1939</span>      if (cmd.startsWith(sampleRate)) {<a name="line.1939"></a>
-<span class="sourceLineNo">1940</span>        opts.sampleRate = Float.parseFloat(cmd.substring(sampleRate.length()));<a name="line.1940"></a>
-<span class="sourceLineNo">1941</span>        continue;<a name="line.1941"></a>
-<span class="sourceLineNo">1942</span>      }<a name="line.1942"></a>
-<span class="sourceLineNo">1943</span><a name="line.1943"></a>
-<span class="sourceLineNo">1944</span>      final String table = "--table=";<a name="line.1944"></a>
-<span class="sourceLineNo">1945</span>      if (cmd.startsWith(table)) {<a name="line.1945"></a>
-<span class="sourceLineNo">1946</span>        opts.tableName = cmd.substring(table.length());<a name="line.1946"></a>
-<span class="sourceLineNo">1947</span>        continue;<a name="line.1947"></a>
-<span class="sourceLineNo">1948</span>      }<a name="line.1948"></a>
-<span class="sourceLineNo">1949</span><a name="line.1949"></a>
-<span class="sourceLineNo">1950</span>      final String startRow = "--startRow=";<a name="line.1950"></a>
-<span class="sourceLineNo">1951</span>      if (cmd.startsWith(startRow)) {<a name="line.1951"></a>
-<span class="sourceLineNo">1952</span>        opts.startRow = Integer.parseInt(cmd.substring(startRow.length()));<a name="line.1952"></a>
-<span class="sourceLineNo">1953</span>        continue;<a name="line.1953"></a>
-<span class="sourceLineNo">1954</span>      }<a name="line.1954"></a>
-<span class="sourceLineNo">1955</span><a name="line.1955"></a>
-<span class="sourceLineNo">1956</span>      final String compress = "--compress=";<a name="line.1956"></a>
-<span class="sourceLineNo">1957</span>      if (cmd.startsWith(compress)) {<a name="line.1957"></a>
-<span class="sourceLineNo">1958</span>        opts.compression = Compression.Algorithm.valueOf(cmd.substring(compress.length()));<a name="line.1958"></a>
-<span class="sourceLineNo">1959</span>        continue;<a name="line.1959"></a>
-<span class="sourceLineNo">1960</span>      }<a name="line.1960"></a>
-<span class="sourceLineNo">1961</span><a name="line.1961"></a>
-<span class="sourceLineNo">1962</span>      final String traceRate = "--traceRate=";<a name="line.1962"></a>
-<span class="sourceLineNo">1963</span>      if (cmd.startsWith(traceRate)) {<a name="line.1963"></a>
-<span class="sourceLineNo">1964</span>        opts.traceRate = Double.parseDouble(cmd.substring(traceRate.length()));<a name="line.1964"></a>
-<span class="sourceLineNo">1965</span>        continue;<a name="line.1965"></a>
-<span class="sourceLineNo">1966</span>      }<a name="line.1966"></a>
-<span class="sourceLineNo">1967</span><a name="line.1967"></a>
-<span class="sourceLineNo">1968</span>      final String blockEncoding = "--blockEncoding=";<a name="line.1968"></a>
-<span class="sourceLineNo">1969</span>      if (cmd.startsWith(blockEncoding)) {<a name="line.1969"></a>
-<span class="sourceLineNo">1970</span>        opts.blockEncoding = DataBlockEncoding.valueOf(cmd.substring(blockEncoding.length()));<a name="line.1970"></a>
-<span class="sourceLineNo">1971</span>        continue;<a name="line.1971"></a>
-<span class="sourceLineNo">1972</span>      }<a name="line.1972"></a>
-<span class="sourceLineNo">1973</span><a name="line.1973"></a>
-<span class="sourceLineNo">1974</span>      final String flushCommits = "--flushCommits=";<a name="line.1974"></a>
-<span class="sourceLineNo">1975</span>      if (cmd.startsWith(flushCommits)) {<a name="line.1975"></a>
-<span class="sourceLineNo">1976</span>        opts.flushCommits = Boolean.parseBoolean(cmd.substring(flushCommits.length()));<a name="line.1976"></a>
-<span class="sourceLineNo">1977</span>        continue;<a name="line.1977"></a>
-<span class="sourceLineNo">1978</span>      }<a name="line.1978"></a>
-<span class="sourceLineNo">1979</span><a name="line.1979"></a>
-<span class="sourceLineNo">1980</span>      final String writeToWAL = "--writeToWAL=";<a name="line.1980"></a>
-<span class="sourceLineNo">1981</span>      if (cmd.startsWith(writeToWAL)) {<a name="line.1981"></a>
-<span class="sourceLineNo">1982</span>        opts.writeToWAL = Boolean.parseBoolean(cmd.substring(writeToWAL.length()));<a name="line.1982"></a>
-<span class="sourceLineNo">1983</span>        continue;<a name="line.1983"></a>
-<span class="sourceLineNo">1984</span>      }<a name="line.1984"></a>
-<span class="sourceLineNo">1985</span><a name="line.1985"></a>
-<span class="sourceLineNo">1986</span>      final String presplit = "--presplit=";<a name="line.1986"></a>
-<span class="sourceLineNo">1987</span>      if (cmd.startsWith(presplit)) {<a name="line.1987"></a>
-<span class="sourceLineNo">1988</span>        opts.presplitRegions = Integer.parseInt(cmd.substring(presplit.length()));<a name="line.1988"></a>
-<span class="sourceLineNo">1989</span>        continue;<a name="line.1989"></a>
-<span class="sourceLineNo">1990</span>      }<a name="line.1990"></a>
-<span class="sourceLineNo">1991</span><a name="line.1991"></a>
-<span class="sourceLineNo">1992</span>      final String inMemory = "--inmemory=";<a name="line.1992"></a>
-<span class="sourceLineNo">1993</span>      if (cmd.startsWith(inMemory)) {<a name="line.1993"></a>
-<span class="sourceLineNo">1994</span>        opts.inMemoryCF = Boolean.parseBoolean(cmd.substring(inMemory.length()));<a name="line.1994"></a>
-<span class="sourceLineNo">1995</span>        continue;<a name="line.1995"></a>
-<span class="sourceLineNo">1996</span>      }<a name="line.1996"></a>
-<span class="sourceLineNo">1997</span><a name="line.1997"></a>
-<span class="sourceLineNo">1998</span>      final String autoFlush = "--autoFlush=";<a name="line.1998"></a>
-<span class="sourceLineNo">1999</span>      if (cmd.startsWith(autoFlush)) {<a name="line.1999"></a>
-<span class="sourceLineNo">2000</span>        opts.autoFlush = Boolean.parseBoolean(cmd.substring(autoFlush.length()));<a name="line.2000"></a>
-<span class="sourceLineNo">2001</span>        continue;<a name="line.2001"></a>
-<span class="sourceLineNo">2002</span>      }<a name="line.2002"></a>
-<span class="sourceLineNo">2003</span><a name="line.2003"></a>
-<span class="sourceLineNo">2004</span>      final String onceCon = "--oneCon=";<a name="line.2004"></a>
-<span class="sourceLineNo">2005</span>      if (cmd.startsWith(onceCon)) {<a name="line.2005"></a>
-<span class="sourceLineNo">2006</span>        opts.oneCon = Boolean.parseBoolean(cmd.substring(onceCon.length()));<a name="line.2006"></a>
-<span class="sourceLineNo">2007</span>        continue;<a name="line.2007"></a>
-<span class="sourceLineNo">2008</span>      }<a name="line.2008"></a>
-<span class="sourceLineNo">2009</span><a name="line.2009"></a>
-<span class="sourceLineNo">2010</span>      final String latency = "--latency";<a name="line.2010"></a>
-<span class="sourceLineNo">2011</span>      if (cmd.startsWith(latency)) {<a name="line.2011"></a>
-<span class="sourceLineNo">2012</span>        opts.reportLatency = true;<a name="line.2012"></a>
-<span class="sourceLineNo">2013</span>        continue;<a name="line.2013"></a>
-<span class="sourceLineNo">2014</span>      }<a name="line.2014"></a>
-<span class="sourceLineNo">2015</span><a name="line.2015"></a>
-<span class="sourceLineNo">2016</span>      final String multiGet = "--multiGet=";<a name="line.2016"></a>
-<span class="sourceLineNo">2017</span>      if (cmd.startsWith(multiGet)) {<a name="line.2017"></a>
-<span class="sourceLineNo">2018</span>        opts.multiGet = Integer.parseInt(cmd.substring(multiGet.length()));<a name="line.2018"></a>
-<span class="sourceLineNo">2019</span>        continue;<a name="line.2019"></a>
-<span class="sourceLineNo">2020</span>      }<a name="line.2020"></a>
-<span class="sourceLineNo">2021</span><a name="line.2021"></a>
-<span class="sourceLineNo">2022</span>      final String useTags = "--usetags=";<a name="line.2022"></a>
-<span class="sourceLineNo">2023</span>      if (cmd.startsWith(useTags)) {<a name="line.2023"></a>
-<span class="sourceLineNo">2024</span>        opts.useTags = Boolean.parseBoolean(cmd.substring(useTags.length()));<a name="line.2024"></a>
-<span class="sourceLineNo">2025</span>        continue;<a name="line.2025"></a>
-<span class="sourceLineNo">2026</span>      }<a name="line.2026"></a>
-<span class="sourceLineNo">2027</span><a name="line.2027"></a>
-<span class="sourceLineNo">2028</span>      final String noOfTags = "--numoftags=";<a name="line.2028"></a>
-<span class="sourceLineNo">2029</span>      if (cmd.startsWith(noOfTags)) {<a name="line.2029"></a>
-<span class="sourceLineNo">2030</span>        opts.noOfTags = Integer.parseInt(cmd.substring(noOfTags.length()));<a name="line.2030"></a>
-<span class="sourceLineNo">2031</span>        continue;<a name="line.2031"></a>
-<span class="sourceLineNo">2032</span>      }<a name="line.2032"></a>
-<span class="sourceLineNo">2033</span><a name="line.2033"></a>
-<span class="sourceLineNo">2034</span>      final String replicas = "--replicas=";<a name="line.2034"></a>
-<span class="sourceLineNo">2035</span>      if (cmd.startsWith(replicas)) {<a name="line.2035"></a>
-<span class="sourceLineNo">2036</span>        opts.replicas = Integer.parseInt(cmd.substring(replicas.length()));<a name="line.2036"></a>
-<span class="sourceLineNo">2037</span>        continue;<a name="line.2037"></a>
-<span class="sourceLineNo">2038</span>      }<a name="line.2038"></a>
-<span class="sourceLineNo">2039</span><a name="line.2039"></a>
-<span class="sourceLineNo">2040</span>      final String filterOutAll = "--filterAll";<a name="line.2040"></a>
-<span class="sourceLineNo">2041</span>      if (cmd.startsWith(filterOutAll)) {<a name="line.2041"></a>
-<span class="sourceLineNo">2042</span>        opts.filterAll = true;<a name="line.2042"></a>
-<span class="sourceLineNo">2043</span>        continue;<a name="line.2043"></a>
-<span class="sourceLineNo">2044</span>      }<a name="line.2044"></a>
-<span class="sourceLineNo">2045</span><a name="line.2045"></a>
-<span class="sourceLineNo">2046</span>      final String size = "--size=";<a name="line.2046"></a>
-<span class="sourceLineNo">2047</span>      if (cmd.startsWith(size)) {<a name="line.2047"></a>
-<span class="sourceLineNo">2048</span>        opts.size = Float.parseFloat(cmd.substring(size.length()));<a name="line.2048"></a>
-<span class="sourceLineNo">2049</span>        if (opts.size &lt;= 1.0f) throw new IllegalStateException("Size must be &gt; 1; i.e. 1GB");<a name="line.2049"></a>
-<span class="sourceLineNo">2050</span>        continue;<a name="line.2050"></a>
-<span class="sourceLineNo">2051</span>      }<a name="line.2051"></a>
-<span class="sourceLineNo">2052</span><a name="line.2052"></a>
-<span class="sourceLineNo">2053</span>      final String splitPolicy = "--splitPolicy=";<a name="line.2053"></a>
-<span class="sourceLineNo">2054</span>      if (cmd.startsWith(splitPolicy)) {<a name="line.2054"></a>
-<span class="sourceLineNo">2055</span>        opts.splitPolicy = cmd.substring(splitPolicy.length());<a name="line.2055"></a>
-<span class="sourceLineNo">2056</span>        continue;<a name="line.2056"></a>
-<span class="sourceLineNo">2057</span>      }<a name="line.2057"></a>
-<span class="sourceLineNo">2058</span><a name="line.2058"></a>
-<span class="sourceLineNo">2059</span>      final String randomSleep = "--randomSleep=";<a name="line.2059"></a>
-<span class="sourceLineNo">2060</span>      if (cmd.startsWith(randomSleep)) {<a name="line.2060"></a>
-<span class="sourceLineNo">2061</span>        opts.randomSleep = Integer.parseInt(cmd.substring(randomSleep.length()));<a name="line.2061"></a>
-<span class="sourceLineNo">2062</span>        continue;<a name="line.2062"></a>
-<span class="sourceLineNo">2063</span>      }<a name="line.2063"></a>
-<span class="sourceLineNo">2064</span><a name="line.2064"></a>
-<span class="sourceLineNo">2065</span>      final String measureAfter = "--measureAfter=";<a name="line.2065"></a>
-<span class="sourceLineNo">2066</span>      if (cmd.startsWith(measureAfter)) {<a name="line.2066"></a>
-<span class="sourceLineNo">2067</span>        opts.measureAfter = Integer.parseInt(cmd.substring(measureAfter.length()));<a name="line.2067"></a>
-<span class="sourceLineNo">2068</span>        continue;<a name="line.2068"></a>
-<span class="sourceLineNo">2069</span>      }<a name="line.2069"></a>
-<span class="sourceLineNo">2070</span><a name="line.2070"></a>
-<span class="sourceLineNo">2071</span>      final String bloomFilter = "--bloomFilter=";<a name="line.2071"></a>
-<span class="sourceLineNo">2072</span>      if (cmd.startsWith(bloomFilter)) {<a name="line.2072"></a>
-<span class="sourceLineNo">2073</span>        opts.bloomType = BloomType.valueOf(cmd.substring(bloomFilter.length()));<a name="line.2073"></a>
-<span class="sourceLineNo">2074</span>        continue;<a name="line.2074"></a>
-<span class="sourceLineNo">2075</span>      }<a name="line.2075"></a>
-<span class="sourceLineNo">2076</span><a name="line.2076"></a>
-<span class="sourceLineNo">2077</span>      final String valueSize = "--valueSize=";<a name="line.2077"></a>
-<span class="sourceLineNo">2078</span>      if (cmd.startsWith(valueSize)) {<a name="line.2078"></a>
-<span class="sourceLineNo">2079</span>        opts.valueSize = Integer.parseInt(cmd.substring(valueSize.length()));<a name="line.2079"></a>
-<span class="sourceLineNo">2080</span>        continue;<a name="line.2080"></a>
-<span class="sourceLineNo">2081</span>      }<a name="line.2081"></a>
-<span class="sourceLineNo">2082</span><a name="line.2082"></a>
-<span class="sourceLineNo">2083</span>      final String valueRandom = "--valueRandom";<a name="line.2083"></a>
-<span class="sourceLineNo">2084</span>      if (cmd.startsWith(valueRandom)) {<a name="line.2084"></a>
-<span class="sourceLineNo">2085</span>        opts.valueRandom = true;<a name="line.2085"></a>
-<span class="sourceLineNo">2086</span>        if (opts.valueZipf) {<a name="line.2086"></a>
-<span class="sourceLineNo">2087</span>          throw new IllegalStateException("Either valueZipf or valueRandom but not both");<a name="line.2087"></a>
-<span class="sourceLineNo">2088</span>        }<a name="line.2088"></a>
-<span class="sourceLineNo">2089</span>        continue;<a name="line.2089"></a>
-<span class="sourceLineNo">2090</span>      }<a name="line.2090"></a>
-<span class="sourceLineNo">2091</span><a name="line.2091"></a>
-<span class="sourceLineNo">2092</span>      final String valueZipf = "--valueZipf";<a name="line.2092"></a>
-<span class="sourceLineNo">2093</span>      if (cmd.startsWith(valueZipf)) {<a name="line.2093"></a>
-<span class="sourceLineNo">2094</span>        opts.valueZipf = true;<a name="line.2094"></a>
-<span class="sourceLineNo">2095</span>        if (opts.valueRandom) {<a name="line.2095"></a>
-<span class="sourceLineNo">2096</span>          throw new IllegalStateException("Either valueZipf or valueRandom but not both");<a name="line.2096"></a>
-<span class="sourceLineNo">2097</span>        }<a name="line.2097"></a>
-<span class="sourceLineNo">2098</span>        continue;<a name="line.2098"></a>
-<span class="sourceLineNo">2099</span>      }<a name="line.2099"></a>
-<span class="sourceLineNo">2100</span><a name="line.2100"></a>
-<span class="sourceLineNo">2101</span>      final String period = "--period=";<a name="line.2101"></a>
-<span class="sourceLineNo">2102</span>      if (cmd.startsWith(period)) {<a name="line.2102"></a>
-<span class="sourceLineNo">2103</span>        opts.period = Integer.parseInt(cmd.substring(period.length()));<a name="line.2103"></a>
-<span class="sourceLineNo">2104</span>        continue;<a name="line.2104"></a>
-<span class="sourceLineNo">2105</span>      }<a name="line.2105"></a>
-<span class="sourceLineNo">2106</span><a name="line.2106"></a>
-<span class="sourceLineNo">2107</span>      final String addColumns = "--addColumns=";<a name="line.2107"></a>
-<span class="sourceLineNo">2108</span>      if (cmd.startsWith(addColumns)) {<a name="line.2108"></a>
-<span class="sourceLineNo">2109</span>        opts.addColumns = Boolean.parseBoolean(cmd.substring(addColumns.length()));<a name="line.2109"></a>
-<span class="sourceLineNo">2110</span>        continue;<a name="line.2110"></a>
-<span class="sourceLineNo">2111</span>      }<a name="line.2111"></a>
-<span class="sourceLineNo">2112</span><a name="line.2112"></a>
-<span class="sourceLineNo">2113</span>      final String columns = "--columns=";<a name="line.2113"></a>
-<span class="sourceLineNo">2114</span>      if (cmd.startsWith(columns)) {<a name="line.2114"></a>
-<span class="sourceLineNo">2115</span>        opts.columns = Integer.parseInt(cmd.substring(columns.length()));<a name="line.2115"></a>
-<span class="sourceLineNo">2116</span>        continue;<a name="line.2116"></a>
-<span class="sourceLineNo">2117</span>      }<a name="line.2117"></a>
-<span class="sourceLineNo">2118</span><a name="line.2118"></a>
-<span class="sourceLineNo">2119</span>      final String caching = "--caching=";<a name="line.2119"></a>
-<span class="sourceLineNo">2120</span>      if (cmd.startsWith(caching)) {<a name="line.2120"></a>
-<span class="sourceLineNo">2121</span>        opts.caching = Integer.parseInt(cmd.substring(caching.length()));<a name="line.2121"></a>
-<span class="sourceLineNo">2122</span>        continue;<a name="line.2122"></a>
-<span class="sourceLineNo">2123</span>      }<a name="line.2123"></a>
-<span class="sourceLineNo">2124</span><a name="line.2124"></a>
-<span class="sourceLineNo">2125</span>      if (isCommandClass(cmd)) {<a name="line.2125"></a>
-<span class="sourceLineNo">2126</span>        opts.cmdName = cmd;<a name="line.2126"></a>
-<span class="sourceLineNo">2127</span>        opts.numClientThreads = Integer.parseInt(args.remove());<a name="line.2127"></a>
-<span class="sourceLineNo">2128</span>        if (opts.size != DEFAULT_OPTS.size &amp;&amp;<a name="line.2128"></a>
-<span class="sourceLineNo">2129</span>            opts.perClientRunRows != DEFAULT_OPTS.perClientRunRows) {<a name="line.2129"></a>
-<span class="sourceLineNo">2130</span>          throw new IllegalArgumentException(rows + " and " + size +<a name="line.2130"></a>
-<span class="sourceLineNo">2131</span>            " are mutually exclusive options");<a name="line.2131"></a>
-<span class="sourceLineNo">2132</span>        }<a name="line.2132"></a>
-<span class="sourceLineNo">2133</span>        opts = calculateRowsAndSize(opts);<a name="line.2133"></a>
-<span class="sourceLineNo">2134</span>        break;<a name="line.2134"></a>
-<span class="sourceLineNo">2135</span>      } else {<a name="line.2135"></a>
-<span class="sourceLineNo">2136</span>        printUsageAndExit("ERROR: Unrecognized option/command: " + cmd, -1);<a name="line.2136"></a>
-<span class="sourceLineNo">2137</span>      }<a name="line.2137"></a>
-<span class="sourceLineNo">2138</span><a name="line.2138"></a>
-<span class="sourceLineNo">2139</span>      // Not matching any option or command.<a name="line.2139"></a>
-<span class="sourceLineNo">2140</span>      System.err.println("Error: Wrong option or command: " + cmd);<a name="line.2140"></a>
-<span class="sourceLineNo">2141</span>      args.add(cmd);<a name="line.2141"></a>
-<span class="sourceLineNo">2142</span>      break;<a name="line.2142"></a>
-<span class="sourceLineNo">2143</span>    }<a name="line.2143"></a>
-<span class="sourceLineNo">2144</span>    return opts;<a name="line.2144"></a>
-<span class="sourceLineNo">2145</span>  }<a name="line.2145"></a>
-<span class="sourceLineNo">2146</span><a name="line.2146"></a>
-<span class="sourceLineNo">2147</span>  static TestOptions calculateRowsAndSize(final TestOptions opts) {<a name="line.2147"></a>
-<span class="sourceLineNo">2148</span>    int rowsPerGB = getRowsPerGB(opts);<a name="line.2148"></a>
-<span class="sourceLineNo">2149</span>    if (opts.size != DEFAULT_OPTS.size) {<a name="line.2149"></a>
-<span class="sourceLineNo">2150</span>      // total size in GB specified<a name="line.2150"></a>
-<span class="sourceLineNo">2151</span>      opts.totalRows = (int) opts.size * rowsPerGB;<a name="line.2151"></a>
-<span class="sourceLineNo">2152</span>      opts.perClientRunRows = opts.totalRows / opts.numClientThreads;<a name="line.2152"></a>
-<span class="sourceLineNo">2153</span>    } else if (opts.perClientRunRows != DEFAULT_OPTS.perClientRunRows) {<a name="line.2153"></a>
-<span class="sourceLineNo">2154</span>      // number of rows specified<a name="line.2154"></a>
-<span class="sourceLineNo">2155</span>      opts.totalRows = opts.perClientRunRows * opts.numClientThreads;<a name="line.2155"></a>
-<span class="sourceLineNo">2156</span>      opts.size = opts.totalRows / rowsPerGB;<a name="line.2156"></a>
-<span class="sourceLineNo">2157</span>    }<a name="line.2157"></a>
-<span class="sourceLineNo">2158</span>    return opts;<a name="line.2158"></a>
-<span class="sourceLineNo">2159</span>  }<a name="line.2159"></a>
-<span class="sourceLineNo">2160</span><a name="line.2160"></a>
-<span class="sourceLineNo">2161</span>  static int getRowsPerGB(final TestOptions opts) {<a name="line.2161"></a>
-<span class="sourceLineNo">2162</span>    return ONE_GB / ((opts.valueRandom? opts.valueSize/2: opts.valueSize) * opts.getColumns());<a name="line.2162"></a>
-<span class="sourceLineNo">2163</span>  }<a name="line.2163"></a>
-<span class="sourceLineNo">2164</span><a name="line.2164"></a>
-<span class="sourceLineNo">2165</span>  @Override<a name="line.2165"></a>
-<span class="sourceLineNo">2166</span>  public int run(String[] args) throws Exception {<a name="line.2166"></a>
-<span class="sourceLineNo">2167</span>    // Process command-line args. TODO: Better cmd-line processing<a name="line.2167"></a>
-<span class="sourceLineNo">2168</span>    // (but hopefully something not as painful as cli options).<a name="line.2168"></a>
-<span class="sourceLineNo">2169</span>    int errCode = -1;<a name="line.2169"></a>
-<span class="sourceLineNo">2170</span>    if (args.length &lt; 1) {<a name="line.2170"></a>
-<span class="sourceLineNo">2171</span>      printUsage();<a name="line.2171"></a>
-<span class="sourceLineNo">2172</span>      return errCode;<a name="line.2172"></a>
-<span class="sourceLineNo">2173</span>    }<a name="line.2173"></a>
-<span class="sourceLineNo">2174</span><a name="line.2174"></a>
-<span class="sourceLineNo">2175</span>    try {<a name="line.2175"></a>
-<span class="sourceLineNo">2176</span>      LinkedList&lt;String&gt; argv = new LinkedList&lt;String&gt;();<a name="line.2176"></a>
-<span class="sourceLineNo">2177</span>      argv.addAll(Arrays.asList(args));<a name="line.2177"></a>
-<span class="sourceLineNo">2178</span>      TestOptions opts = parseOpts(argv);<a name="line.2178"></a>
-<span class="sourceLineNo">2179</span><a name="line.2179"></a>
-<span class="sourceLineNo">2180</span>      // args remaining, print help and exit<a name="line.2180"></a>
-<span class="sourceLineNo">2181</span>      if (!argv.isEmpty()) {<a name="line.2181"></a>
-<span class="sourceLineNo">2182</span>        errCode = 0;<a name="line.2182"></a>
-<span class="sourceLineNo">2183</span>        printUsage();<a name="line.2183"></a>
-<span class="sourceLineNo">2184</span>        return errCode;<a name="line.2184"></a>
-<span class="sourceLineNo">2185</span>      }<a name="line.2185"></a>
-<span class="sourceLineNo">2186</span><a name="line.2186"></a>
-<span class="sourceLineNo">2187</span>      // must run at least 1 client<a name="line.2187"></a>
-<span class="sourceLineNo">2188</span>      if (opts.numClientThreads &lt;= 0) {<a name="line.2188"></a>
-<span class="sourceLineNo">2189</span>        throw new IllegalArgumentException("Number of clients must be &gt; 0");<a name="line.2189"></a>
-<span class="sourceLineNo">2190</span>      }<a name="line.2190"></a>
-<span class="sourceLineNo">2191</span><a name="line.2191"></a>
-<span class="sourceLineNo">2192</span>      Class&lt;? extends Test&gt; cmdClass = determineCommandClass(opts.cmdName);<a name="line.2192"></a>
-<span class="sourceLineNo">2193</span>      if (cmdClass != null) {<a name="line.2193"></a>
-<span class="sourceLineNo">2194</span>        runTest(cmdClass, opts);<a name="line.2194"></a>
-<span class="sourceLineNo">2195</span>        errCode = 0;<a name="line.2195"></a>
-<span class="sourceLineNo">2196</span>      }<a name="line.2196"></a>
-<span class="sourceLineNo">2197</span><a name="line.2197"></a>
-<span class="sourceLineNo">2198</span>    } catch (Exception e) {<a name="line.2198"></a>
-<span class="sourceLineNo">2199</span>      e.printStackTrace();<a name="line.2199"></a>
-<span class="sourceLineNo">2200</span>    }<a name="line.2200"></a>
-<span class="sourceLineNo">2201</span><a name="line.2201"></a>
-<span class="sourceLineNo">2202</span>    return errCode;<a name="line.2202"></a>
-<span class="sourceLineNo">2203</span>  }<a name="line.2203"></a>
-<span class="sourceLineNo">2204</span><a name="line.2204"></a>
-<span class="sourceLineNo">2205</span>  private static boolean isCommandClass(String cmd) {<a name="line.2205"></a>
-<span class="sourceLineNo">2206</span>    return COMMANDS.containsKey(cmd);<a name="line.2206"></a>
-<span class="sourceLineNo">2207</span>  }<a name="line.2207"></a>
-<span class="sourceLineNo">2208</span><a name="line.2208"></a>
-<span class="sourceLineNo">2209</span>  private static Class&lt;? extends Test&gt; determineCommandClass(String cmd) {<a name="line.2209"></a>
-<span class="sourceLineNo">2210</span>    CmdDescriptor descriptor = COMMANDS.get(cmd);<a name="line.2210"></a>
-<span class="sourceLineNo">2211</span>    return descriptor != null ? descriptor.getCmdClass() : null;<a name="line.2211"></a>
-<span class="sourceLineNo">2212</span>  }<a name="line.2212"></a>
-<span class="sourceLineNo">2213</span><a name="line.2213"></a>
-<span class="sourceLineNo">2214</span>  public static void main(final String[] args) throws Exception {<a name="line.2214"></a>
-<span class="sourceLineNo">2215</span>    int res = ToolRunner.run(new PerformanceEvaluation(HBaseConfiguration.create()), args);<a name="line.2215"></a>
-<span class="sourceLineNo">2216</span>    System.exit(res);<a name="line.2216"></a>
-<span class="sourceLineNo">2217</span>  }<a name="line.2217"></a>
-<span class="sourceLineNo">2218</span>}<a name="line.2218"></a>
+<span class="sourceLineNo">1856</span>    System.err.println(" valueZipf       Set if we should vary value size between 0 and " +<a name="line.1856"></a>
+<span class="sourceLineNo">1857</span>        "'valueSize' in zipf form: Default: Not set.");<a name="line.1857"></a>
+<span class="sourceLineNo">1858</span>    System.err.println(" writeToWAL      Set writeToWAL on puts. Default: True");<a name="line.1858"></a>
+<span class="sourceLineNo">1859</span>    System.err.println(" autoFlush       Set autoFlush on htable. Default: False");<a name="line.1859"></a>
+<span class="sourceLineNo">1860</span>    System.err.println(" presplit        Create presplit table. Recommended for accurate perf " +<a name="line.1860"></a>
+<span class="sourceLineNo">1861</span>      "analysis (see guide).  Default: disabled");<a name="line.1861"></a>
+<span class="sourceLineNo">1862</span>    System.err.println(" usetags         Writes tags along with KVs. Use with HFile V3. " +<a name="line.1862"></a>
+<span class="sourceLineNo">1863</span>      "Default: false");<a name="line.1863"></a>
+<span class="sourceLineNo">1864</span>    System.err.println(" numoftags       Specify the no of tags that would be needed. " +<a name="line.1864"></a>
+<span class="sourceLineNo">1865</span>       "This works only if usetags is true.");<a name="line.1865"></a>
+<span class="sourceLineNo">1866</span>    System.err.println(" splitPolicy     Specify a custom RegionSplitPolicy for the table.");<a name="line.1866"></a>
+<span class="sourceLineNo">1867</span>    System.err.println(" columns         Columns to write per row. Default: 1");<a name="line.1867"></a>
+<span class="sourceLineNo">1868</span>    System.err.println();<a name="line.1868"></a>
+<span class="sourceLineNo">1869</span>    System.err.println("Read Tests:");<a name="line.1869"></a>
+<span class="sourceLineNo">1870</span>    System.err.println(" filterAll       Helps to filter out all the rows on the server side"<a name="line.1870"></a>
+<span class="sourceLineNo">1871</span>        + " there by not returning any thing back to the client.  Helps to check the server side"<a name="line.1871"></a>
+<span class="sourceLineNo">1872</span>        + " performance.  Uses FilterAllFilter internally. ");<a name="line.1872"></a>
+<span class="sourceLineNo">1873</span>    System.err.println(" multiGet        Batch gets together into groups of N. Only supported " +<a name="line.1873"></a>
+<span class="sourceLineNo">1874</span>      "by randomRead. Default: disabled");<a name="line.1874"></a>
+<span class="sourceLineNo">1875</span>    System.err.println(" inmemory        Tries to keep the HFiles of the CF " +<a name="line.1875"></a>
+<span class="sourceLineNo">1876</span>      "inmemory as far as possible. Not guaranteed that reads are always served " +<a name="line.1876"></a>
+<span class="sourceLineNo">1877</span>      "from memory.  Default: false");<a name="line.1877"></a>
+<span class="sourceLineNo">1878</span>    System.err.println(" bloomFilter      Bloom filter type, one of " + Arrays.toString(BloomType.values()));<a name="line.1878"></a>
+<span class="sourceLineNo">1879</span>    System.err.println(" addColumns      Adds columns to scans/gets explicitly. Default: true");<a name="line.1879"></a>
+<span class="sourceLineNo">1880</span>    System.err.println(" replicas        Enable region replica testing. Defaults: 1.");<a name="line.1880"></a>
+<span class="sourceLineNo">1881</span>    System.err.println(" randomSleep     Do a random sleep before each get between 0 and entered value. Defaults: 0");<a name="line.1881"></a>
+<span class="sourceLineNo">1882</span>    System.err.println(" caching         Scan caching to use. Default: 30");<a name="line.1882"></a>
+<span class="sourceLineNo">1883</span>    System.err.println();<a name="line.1883"></a>
+<span class="sourceLineNo">1884</span>    System.err.println(" Note: -D properties will be applied to the conf used. ");<a name="line.1884"></a>
+<span class="sourceLineNo">1885</span>    System.err.println("  For example: ");<a name="line.1885"></a>
+<span class="sourceLineNo">1886</span>    System.err.println("   -Dmapreduce.output.fileoutputformat.compress=true");<a name="line.1886"></a>
+<span class="sourceLineNo">1887</span>    System.err.println("   -Dmapreduce.task.timeout=60000");<a name="line.1887"></a>
+<span class="sourceLineNo">1888</span>    System.err.println();<a name="line.1888"></a>
+<span class="sourceLineNo">1889</span>    System.err.println("Command:");<a name="line.1889"></a>
+<span class="sourceLineNo">1890</span>    for (CmdDescriptor command : COMMANDS.values()) {<a name="line.1890"></a>
+<span class="sourceLineNo">1891</span>      System.err.println(String.format(" %-15s %s", command.getName(), command.getDescription()));<a name="line.1891"></a>
+<span class="sourceLineNo">1892</span>    }<a name="line.1892"></a>
+<span class="sourceLineNo">1893</span>    System.err.println();<a name="line.1893"></a>
+<span class="sourceLineNo">1894</span>    System.err.println("Args:");<a name="line.1894"></a>
+<span class="sourceLineNo">1895</span>    System.err.println(" nclients        Integer. Required. Total number of " +<a name="line.1895"></a>
+<span class="sourceLineNo">1896</span>      "clients (and HRegionServers)");<a name="line.1896"></a>
+<span class="sourceLineNo">1897</span>    System.err.println("                 running: 1 &lt;= value &lt;= 500");<a name="line.1897"></a>
+<span class="sourceLineNo">1898</span>    System.err.println("Examples:");<a name="line.1898"></a>
+<span class="sourceLineNo">1899</span>    System.err.println(" To run a single client doing the default 1M sequentialWrites:");<a name="line.1899"></a>
+<span class="sourceLineNo">1900</span>    System.err.println(" $ bin/hbase " + className + " sequentialWrite 1");<a name="line.1900"></a>
+<span class="sourceLineNo">1901</span>    System.err.println(" To run 10 clients doing increments over ten rows:");<a name="line.1901"></a>
+<span class="sourceLineNo">1902</span>    System.err.println(" $ bin/hbase " + className + " --rows=10 --nomapred increment 10");<a name="line.1902"></a>
+<span class="sourceLineNo">1903</span>  }<a name="line.1903"></a>
+<span class="sourceLineNo">1904</span><a name="line.1904"></a>
+<span class="sourceLineNo">1905</span>  /**<a name="line.1905"></a>
+<span class="sourceLineNo">1906</span>   * Parse options passed in via an arguments array. Assumes that array has been split<a name="line.1906"></a>
+<span class="sourceLineNo">1907</span>   * on white-space and placed into a {@code Queue}. Any unknown arguments will remain<a name="line.1907"></a>
+<span class="sourceLineNo">1908</span>   * in the queue at the conclusion of this method call. It's up to the caller to deal<a name="line.1908"></a>
+<span class="sourceLineNo">1909</span>   * with these unrecognized arguments.<a name="line.1909"></a>
+<span class="sourceLineNo">1910</span>   */<a name="line.1910"></a>
+<span class="sourceLineNo">1911</span>  static TestOptions parseOpts(Queue&lt;String&gt; args) {<a name="line.1911"></a>
+<span class="sourceLineNo">1912</span>    TestOptions opts = new TestOptions();<a name="line.1912"></a>
+<span class="sourceLineNo">1913</span><a name="line.1913"></a>
+<span class="sourceLineNo">1914</span>    String cmd = null;<a name="line.1914"></a>
+<span class="sourceLineNo">1915</span>    while ((cmd = args.poll()) != null) {<a name="line.1915"></a>
+<span class="sourceLineNo">1916</span>      if (cmd.equals("-h") || cmd.startsWith("--h")) {<a name="line.1916"></a>
+<span class="sourceLineNo">1917</span>        // place item back onto queue so that caller knows parsing was incomplete<a name="line.1917"></a>
+<span class="sourceLineNo">1918</span>        args.add(cmd);<a name="line.1918"></a>
+<span class="sourceLineNo">1919</span>        break;<a name="line.1919"></a>
+<span class="sourceLineNo">1920</span>      }<a name="line.1920"></a>
+<span class="sourceLineNo">1921</span><a name="line.1921"></a>
+<span class="sourceLineNo">1922</span>      final String nmr = "--nomapred";<a name="line.1922"></a>
+<span class="sourceLineNo">1923</span>      if (cmd.startsWith(nmr)) {<a name="line.1923"></a>
+<span class="sourceLineNo">1924</span>        opts.nomapred = true;<a name="line.1924"></a>
+<span class="sourceLineNo">1925</span>        continue;<a name="line.1925"></a>
+<span class="sourceLineNo">1926</span>      }<a name="line.1926"></a>
+<span class="sourceLineNo">1927</span><a name="line.1927"></a>
+<span class="sourceLineNo">1928</span>      final String rows = "--rows=";<a name="line.1928"></a>
+<span class="sourceLineNo">1929</span>      if (cmd.startsWith(rows)) {<a name="line.1929"></a>
+<span class="sourceLineNo">1930</span>        opts.perClientRunRows = Integer.parseInt(cmd.substring(rows.length()));<a name="line.1930"></a>
+<span class="sourceLineNo">1931</span>        continue;<a name="line.1931"></a>
+<span class="sourceLineNo">1932</span>      }<a name="line.1932"></a>
+<span class="sourceLineNo">1933</span><a name="line.1933"></a>
+<span class="sourceLineNo">1934</span>      final String cycles = "--cycles=";<a name="line.1934"></a>
+<span class="sourceLineNo">1935</span>      if (cmd.startsWith(cycles)) {<a name="line.1935"></a>
+<span class="sourceLineNo">1936</span>        opts.cycles = Integer.parseInt(cmd.substring(cycles.length()));<a name="line.1936"></a>
+<span class="sourceLineNo">1937</span>        continue;<a name="line.1937"></a>
+<span class="sourceLineNo">1938</span>      }<a name="line.1938"></a>
+<span class="sourceLineNo">1939</span><a name="line.1939"></a>
+<span class="sourceLineNo">1940</span>      final String sampleRate = "--sampleRate=";<a name="line.1940"></a>
+<span class="sourceLineNo">1941</span>      if (cmd.startsWith(sampleRate)) {<a name="line.1941"></a>
+<span class="sourceLineNo">1942</span>        opts.sampleRate = Float.parseFloat(cmd.substring(sampleRate.length()));<a name="line.1942"></a>
+<span class="sourceLineNo">1943</span>        continue;<a name="line.1943"></a>
+<span class="sourceLineNo">1944</span>      }<a name="line.1944"></a>
+<span class="sourceLineNo">1945</span><a name="line.1945"></a>
+<span class="sourceLineNo">1946</span>      final String table = "--table=";<a name="line.1946"></a>
+<span class="sourceLineNo">1947</span>      if (cmd.startsWith(table)) {<a name="line.1947"></a>
+<span class="sourceLineNo">1948</span>        opts.tableName = cmd.substring(table.length());<a name="line.1948"></a>
+<span class="sourceLineNo">1949</span>        continue;<a name="line.1949"></a>
+<span class="sourceLineNo">1950</span>      }<a name="line.1950"></a>
+<span class="sourceLineNo">1951</span><a name="line.1951"></a>
+<span class="sourceLineNo">1952</span>      final String startRow = "--startRow=";<a name="line.1952"></a>
+<span class="sourceLineNo">1953</span>      if (cmd.startsWith(startRow)) {<a name="line.1953"></a>
+<span class="sourceLineNo">1954</span>        opts.startRow = Integer.parseInt(cmd.substring(startRow.length()));<a name="line.1954"></a>
+<span class="sourceLineNo">1955</span>        continue;<a name="line.1955"></a>
+<span class="sourceLineNo">1956</span>      }<a name="line.1956"></a>
+<span class="sourceLineNo">1957</span><a name="line.1957"></a>
+<span class="sourceLineNo">1958</span>      final String compress = "--compress=";<a name="line.1958"></a>
+<span class="sourceLineNo">1959</span>      if (cmd.startsWith(compress)) {<a name="line.1959"></a>
+<span class="sourceLineNo">1960</span>        opts.compression = Compression.Algorithm.valueOf(cmd.substring(compress.length()));<a name="line.1960"></a>
+<span class="sourceLineNo">1961</span>        continue;<a name="line.1961"></a>
+<span class="sourceLineNo">1962</span>      }<a name="line.1962"></a>
+<span class="sourceLineNo">1963</span><a name="line.1963"></a>
+<span class="sourceLineNo">1964</span>      final String traceRate = "--traceRate=";<a name="line.1964"></a>
+<span class="sourceLineNo">1965</span>      if (cmd.startsWith(traceRate)) {<a name="line.1965"></a>
+<span class="sourceLineNo">1966</span>        opts.traceRate = Double.parseDouble(cmd.substring(traceRate.length()));<a name="line.1966"></a>
+<span class="sourceLineNo">1967</span>        continue;<a name="line.1967"></a>
+<span class="sourceLineNo">1968</span>      }<a name="line.1968"></a>
+<span class="sourceLineNo">1969</span><a name="line.1969"></a>
+<span class="sourceLineNo">1970</span>      final String blockEncoding = "--blockEncoding=";<a name="line.1970"></a>
+<span class="sourceLineNo">1971</span>      if (cmd.startsWith(blockEncoding)) {<a name="line.1971"></a>
+<span class="sourceLineNo">1972</span>        opts.blockEncoding = DataBlockEncoding.valueOf(cmd.substring(blockEncoding.length()));<a name="line.1972"></a>
+<span class="sourceLineNo">1973</span>        continue;<a name="line.1973"></a>
+<span class="sourceLineNo">1974</span>      }<a name="line.1974"></a>
+<span class="sourceLineNo">1975</span><a name="line.1975"></a>
+<span class="sourceLineNo">1976</span>      final String flushCommits = "--flushCommits=";<a name="line.1976"></a>
+<span class="sourceLineNo">1977</span>      if (cmd.startsWith(flushCommits)) {<a name="line.1977"></a>
+<span class="sourceLineNo">1978</span>        opts.flushCommits = Boolean.parseBoolean(cmd.substring(flushCommits.length()));<a name="line.1978"></a>
+<span class="sourceLineNo">1979</span>        continue;<a name="line.1979"></a>
+<span class="sourceLineNo">1980</span>      }<a name="line.1980"></a>
+<span class="sourceLineNo">1981</span><a name="line.1981"></a>
+<span class="sourceLineNo">1982</span>      final String writeToWAL = "--writeToWAL=";<a name="line.1982"></a>
+<span class="sourceLineNo">1983</span>      if (cmd.startsWith(writeToWAL)) {<a name="line.1983"></a>
+<span class="sourceLineNo">1984</span>        opts.writeToWAL = Boolean.parseBoolean(cmd.substring(writeToWAL.length()));<a name="line.1984"></a>
+<span class="sourceLineNo">1985</span>        continue;<a name="line.1985"></a>
+<span class="sourceLineNo">1986</span>      }<a name="line.1986"></a>
+<span class="sourceLineNo">1987</span><a name="line.1987"></a>
+<span class="sourceLineNo">1988</span>      final String presplit = "--presplit=";<a name="line.1988"></a>
+<span class="sourceLineNo">1989</span>      if (cmd.startsWith(presplit)) {<a name="line.1989"></a>
+<span class="sourceLineNo">1990</span>        opts.presplitRegions = Integer.parseInt(cmd.substring(presplit.length()));<a name="line.1990"></a>
+<span class="sourceLineNo">1991</span>        continue;<a name="line.1991"></a>
+<span class="sourceLineNo">1992</span>      }<a name="line.1992"></a>
+<span class="sourceLineNo">1993</span><a name="line.1993"></a>
+<span class="sourceLineNo">1994</span>      final String inMemory = "--inmemory=";<a name="line.1994"></a>
+<span class="sourceLineNo">1995</span>      if (cmd.startsWith(inMemory)) {<a name="line.1995"></a>
+<span class="sourceLineNo">1996</span>        opts.inMemoryCF = Boolean.parseBoolean(cmd.substring(inMemory.length()));<a name="line.1996"></a>
+<span class="sourceLineNo">1997</span>        continue;<a name="line.1997"></a>
+<span class="sourceLineNo">1998</span>      }<a name="line.1998"></a>
+<span class="sourceLineNo">1999</span><a name="line.1999"></a>
+<span class="sourceLineNo">2000</span>      final String autoFlush = "--autoFlush=";<a name="line.2000"></a>
+<span class="sourceLineNo">2001</span>      if (cmd.startsWith(autoFlush)) {<a name="line.2001"></a>
+<span class="sourceLineNo">2002</span>        opts.autoFlush = Boolean.parseBoolean(cmd.substring(autoFlush.length()));<a name="line.2002"></a>
+<span class="sourceLineNo">2003</span>        continue;<a name="line.2003"></a>
+<span class="sourceLineNo">2004</span>      }<a name="line.2004"></a>
+<span class="sourceLineNo">2005</span><a name="line.2005"></a>
+<span class="sourceLineNo">2006</span>      final String onceCon = "--oneCon=";<a name="line.2006"></a>
+<span class="sourceLineNo">2007</span>      if (cmd.startsWith(onceCon)) {<a name="line.2007"></a>
+<span class="sourceLineNo">2008</span>        opts.oneCon = Boolean.parseBoolean(cmd.substring(onceCon.length()));<a name="line.2008"></a>
+<span class="sourceLineNo">2009</span>        continue;<a name="line.2009"></a>
+<span class="sourceLineNo">2010</span>      }<a name="line.2010"></a>
+<span class="sourceLineNo">2011</span><a name="line.2011"></a>
+<span class="sourceLineNo">2012</span>      final String latency = "--latency";<a name="line.2012"></a>
+<span class="sourceLineNo">2013</span>      if (cmd.startsWith(latency)) {<a name="line.2013"></a>
+<span class="sourceLineNo">2014</span>        opts.reportLatency = true;<a name="line.2014"></a>
+<span class="sourceLineNo">2015</span>        continue;<a name="line.2015"></a>
+<span class="sourceLineNo">2016</span>      }<a name="line.2016"></a>
+<span class="sourceLineNo">2017</span><a name="line.2017"></a>
+<span class="sourceLineNo">2018</span>      final String multiGet = "--multiGet=";<a name="line.2018"></a>
+<span class="sourceLineNo">2019</span>      if (cmd.startsWith(multiGet)) {<a name="line.2019"></a>
+<span class="sourceLineNo">2020</span>        opts.multiGet = Integer.parseInt(cmd.substring(multiGet.length()));<a name="line.2020"></a>
+<span class="sourceLineNo">2021</span>        continue;<a name="line.2021"></a>
+<span class="sourceLineNo">2022</span>      }<a name="line.2022"></a>
+<span class="sourceLineNo">2023</span><a name="line.2023"></a>
+<span class="sourceLineNo">2024</span>      final String useTags = "--usetags=";<a name="line.2024"></a>
+<span class="sourceLineNo">2025</span>      if (cmd.startsWith(useTags)) {<a name="line.2025"></a>
+<span class="sourceLineNo">2026</span>        opts.useTags = Boolean.parseBoolean(cmd.substring(useTags.length()));<a name="line.2026"></a>
+<span class="sourceLineNo">2027</span>        continue;<a name="line.2027"></a>
+<span class="sourceLineNo">2028</span>      }<a name="line.2028"></a>
+<span class="sourceLineNo">2029</span><a name="line.2029"></a>
+<span class="sourceLineNo">2030</span>      final String noOfTags = "--numoftags=";<a name="line.2030"></a>
+<span class="sourceLineNo">2031</span>      if (cmd.startsWith(noOfTags)) {<a name="line.2031"></a>
+<span class="sourceLineNo">2032</span>        opts.noOfTags = Integer.parseInt(cmd.substring(noOfTags.length()));<a name="line.2032"></a>
+<span class="sourceLineNo">2033</span>        continue;<a name="line.2033"></a>
+<span class="sourceLineNo">2034</span>      }<a name="line.2034"></a>
+<span class="sourceLineNo">2035</span><a name="line.2035"></a>
+<span class="sourceLineNo">2036</span>      final String replicas = "--replicas=";<a name="line.2036"></a>
+<span class="sourceLineNo">2037</span>      if (cmd.startsWith(replicas)) {<a name="line.2037"></a>
+<span class="sourceLineNo">2038</span>        opts.replicas = Integer.parseInt(cmd.substring(replicas.length()));<a name="line.2038"></a>
+<span class="sourceLineNo">2039</span>        continue;<a name="line.2039"></a>
+<span class="sourceLineNo">2040</span>      }<a name="line.2040"></a>
+<span class="sourceLineNo">2041</span><a name="line.2041"></a>
+<span class="sourceLineNo">2042</span>      final String filterOutAll = "--filterAll";<a name="line.2042"></a>
+<span class="sourceLineNo">2043</span>      if (cmd.startsWith(filterOutAll)) {<a name="line.2043"></a>
+<span class="sourceLineNo">2044</span>        opts.filterAll = true;<a name="line.2044"></a>
+<span class="sourceLineNo">2045</span>        continue;<a name="line.2045"></a>
+<span class="sourceLineNo">2046</span>      }<a name="line.2046"></a>
+<span class="sourceLineNo">2047</span><a name="line.2047"></a>
+<span class="sourceLineNo">2048</span>      final String size = "--size=";<a name="line.2048"></a>
+<span class="sourceLineNo">2049</span>      if (cmd.startsWith(size)) {<a name="line.2049"></a>
+<span class="sourceLineNo">2050</span>        opts.size = Float.parseFloat(cmd.substring(size.length()));<a name="line.2050"></a>
+<span class="sourceLineNo">2051</span>        if (opts.size &lt;= 1.0f) throw new IllegalStateException("Size must be &gt; 1; i.e. 1GB");<a name="line.2051"></a>
+<span class="sourceLineNo">2052</span>        continue;<a name="line.2052"></a>
+<span class="sourceLineNo">2053</span>      }<a name="line.2053"></a>
+<span class="sourceLineNo">2054</span><a name="line.2054"></a>
+<span class="sourceLineNo">2055</span>      final String splitPolicy = "--splitPolicy=";<a name="line.2055"></a>
+<span class="sourceLineNo">2056</span>      if (cmd.startsWith(splitPolicy)) {<a name="line.2056"></a>
+<span class="sourceLineNo">2057</span>        opts.splitPolicy = cmd.substring(splitPolicy.length());<a name="line.2057"></a>
+<span class="sourceLineNo">2058</span>        continue;<a name="line.2058"></a>
+<span class="sourceLineNo">2059</span>      }<a name="line.2059"></a>
+<span class="sourceLineNo">2060</span><a name="line.2060"></a>
+<span class="sourceLineNo">2061</span>      final String randomSleep = "--randomSleep=";<a name="line.2061"></a>
+<span class="sourceLineNo">2062</span>      if (cmd.startsWith(randomSleep)) {<a name="line.2062"></a>
+<span class="sourceLineNo">2063</span>        opts.randomSleep = Integer.parseInt(cmd.substring(randomSleep.length()));<a name="line.2063"></a>
+<span class="sourceLineNo">2064</span>        continue;<a name="line.2064"></a>
+<span class="sourceLineNo">2065</span>      }<a name="line.2065"></a>
+<span class="sourceLineNo">2066</span><a name="line.2066"></a>
+<span class="sourceLineNo">2067</span>      final String measureAfter = "--measureAfter=";<a name="line.2067"></a>
+<span class="sourceLineNo">2068</span>      if (cmd.startsWith(measureAfter)) {<a name="line.2068"></a>
+<span class="sourceLineNo">2069</span>        opts.measureAfter = Integer.parseInt(cmd.substring(measureAfter.length()));<a name="line.2069"></a>
+<span class="sourceLineNo">2070</span>        continue;<a name="line.2070"></a>
+<span class="sourceLineNo">2071</span>      }<a name="line.2071"></a>
+<span class="sourceLineNo">2072</span><a name="line.2072"></a>
+<span class="sourceLineNo">2073</span>      final String bloomFilter = "--bloomFilter=";<a name="line.2073"></a>
+<span class="sourceLineNo">2074</span>      if (cmd.startsWith(bloomFilter)) {<a name="line.2074"></a>
+<span class="sourceLineNo">2075</span>        opts.bloomType = BloomType.valueOf(cmd.substring(bloomFilter.length()));<a name="line.2075"></a>
+<span class="sourceLineNo">2076</span>        continue;<a name="line.2076"></a>
+<span class="sourceLineNo">2077</span>      }<a name="line.2077"></a>
+<span class="sourceLineNo">2078</span><a name="line.2078"></a>
+<span class="sourceLineNo">2079</span>      final String valueSize = "--valueSize=";<a name="line.2079"></a>
+<span class="sourceLineNo">2080</span>      if (cmd.startsWith(valueSize)) {<a name="line.2080"></a>
+<span class="sourceLineNo">2081</span>        opts.valueSize = Integer.parseInt(cmd.substring(valueSize.length()));<a name="line.2081"></a>
+<span class="sourceLineNo">2082</span>        continue;<a name="line.2082"></a>
+<span class="sourceLineNo">2083</span>      }<a name="line.2083"></a>
+<span class="sourceLineNo">2084</span><a name="line.2084"></a>
+<span class="sourceLineNo">2085</span>      final String valueRandom = "--valueRandom";<a name="line.2085"></a>
+<span class="sourceLineNo">2086</span>      if (cmd.startsWith(valueRandom)) {<a name="line.2086"></a>
+<span class="sourceLineNo">2087</span>        opts.valueRandom = true;<a name="line.2087"></a>
+<span class="sourceLineNo">2088</span>        if (opts.valueZipf) {<a name="line.2088"></a>
+<span class="sourceLineNo">2089</span>          throw new IllegalStateException("Either valueZipf or valueRandom but not both");<a name="line.2089"></a>
+<span class="sourceLineNo">2090</span>        }<a name="line.2090"></a>
+<span class="sourceLineNo">2091</span>        continue;<a name="line.2091"></a>
+<span class="sourceLineNo">2092</span>      }<a name="line.2092"></a>
+<span class="sourceLineNo">2093</span><a name="line.2093"></a>
+<span class="sourceLineNo">2094</span>      final String valueZipf = "--valueZipf";<a name="line.2094"></a>
+<span class="sourceLineNo">2095</span>      if (cmd.startsWith(valueZipf)) {<a name="line.2095"></a>
+<span class="sourceLineNo">2096</span>        opts.valueZipf = true;<a name="line.2096"></a>
+<span class="sourceLineNo">2097</span>        if (opts.valueRandom) {<a name="line.2097"></a>
+<span class="sourceLineNo">2098</span>          throw new IllegalStateException("Either valueZipf or valueRandom but not both");<a name="line.2098"></a>
+<span class="sourceLineNo">2099</span>        }<a name="line.2099"></a>
+<span class="sourceLineNo">2100</span>        continue;<a name="line.2100"></a>
+<span class="sourceLineNo">2101</span>      }<a name="line.2101"></a>
+<span class="sourceLineNo">2102</span><a name="line.2102"></a>
+<span class="sourceLineNo">2103</span>      final String period = "--period=";<a name="line.2103"></a>
+<span class="sourceLineNo">2104</span>      if (cmd.startsWith(period)) {<a name="line.2104"></a>
+<span class="sourceLineNo">2105</span>        opts.period = Integer.parseInt(cmd.substring(period.length()));<a name="line.2105"></a>
+<span class="sourceLineNo">2106</span>        continue;<a name="line.2106"></a>
+<span class="sourceLineNo">2107</span>      }<a name="line.2107"></a>
+<span class="sourceLineNo">2108</span><a name="line.2108"></a>
+<span class="sourceLineNo">2109</span>      final String addColumns = "--addColumns=";<a name="line.2109"></a>
+<span class="sourceLineNo">2110</span>      if (cmd.startsWith(addColumns)) {<a name="line.2110"></a>
+<span class="sourceLineNo">2111</span>        opts.addColumns = Boolean.parseBoolean(cmd.substring(addColumns.length()));<a name="line.2111"></a>
+<span class="sourceLineNo">2112</span>        continue;<a name="line.2112"></a>
+<span class="sourceLineNo">2113</span>      }<a name="line.2113"></a>
+<span class="sourceLineNo">2114</span><a name="line.2114"></a>
+<span class="sourceLineNo">2115</span>      final String columns = "--columns=";<a name="line.2115"></a>
+<span class="sourceLineNo">2116</span>      if (cmd.startsWith(columns)) {<a name="line.2116"></a>
+<span class="sourceLineNo">2117</span>        opts.columns = Integer.parseInt(cmd.substring(columns.length()));<a name="line.2117"></a>
+<span class="sourceLineNo">2118</span>        continue;<a name="line.2118"></a>
+<span class="sourceLineNo">2119</span>      }<a name="line.2119"></a>
+<span class="sourceLineNo">2120</span><a name="line.2120"></a>
+<span class="sourceLineNo">2121</span>      final String caching = "--caching=";<a name="line.2121"></a>
+<span class="sourceLineNo">2122</span>      if (cmd.startsWith(caching)) {<a name="line.2122"></a>
+<span class="sourceLineNo">2123</span>        opts.caching = Integer.parseInt(cmd.substring(caching.length()));<a name="line.2123"></a>
+<span class="sourceLineNo">2124</span>        continue;<a name="line.2124"></a>
+<span class="sourceLineNo">2125</span>      }<a name="line.2125"></a>
+<span class="sourceLineNo">2126</span><a name="line.2126"></a>
+<span class="sourceLineNo">2127</span>      if (isCommandClass(cmd)) {<a name="line.2127"></a>
+<span class="sourceLineNo">2128</span>        opts.cmdName = cmd;<a name="line.2128"></a>
+<span class="sourceLineNo">2129</span>        opts.numClientThreads = Integer.parseInt(args.remove());<a name="line.2129"></a>
+<span class="sourceLineNo">2130</span>        if (opts.size != DEFAULT_OPTS.size &amp;&amp;<a name="line.2130"></a>
+<span class="sourceLineNo">2131</span>            opts.perClientRunRows != DEFAULT_OPTS.perClientRunRows) {<a name="line.2131"></a>
+<span class="sourceLineNo">2132</span>          throw new IllegalArgumentException(rows + " and " + size +<a name="line.2132"></a>
+<span class="sourceLineNo">2133</span>            " are mutually exclusive options");<a name="line.2133"></a>
+<span class="sourceLineNo">2134</span>        }<a name="line.2134"></a>
+<span class="sourceLineNo">2135</span>        opts = calculateRowsAndSize(opts);<a name="line.2135"></a>
+<span class="sourceLineNo">2136</span>        break;<a name="line.2136"></a>
+<span class="sourceLineNo">2137</span>      } else {<a name="line.2137"></a>
+<span class="sourceLineNo">2138</span>        printUsageAndExit("ERROR: Unrecognized option/command: " + cmd, -1);<a name="line.2138"></a>
+<span class="sourceLineNo">2139</span>      }<a name="line.2139"></a>
+<span class="sourceLineNo">2140</span><a name="line.2140"></a>
+<span class="sourceLineNo">2141</span>      // Not matching any option or command.<a name="line.2141"></a>
+<span class="sourceLineNo">2142</span>      System.err.println("Error: Wrong option or command: " + cmd);<a name="line.2142"></a>
+<span class="sourceLineNo">2143</span>      args.add(cmd);<a name="line.2143"></a>
+<span class="sourceLineNo">2144</span>      break;<a name="line.2144"></a>
+<span class="sourceLineNo">2145</span>    }<a name="line.2145"></a>
+<span class="sourceLineNo">2146</span>    return opts;<a name="line.2146"></a>
+<span class="sourceLineNo">2147</span>  }<a name="line.2147"></a>
+<span class="sourceLineNo">2148</span><a name="line.2148"></a>
+<span class="sourceLineNo">2149</span>  static TestOptions calculateRowsAndSize(final TestOptions opts) {<a name="line.2149"></a>
+<span class="sourceLineNo">2150</span>    int rowsPerGB = getRowsPerGB(opts);<a name="line.2150"></a>
+<span class="sourceLineNo">2151</span>    if (opts.size != DEFAULT_OPTS.size) {<a name="line.2151"></a>
+<span class="sourceLineNo">2152</span>      // total size in GB specified<a name="line.2152"></a>
+<span class="sourceLineNo">2153</span>      opts.totalRows = (int) opts.size * rowsPerGB;<a name="line.2153"></a>
+<span class="sourceLineNo">2154</span>      opts.perClientRunRows = opts.totalRows / opts.numClientThreads;<a name="line.2154"></a>
+<span class="sourceLineNo">2155</span>    } else if (opts.perClientRunRows != DEFAULT_OPTS.perClientRunRows) {<a name="line.2155"></a>
+<span class="sourceLineNo">2156</span>      // number of rows specified<a name="line.2156"></a>
+<span class="sourceLineNo">2157</span>      opts.totalRows = opts.perClientRunRows * opts.numClientThreads;<a name="line.2157"></a>
+<span class="sourceLineNo">2158</span>      opts.size = opts.totalRows / rowsPerGB;<a name="line.2158"></a>
+<span class="sourceLineNo">2159</span>    }<a name="line.2159"></a>
+<span class="sourceLineNo">2160</span>    return opts;<a name="line.2160"></a>
+<span class="sourceLineNo">2161</span>  }<a name="line.2161"></a>
+<span class="sourceLineNo">2162</span><a name="line.2162"></a>
+<span class="sourceLineNo">2163</span>  static int getRowsPerGB(final TestOptions opts) {<a name="line.2163"></a>
+<span class="sourceLineNo">2164</span>    return ONE_GB / ((opts.valueRandom? opts.valueSize/2: opts.valueSize) * opts.getColumns());<a name="line.2164"></a>
+<span class="sourceLineNo">2165</span>  }<a name="line.2165"></a>
+<span class="sourceLineNo">2166</span><a name="line.2166"></a>
+<span class="sourceLineNo">2167</span>  @Override<a name="line.2167"></a>
+<span class="sourceLineNo">2168</span>  public int run(String[] args) throws Exception {<a name="line.2168"></a>
+<span class="sourceLineNo">2169</span>    // Process command-line args. TODO: Better cmd-line processing<a name="line.2169"></a>
+<span class="sourceLineNo">2170</span>    // (but hopefully something not as painful as cli options).<a name="line.2170"></a>
+<span class="sourceLineNo">2171</span>    int errCode = -1;<a name="line.2171"></a>
+<span class="sourceLineNo">2172</span>    if (args.length &lt; 1) {<a name="line.2172"></a>
+<span class="sourceLineNo">2173</span>      printUsage();<a name="line.2173"></a>
+<span class="sourceLineNo">2174</span>      return errCode;<a name="line.2174"></a>
+<span class="sourceLineNo">2175</span>    }<a name="line.2175"></a>
+<span class="sourceLineNo">2176</span><a name="line.2176"></a>
+<span class="sourceLineNo">2177</span>    try {<a name="line.2177"></a>
+<span class="sourceLineNo">2178</span>      LinkedList&lt;String&gt; argv = new LinkedList&lt;String&gt;();<a name="line.2178"></a>
+<span class="sourceLineNo">2179</span>      argv.addAll(Arrays.asList(args));<a name="line.2179"></a>
+<span class="sourceLineNo">2180</span>      TestOptions opts = parseOpts(argv);<a name="line.2180"></a>
+<span class="sourceLineNo">2181</span><a name="line.2181"></a>
+<span class="sourceLineNo">2182</span>      // args remaining, print help and exit<a name="line.2182"></a>
+<span class="sourceLineNo">2183</span>      if (!argv.isEmpty()) {<a name="line.2183"></a>
+<span class="sourceLineNo">2184</span>        errCode = 0;<a name="line.2184"></a>
+<span class="sourceLineNo">2185</span>        printUsage();<a name="line.2185"></a>
+<span class="sourceLineNo">2186</span>        return errCode;<a name="line.2186"></a>
+<span class="sourceLineNo">2187</span>      }<a name="line.2187"></a>
+<span class="sourceLineNo">2188</span><a name="line.2188"></a>
+<span class="sourceLineNo">2189</span>      // must run at least 1 client<a name="line.2189"></a>
+<span class="sourceLineNo">2190</span>      if (opts.numClientThreads &lt;= 0) {<a name="line.2190"></a>
+<span class="sourceLineNo">2191</span>        throw new IllegalArgumentException("Number of clients must be &gt; 0");<a name="line.2191"></a>
+<span class="sourceLineNo">2192</span>      }<a name="line.2192"></a>
+<span class="sourceLineNo">2193</span><a name="line.2193"></a>
+<span class="sourceLineNo">2194</span>      Class&lt;? extends Test&gt; cmdClass = determineCommandClass(opts.cmdName);<a name="line.2194"></a>
+<span class="sourceLineNo">2195</span>      if (cmdClass != null) {<a name="line.2195"></a>
+<span class="sourceLineNo">2196</span>        runTest(cmdClass, opts);<a name="line.2196"></a>
+<span class="sourceLineNo">2197</span>        errCode = 0;<a name="line.2197"></a>
+<span class="sourceLineNo">2198</span>      }<a name="line.2198"></a>
+<span class="sourceLineNo">2199</span><a name="line.2199"></a>
+<span class="sourceLineNo">2200</span>    } catch (Exception e) {<a name="line.2200"></a>
+<span class="sourceLineNo">2201</span>      e.printStackTrace();<a name="line.2201"></a>
+<span class="sourceLineNo">2202</span>    }<a name="line.2202"></a>
+<span class="sourceLineNo">2203</span><a name="line.2203"></a>
+<span class="sourceLineNo">2204</span>    return errCode;<a name="line.2204"></a>
+<span class="sourceLineNo">2205</span>  }<a name="line.2205"></a>
+<span class="sourceLineNo">2206</span><a name="line.2206"></a>
+<span class="sourceLineNo">2207</span>  private static boolean isCommandClass(String cmd) {<a name="line.2207"></a>
+<span class="sourceLineNo">2208</span>    return COMMANDS.containsKey(cmd);<a name="line.2208"></a>
+<span class="sourceLineNo">2209</span>  }<a name="line.2209"></a>
+<span class="sourceLineNo">2210</span><a name="line.2210"></a>
+<span class="sourceLineNo">2211</span>  private static Class&lt;? extends Test&gt; determineCommandClass(String cmd) {<a name="line.2211"></a>
+<span class="sourceLineNo">2212</span>    CmdDescriptor descriptor = COMMANDS.get(cmd);<a name="line.2212"></a>
+<span class="sourceLineNo">2213</span>    return descriptor != null ? descriptor.getCmdClass() : null;<a name="line.2213"></a>
+<span class="sourceLineNo">2214</span>  }<a name="line.2214"></a>
+<span class="sourceLineNo">2215</span><a name="line.2215"></a>
+<span class="sourceLineNo">2216</span>  public static void main(final String[] args) throws Exception {<a name="line.2216"></a>
+<span class="sourceLineNo">2217</span>    int res = ToolRunner.run(new PerformanceEvaluation(HBaseConfiguration.create()), args);<a name="line.2217"></a>
+<span class="sourceLineNo">2218</span>    System.exit(res);<a name="line.2218"></a>
+<span class="sourceLineNo">2219</span>  }<a name="line.2219"></a>
+<span class="sourceLineNo">2220</span>}<a name="line.2220"></a>
 
 
 


Mime
View raw message