hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [01/19] hbase-site git commit: Published site at .
Date Sun, 19 Nov 2017 15:17:25 GMT
Repository: hbase-site
Updated Branches:
  refs/heads/asf-site d55acf775 -> 2424a45f6


http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2424a45f/testdevapidocs/src-html/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.html
----------------------------------------------------------------------
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.html
index 35bd215..85f881b 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.html
@@ -749,478 +749,477 @@
 <span class="sourceLineNo">741</span>          candidates.remove(0);<a name="line.741"></a>
 <span class="sourceLineNo">742</span>        }<a name="line.742"></a>
 <span class="sourceLineNo">743</span>        c.bypass();<a name="line.743"></a>
-<span class="sourceLineNo">744</span>        c.complete();<a name="line.744"></a>
-<span class="sourceLineNo">745</span>      }<a name="line.745"></a>
-<span class="sourceLineNo">746</span>    }<a name="line.746"></a>
-<span class="sourceLineNo">747</span>  }<a name="line.747"></a>
-<span class="sourceLineNo">748</span><a name="line.748"></a>
-<span class="sourceLineNo">749</span>  private void waitUntilMobCompactionFinished(TableName tableName) throws IOException,<a name="line.749"></a>
-<span class="sourceLineNo">750</span>    InterruptedException {<a name="line.750"></a>
-<span class="sourceLineNo">751</span>    long finished = EnvironmentEdgeManager.currentTime() + 60000;<a name="line.751"></a>
-<span class="sourceLineNo">752</span>    CompactionState state = admin.getCompactionState(tableName, CompactType.MOB);<a name="line.752"></a>
-<span class="sourceLineNo">753</span>    while (EnvironmentEdgeManager.currentTime() &lt; finished) {<a name="line.753"></a>
-<span class="sourceLineNo">754</span>      if (state == CompactionState.NONE) {<a name="line.754"></a>
-<span class="sourceLineNo">755</span>        break;<a name="line.755"></a>
-<span class="sourceLineNo">756</span>      }<a name="line.756"></a>
-<span class="sourceLineNo">757</span>      state = admin.getCompactionState(tableName, CompactType.MOB);<a name="line.757"></a>
-<span class="sourceLineNo">758</span>      Thread.sleep(10);<a name="line.758"></a>
-<span class="sourceLineNo">759</span>    }<a name="line.759"></a>
-<span class="sourceLineNo">760</span>    assertEquals(CompactionState.NONE, state);<a name="line.760"></a>
-<span class="sourceLineNo">761</span>  }<a name="line.761"></a>
-<span class="sourceLineNo">762</span><a name="line.762"></a>
-<span class="sourceLineNo">763</span>  /**<a name="line.763"></a>
-<span class="sourceLineNo">764</span>   * Gets the number of rows in the given table.<a name="line.764"></a>
-<span class="sourceLineNo">765</span>   * @param table to get the  scanner<a name="line.765"></a>
-<span class="sourceLineNo">766</span>   * @return the number of rows<a name="line.766"></a>
-<span class="sourceLineNo">767</span>   */<a name="line.767"></a>
-<span class="sourceLineNo">768</span>  private int countMobRows(final Table table) throws IOException {<a name="line.768"></a>
-<span class="sourceLineNo">769</span>    Scan scan = new Scan();<a name="line.769"></a>
-<span class="sourceLineNo">770</span>    // Do not retrieve the mob data when scanning<a name="line.770"></a>
-<span class="sourceLineNo">771</span>    scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE));<a name="line.771"></a>
-<span class="sourceLineNo">772</span>    return TEST_UTIL.countRows(table, scan);<a name="line.772"></a>
-<span class="sourceLineNo">773</span>  }<a name="line.773"></a>
-<span class="sourceLineNo">774</span><a name="line.774"></a>
-<span class="sourceLineNo">775</span>  /**<a name="line.775"></a>
-<span class="sourceLineNo">776</span>   * Gets the number of cells in the given table.<a name="line.776"></a>
-<span class="sourceLineNo">777</span>   * @param table to get the  scanner<a name="line.777"></a>
-<span class="sourceLineNo">778</span>   * @return the number of cells<a name="line.778"></a>
-<span class="sourceLineNo">779</span>   */<a name="line.779"></a>
-<span class="sourceLineNo">780</span>  private int countMobCells(final Table table) throws IOException {<a name="line.780"></a>
-<span class="sourceLineNo">781</span>    Scan scan = new Scan();<a name="line.781"></a>
-<span class="sourceLineNo">782</span>    // Do not retrieve the mob data when scanning<a name="line.782"></a>
-<span class="sourceLineNo">783</span>    scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE));<a name="line.783"></a>
-<span class="sourceLineNo">784</span>    ResultScanner results = table.getScanner(scan);<a name="line.784"></a>
-<span class="sourceLineNo">785</span>    int count = 0;<a name="line.785"></a>
-<span class="sourceLineNo">786</span>    for (Result res : results) {<a name="line.786"></a>
-<span class="sourceLineNo">787</span>      count += res.size();<a name="line.787"></a>
-<span class="sourceLineNo">788</span>    }<a name="line.788"></a>
-<span class="sourceLineNo">789</span>    results.close();<a name="line.789"></a>
-<span class="sourceLineNo">790</span>    return count;<a name="line.790"></a>
-<span class="sourceLineNo">791</span>  }<a name="line.791"></a>
-<span class="sourceLineNo">792</span><a name="line.792"></a>
-<span class="sourceLineNo">793</span>  /**<a name="line.793"></a>
-<span class="sourceLineNo">794</span>   * Gets the number of files in the mob path.<a name="line.794"></a>
-<span class="sourceLineNo">795</span>   * @param isMobFile gets number of the mob files or del files<a name="line.795"></a>
-<span class="sourceLineNo">796</span>   * @param familyName the family name<a name="line.796"></a>
-<span class="sourceLineNo">797</span>   * @return the number of the files<a name="line.797"></a>
-<span class="sourceLineNo">798</span>   */<a name="line.798"></a>
-<span class="sourceLineNo">799</span>  private int countFiles(TableName tableName, boolean isMobFile, String familyName)<a name="line.799"></a>
-<span class="sourceLineNo">800</span>    throws IOException {<a name="line.800"></a>
-<span class="sourceLineNo">801</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, familyName);<a name="line.801"></a>
-<span class="sourceLineNo">802</span>    int count = 0;<a name="line.802"></a>
-<span class="sourceLineNo">803</span>    if (fs.exists(mobDirPath)) {<a name="line.803"></a>
-<span class="sourceLineNo">804</span>      FileStatus[] files = fs.listStatus(mobDirPath);<a name="line.804"></a>
-<span class="sourceLineNo">805</span>      for (FileStatus file : files) {<a name="line.805"></a>
-<span class="sourceLineNo">806</span>        if (isMobFile == true) {<a name="line.806"></a>
-<span class="sourceLineNo">807</span>          if (!StoreFileInfo.isDelFile(file.getPath())) {<a name="line.807"></a>
-<span class="sourceLineNo">808</span>            count++;<a name="line.808"></a>
-<span class="sourceLineNo">809</span>          }<a name="line.809"></a>
-<span class="sourceLineNo">810</span>        } else {<a name="line.810"></a>
-<span class="sourceLineNo">811</span>          if (StoreFileInfo.isDelFile(file.getPath())) {<a name="line.811"></a>
-<span class="sourceLineNo">812</span>            count++;<a name="line.812"></a>
-<span class="sourceLineNo">813</span>          }<a name="line.813"></a>
-<span class="sourceLineNo">814</span>        }<a name="line.814"></a>
-<span class="sourceLineNo">815</span>      }<a name="line.815"></a>
-<span class="sourceLineNo">816</span>    }<a name="line.816"></a>
-<span class="sourceLineNo">817</span>    return count;<a name="line.817"></a>
-<span class="sourceLineNo">818</span>  }<a name="line.818"></a>
-<span class="sourceLineNo">819</span><a name="line.819"></a>
-<span class="sourceLineNo">820</span>  private boolean verifyEncryption(TableName tableName, String familyName) throws IOException {<a name="line.820"></a>
-<span class="sourceLineNo">821</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, familyName);<a name="line.821"></a>
-<span class="sourceLineNo">822</span>    boolean hasFiles = false;<a name="line.822"></a>
-<span class="sourceLineNo">823</span>    if (fs.exists(mobDirPath)) {<a name="line.823"></a>
-<span class="sourceLineNo">824</span>      FileStatus[] files = fs.listStatus(mobDirPath);<a name="line.824"></a>
-<span class="sourceLineNo">825</span>      hasFiles = files != null &amp;&amp; files.length &gt; 0;<a name="line.825"></a>
-<span class="sourceLineNo">826</span>      Assert.assertTrue(hasFiles);<a name="line.826"></a>
-<span class="sourceLineNo">827</span>      Path path = files[0].getPath();<a name="line.827"></a>
-<span class="sourceLineNo">828</span>      CacheConfig cacheConf = new CacheConfig(conf);<a name="line.828"></a>
-<span class="sourceLineNo">829</span>      HStoreFile sf = new HStoreFile(TEST_UTIL.getTestFileSystem(), path, conf, cacheConf,<a name="line.829"></a>
-<span class="sourceLineNo">830</span>        BloomType.NONE, true);<a name="line.830"></a>
-<span class="sourceLineNo">831</span>      sf.initReader();<a name="line.831"></a>
-<span class="sourceLineNo">832</span>      HFile.Reader reader = sf.getReader().getHFileReader();<a name="line.832"></a>
-<span class="sourceLineNo">833</span>      byte[] encryptionKey = reader.getTrailer().getEncryptionKey();<a name="line.833"></a>
-<span class="sourceLineNo">834</span>      Assert.assertTrue(null != encryptionKey);<a name="line.834"></a>
-<span class="sourceLineNo">835</span>      Assert.assertTrue(reader.getFileContext().getEncryptionContext().getCipher().getName()<a name="line.835"></a>
-<span class="sourceLineNo">836</span>        .equals(HConstants.CIPHER_AES));<a name="line.836"></a>
-<span class="sourceLineNo">837</span>    }<a name="line.837"></a>
-<span class="sourceLineNo">838</span>    return hasFiles;<a name="line.838"></a>
-<span class="sourceLineNo">839</span>  }<a name="line.839"></a>
-<span class="sourceLineNo">840</span><a name="line.840"></a>
-<span class="sourceLineNo">841</span>  /**<a name="line.841"></a>
-<span class="sourceLineNo">842</span>   * Gets the number of HFileLink in the mob path.<a name="line.842"></a>
-<span class="sourceLineNo">843</span>   * @param familyName the family name<a name="line.843"></a>
-<span class="sourceLineNo">844</span>   * @return the number of the HFileLink<a name="line.844"></a>
-<span class="sourceLineNo">845</span>   */<a name="line.845"></a>
-<span class="sourceLineNo">846</span>  private int countHFileLinks(String familyName) throws IOException {<a name="line.846"></a>
-<span class="sourceLineNo">847</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, familyName);<a name="line.847"></a>
-<span class="sourceLineNo">848</span>    int count = 0;<a name="line.848"></a>
-<span class="sourceLineNo">849</span>    if (fs.exists(mobDirPath)) {<a name="line.849"></a>
-<span class="sourceLineNo">850</span>      FileStatus[] files = fs.listStatus(mobDirPath);<a name="line.850"></a>
-<span class="sourceLineNo">851</span>      for (FileStatus file : files) {<a name="line.851"></a>
-<span class="sourceLineNo">852</span>        if (HFileLink.isHFileLink(file.getPath())) {<a name="line.852"></a>
-<span class="sourceLineNo">853</span>          count++;<a name="line.853"></a>
-<span class="sourceLineNo">854</span>        }<a name="line.854"></a>
-<span class="sourceLineNo">855</span>      }<a name="line.855"></a>
-<span class="sourceLineNo">856</span>    }<a name="line.856"></a>
-<span class="sourceLineNo">857</span>    return count;<a name="line.857"></a>
-<span class="sourceLineNo">858</span>  }<a name="line.858"></a>
-<span class="sourceLineNo">859</span><a name="line.859"></a>
-<span class="sourceLineNo">860</span>  /**<a name="line.860"></a>
-<span class="sourceLineNo">861</span>   * Gets the number of files.<a name="line.861"></a>
-<span class="sourceLineNo">862</span>   * @param size the size of the file<a name="line.862"></a>
-<span class="sourceLineNo">863</span>   * @param tableName the current table name<a name="line.863"></a>
-<span class="sourceLineNo">864</span>   * @param familyName the family name<a name="line.864"></a>
-<span class="sourceLineNo">865</span>   * @return the number of files large than the size<a name="line.865"></a>
-<span class="sourceLineNo">866</span>   */<a name="line.866"></a>
-<span class="sourceLineNo">867</span>  private int countLargeFiles(int size, TableName tableName, String familyName) throws IOException {<a name="line.867"></a>
-<span class="sourceLineNo">868</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, familyName);<a name="line.868"></a>
-<span class="sourceLineNo">869</span>    int count = 0;<a name="line.869"></a>
-<span class="sourceLineNo">870</span>    if (fs.exists(mobDirPath)) {<a name="line.870"></a>
-<span class="sourceLineNo">871</span>      FileStatus[] files = fs.listStatus(mobDirPath);<a name="line.871"></a>
-<span class="sourceLineNo">872</span>      for (FileStatus file : files) {<a name="line.872"></a>
-<span class="sourceLineNo">873</span>        // ignore the del files in the mob path<a name="line.873"></a>
-<span class="sourceLineNo">874</span>        if ((!StoreFileInfo.isDelFile(file.getPath())) &amp;&amp; (file.getLen() &gt; size)) {<a name="line.874"></a>
-<span class="sourceLineNo">875</span>          count++;<a name="line.875"></a>
-<span class="sourceLineNo">876</span>        }<a name="line.876"></a>
-<span class="sourceLineNo">877</span>      }<a name="line.877"></a>
-<span class="sourceLineNo">878</span>    }<a name="line.878"></a>
-<span class="sourceLineNo">879</span>    return count;<a name="line.879"></a>
-<span class="sourceLineNo">880</span>  }<a name="line.880"></a>
-<span class="sourceLineNo">881</span><a name="line.881"></a>
-<span class="sourceLineNo">882</span>  /**<a name="line.882"></a>
-<span class="sourceLineNo">883</span>   * loads some data to the table.<a name="line.883"></a>
-<span class="sourceLineNo">884</span>   */<a name="line.884"></a>
-<span class="sourceLineNo">885</span>  private void loadData(Admin admin, BufferedMutator table, TableName tableName, int fileNum,<a name="line.885"></a>
-<span class="sourceLineNo">886</span>    int rowNumPerFile) throws IOException, InterruptedException {<a name="line.886"></a>
-<span class="sourceLineNo">887</span>    if (fileNum &lt;= 0) {<a name="line.887"></a>
-<span class="sourceLineNo">888</span>      throw new IllegalArgumentException();<a name="line.888"></a>
-<span class="sourceLineNo">889</span>    }<a name="line.889"></a>
-<span class="sourceLineNo">890</span>    for (int i = 0; i &lt; fileNum * rowNumPerFile; i++) {<a name="line.890"></a>
-<span class="sourceLineNo">891</span>      for (byte k0 : KEYS) {<a name="line.891"></a>
-<span class="sourceLineNo">892</span>        byte[] k = new byte[] { k0 };<a name="line.892"></a>
-<span class="sourceLineNo">893</span>        byte[] key = Bytes.add(k, Bytes.toBytes(i));<a name="line.893"></a>
-<span class="sourceLineNo">894</span>        byte[] mobVal = makeDummyData(10 * (i + 1));<a name="line.894"></a>
-<span class="sourceLineNo">895</span>        Put put = new Put(key);<a name="line.895"></a>
-<span class="sourceLineNo">896</span>        put.setDurability(Durability.SKIP_WAL);<a name="line.896"></a>
-<span class="sourceLineNo">897</span>        put.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), mobVal);<a name="line.897"></a>
-<span class="sourceLineNo">898</span>        put.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf2), mobVal);<a name="line.898"></a>
-<span class="sourceLineNo">899</span>        put.addColumn(Bytes.toBytes(family2), Bytes.toBytes(qf1), mobVal);<a name="line.899"></a>
-<span class="sourceLineNo">900</span>        table.mutate(put);<a name="line.900"></a>
-<span class="sourceLineNo">901</span>      }<a name="line.901"></a>
-<span class="sourceLineNo">902</span>      if ((i + 1) % rowNumPerFile == 0) {<a name="line.902"></a>
-<span class="sourceLineNo">903</span>        table.flush();<a name="line.903"></a>
-<span class="sourceLineNo">904</span>        admin.flush(tableName);<a name="line.904"></a>
-<span class="sourceLineNo">905</span>      }<a name="line.905"></a>
-<span class="sourceLineNo">906</span>    }<a name="line.906"></a>
-<span class="sourceLineNo">907</span>  }<a name="line.907"></a>
-<span class="sourceLineNo">908</span><a name="line.908"></a>
-<span class="sourceLineNo">909</span>  private void loadData(Admin admin, BufferedMutator table, TableName tableName, Put[] puts)<a name="line.909"></a>
-<span class="sourceLineNo">910</span>    throws IOException {<a name="line.910"></a>
-<span class="sourceLineNo">911</span>    table.mutate(Arrays.asList(puts));<a name="line.911"></a>
-<span class="sourceLineNo">912</span>    table.flush();<a name="line.912"></a>
-<span class="sourceLineNo">913</span>    admin.flush(tableName);<a name="line.913"></a>
-<span class="sourceLineNo">914</span>  }<a name="line.914"></a>
-<span class="sourceLineNo">915</span><a name="line.915"></a>
-<span class="sourceLineNo">916</span>  private void loadDataForPartitionPolicy(Admin admin, BufferedMutator table, TableName tableName)<a name="line.916"></a>
-<span class="sourceLineNo">917</span>      throws IOException {<a name="line.917"></a>
-<span class="sourceLineNo">918</span><a name="line.918"></a>
-<span class="sourceLineNo">919</span>    Put[] pArray = new Put[1000];<a name="line.919"></a>
-<span class="sourceLineNo">920</span><a name="line.920"></a>
-<span class="sourceLineNo">921</span>    for (int i = 0; i &lt; 1000; i ++) {<a name="line.921"></a>
-<span class="sourceLineNo">922</span>      Put put0 = new Put(Bytes.toBytes("r0" + i));<a name="line.922"></a>
-<span class="sourceLineNo">923</span>      put0.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151130Monday, Bytes.toBytes(mobValue0));<a name="line.923"></a>
-<span class="sourceLineNo">924</span>      pArray[i] = put0;<a name="line.924"></a>
-<span class="sourceLineNo">925</span>    }<a name="line.925"></a>
-<span class="sourceLineNo">926</span>    loadData(admin, bufMut, tableName, pArray);<a name="line.926"></a>
-<span class="sourceLineNo">927</span><a name="line.927"></a>
-<span class="sourceLineNo">928</span>    Put put06 = new Put(mobKey06);<a name="line.928"></a>
-<span class="sourceLineNo">929</span>    put06.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151128Saturday, Bytes.toBytes(mobValue0));<a name="line.929"></a>
-<span class="sourceLineNo">930</span><a name="line.930"></a>
-<span class="sourceLineNo">931</span>    loadData(admin, bufMut, tableName, new Put[] { put06 });<a name="line.931"></a>
-<span class="sourceLineNo">932</span><a name="line.932"></a>
-<span class="sourceLineNo">933</span>    Put put1 = new Put(mobKey1);<a name="line.933"></a>
-<span class="sourceLineNo">934</span>    put1.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151201Tuesday,<a name="line.934"></a>
-<span class="sourceLineNo">935</span>        Bytes.toBytes(mobValue1));<a name="line.935"></a>
-<span class="sourceLineNo">936</span>    loadData(admin, bufMut, tableName, new Put[] { put1 });<a name="line.936"></a>
-<span class="sourceLineNo">937</span><a name="line.937"></a>
-<span class="sourceLineNo">938</span>    Put put2 = new Put(mobKey2);<a name="line.938"></a>
-<span class="sourceLineNo">939</span>    put2.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151205Saturday,<a name="line.939"></a>
-<span class="sourceLineNo">940</span>        Bytes.toBytes(mobValue2));<a name="line.940"></a>
-<span class="sourceLineNo">941</span>    loadData(admin, bufMut, tableName, new Put[] { put2 });<a name="line.941"></a>
-<span class="sourceLineNo">942</span><a name="line.942"></a>
-<span class="sourceLineNo">943</span>    Put put3 = new Put(mobKey3);<a name="line.943"></a>
-<span class="sourceLineNo">944</span>    put3.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151228Monday,<a name="line.944"></a>
-<span class="sourceLineNo">945</span>        Bytes.toBytes(mobValue3));<a name="line.945"></a>
-<span class="sourceLineNo">946</span>    loadData(admin, bufMut, tableName, new Put[] { put3 });<a name="line.946"></a>
-<span class="sourceLineNo">947</span><a name="line.947"></a>
-<span class="sourceLineNo">948</span>    Put put4 = new Put(mobKey4);<a name="line.948"></a>
-<span class="sourceLineNo">949</span>    put4.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151231Thursday,<a name="line.949"></a>
-<span class="sourceLineNo">950</span>        Bytes.toBytes(mobValue4));<a name="line.950"></a>
-<span class="sourceLineNo">951</span>    loadData(admin, bufMut, tableName, new Put[] { put4 });<a name="line.951"></a>
-<span class="sourceLineNo">952</span><a name="line.952"></a>
-<span class="sourceLineNo">953</span>    Put put5 = new Put(mobKey5);<a name="line.953"></a>
-<span class="sourceLineNo">954</span>    put5.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20160101Friday,<a name="line.954"></a>
-<span class="sourceLineNo">955</span>        Bytes.toBytes(mobValue5));<a name="line.955"></a>
-<span class="sourceLineNo">956</span>    loadData(admin, bufMut, tableName, new Put[] { put5 });<a name="line.956"></a>
-<span class="sourceLineNo">957</span><a name="line.957"></a>
-<span class="sourceLineNo">958</span>    Put put6 = new Put(mobKey6);<a name="line.958"></a>
-<span class="sourceLineNo">959</span>    put6.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20160103Sunday,<a name="line.959"></a>
-<span class="sourceLineNo">960</span>        Bytes.toBytes(mobValue6));<a name="line.960"></a>
-<span class="sourceLineNo">961</span>    loadData(admin, bufMut, tableName, new Put[] { put6 });<a name="line.961"></a>
-<span class="sourceLineNo">962</span><a name="line.962"></a>
-<span class="sourceLineNo">963</span>    Put put7 = new Put(mobKey7);<a name="line.963"></a>
-<span class="sourceLineNo">964</span>    put7.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20150907Monday,<a name="line.964"></a>
-<span class="sourceLineNo">965</span>        Bytes.toBytes(mobValue7));<a name="line.965"></a>
-<span class="sourceLineNo">966</span>    loadData(admin, bufMut, tableName, new Put[] { put7 });<a name="line.966"></a>
-<span class="sourceLineNo">967</span><a name="line.967"></a>
-<span class="sourceLineNo">968</span>    Put put8 = new Put(mobKey8);<a name="line.968"></a>
-<span class="sourceLineNo">969</span>    put8.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151120Sunday,<a name="line.969"></a>
-<span class="sourceLineNo">970</span>        Bytes.toBytes(mobValue8));<a name="line.970"></a>
-<span class="sourceLineNo">971</span>    loadData(admin, bufMut, tableName, new Put[] { put8 });<a name="line.971"></a>
-<span class="sourceLineNo">972</span>  }<a name="line.972"></a>
+<span class="sourceLineNo">744</span>      }<a name="line.744"></a>
+<span class="sourceLineNo">745</span>    }<a name="line.745"></a>
+<span class="sourceLineNo">746</span>  }<a name="line.746"></a>
+<span class="sourceLineNo">747</span><a name="line.747"></a>
+<span class="sourceLineNo">748</span>  private void waitUntilMobCompactionFinished(TableName tableName) throws IOException,<a name="line.748"></a>
+<span class="sourceLineNo">749</span>    InterruptedException {<a name="line.749"></a>
+<span class="sourceLineNo">750</span>    long finished = EnvironmentEdgeManager.currentTime() + 60000;<a name="line.750"></a>
+<span class="sourceLineNo">751</span>    CompactionState state = admin.getCompactionState(tableName, CompactType.MOB);<a name="line.751"></a>
+<span class="sourceLineNo">752</span>    while (EnvironmentEdgeManager.currentTime() &lt; finished) {<a name="line.752"></a>
+<span class="sourceLineNo">753</span>      if (state == CompactionState.NONE) {<a name="line.753"></a>
+<span class="sourceLineNo">754</span>        break;<a name="line.754"></a>
+<span class="sourceLineNo">755</span>      }<a name="line.755"></a>
+<span class="sourceLineNo">756</span>      state = admin.getCompactionState(tableName, CompactType.MOB);<a name="line.756"></a>
+<span class="sourceLineNo">757</span>      Thread.sleep(10);<a name="line.757"></a>
+<span class="sourceLineNo">758</span>    }<a name="line.758"></a>
+<span class="sourceLineNo">759</span>    assertEquals(CompactionState.NONE, state);<a name="line.759"></a>
+<span class="sourceLineNo">760</span>  }<a name="line.760"></a>
+<span class="sourceLineNo">761</span><a name="line.761"></a>
+<span class="sourceLineNo">762</span>  /**<a name="line.762"></a>
+<span class="sourceLineNo">763</span>   * Gets the number of rows in the given table.<a name="line.763"></a>
+<span class="sourceLineNo">764</span>   * @param table to get the  scanner<a name="line.764"></a>
+<span class="sourceLineNo">765</span>   * @return the number of rows<a name="line.765"></a>
+<span class="sourceLineNo">766</span>   */<a name="line.766"></a>
+<span class="sourceLineNo">767</span>  private int countMobRows(final Table table) throws IOException {<a name="line.767"></a>
+<span class="sourceLineNo">768</span>    Scan scan = new Scan();<a name="line.768"></a>
+<span class="sourceLineNo">769</span>    // Do not retrieve the mob data when scanning<a name="line.769"></a>
+<span class="sourceLineNo">770</span>    scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE));<a name="line.770"></a>
+<span class="sourceLineNo">771</span>    return TEST_UTIL.countRows(table, scan);<a name="line.771"></a>
+<span class="sourceLineNo">772</span>  }<a name="line.772"></a>
+<span class="sourceLineNo">773</span><a name="line.773"></a>
+<span class="sourceLineNo">774</span>  /**<a name="line.774"></a>
+<span class="sourceLineNo">775</span>   * Gets the number of cells in the given table.<a name="line.775"></a>
+<span class="sourceLineNo">776</span>   * @param table to get the  scanner<a name="line.776"></a>
+<span class="sourceLineNo">777</span>   * @return the number of cells<a name="line.777"></a>
+<span class="sourceLineNo">778</span>   */<a name="line.778"></a>
+<span class="sourceLineNo">779</span>  private int countMobCells(final Table table) throws IOException {<a name="line.779"></a>
+<span class="sourceLineNo">780</span>    Scan scan = new Scan();<a name="line.780"></a>
+<span class="sourceLineNo">781</span>    // Do not retrieve the mob data when scanning<a name="line.781"></a>
+<span class="sourceLineNo">782</span>    scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE));<a name="line.782"></a>
+<span class="sourceLineNo">783</span>    ResultScanner results = table.getScanner(scan);<a name="line.783"></a>
+<span class="sourceLineNo">784</span>    int count = 0;<a name="line.784"></a>
+<span class="sourceLineNo">785</span>    for (Result res : results) {<a name="line.785"></a>
+<span class="sourceLineNo">786</span>      count += res.size();<a name="line.786"></a>
+<span class="sourceLineNo">787</span>    }<a name="line.787"></a>
+<span class="sourceLineNo">788</span>    results.close();<a name="line.788"></a>
+<span class="sourceLineNo">789</span>    return count;<a name="line.789"></a>
+<span class="sourceLineNo">790</span>  }<a name="line.790"></a>
+<span class="sourceLineNo">791</span><a name="line.791"></a>
+<span class="sourceLineNo">792</span>  /**<a name="line.792"></a>
+<span class="sourceLineNo">793</span>   * Gets the number of files in the mob path.<a name="line.793"></a>
+<span class="sourceLineNo">794</span>   * @param isMobFile gets number of the mob files or del files<a name="line.794"></a>
+<span class="sourceLineNo">795</span>   * @param familyName the family name<a name="line.795"></a>
+<span class="sourceLineNo">796</span>   * @return the number of the files<a name="line.796"></a>
+<span class="sourceLineNo">797</span>   */<a name="line.797"></a>
+<span class="sourceLineNo">798</span>  private int countFiles(TableName tableName, boolean isMobFile, String familyName)<a name="line.798"></a>
+<span class="sourceLineNo">799</span>    throws IOException {<a name="line.799"></a>
+<span class="sourceLineNo">800</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, familyName);<a name="line.800"></a>
+<span class="sourceLineNo">801</span>    int count = 0;<a name="line.801"></a>
+<span class="sourceLineNo">802</span>    if (fs.exists(mobDirPath)) {<a name="line.802"></a>
+<span class="sourceLineNo">803</span>      FileStatus[] files = fs.listStatus(mobDirPath);<a name="line.803"></a>
+<span class="sourceLineNo">804</span>      for (FileStatus file : files) {<a name="line.804"></a>
+<span class="sourceLineNo">805</span>        if (isMobFile == true) {<a name="line.805"></a>
+<span class="sourceLineNo">806</span>          if (!StoreFileInfo.isDelFile(file.getPath())) {<a name="line.806"></a>
+<span class="sourceLineNo">807</span>            count++;<a name="line.807"></a>
+<span class="sourceLineNo">808</span>          }<a name="line.808"></a>
+<span class="sourceLineNo">809</span>        } else {<a name="line.809"></a>
+<span class="sourceLineNo">810</span>          if (StoreFileInfo.isDelFile(file.getPath())) {<a name="line.810"></a>
+<span class="sourceLineNo">811</span>            count++;<a name="line.811"></a>
+<span class="sourceLineNo">812</span>          }<a name="line.812"></a>
+<span class="sourceLineNo">813</span>        }<a name="line.813"></a>
+<span class="sourceLineNo">814</span>      }<a name="line.814"></a>
+<span class="sourceLineNo">815</span>    }<a name="line.815"></a>
+<span class="sourceLineNo">816</span>    return count;<a name="line.816"></a>
+<span class="sourceLineNo">817</span>  }<a name="line.817"></a>
+<span class="sourceLineNo">818</span><a name="line.818"></a>
+<span class="sourceLineNo">819</span>  private boolean verifyEncryption(TableName tableName, String familyName) throws IOException {<a name="line.819"></a>
+<span class="sourceLineNo">820</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, familyName);<a name="line.820"></a>
+<span class="sourceLineNo">821</span>    boolean hasFiles = false;<a name="line.821"></a>
+<span class="sourceLineNo">822</span>    if (fs.exists(mobDirPath)) {<a name="line.822"></a>
+<span class="sourceLineNo">823</span>      FileStatus[] files = fs.listStatus(mobDirPath);<a name="line.823"></a>
+<span class="sourceLineNo">824</span>      hasFiles = files != null &amp;&amp; files.length &gt; 0;<a name="line.824"></a>
+<span class="sourceLineNo">825</span>      Assert.assertTrue(hasFiles);<a name="line.825"></a>
+<span class="sourceLineNo">826</span>      Path path = files[0].getPath();<a name="line.826"></a>
+<span class="sourceLineNo">827</span>      CacheConfig cacheConf = new CacheConfig(conf);<a name="line.827"></a>
+<span class="sourceLineNo">828</span>      HStoreFile sf = new HStoreFile(TEST_UTIL.getTestFileSystem(), path, conf, cacheConf,<a name="line.828"></a>
+<span class="sourceLineNo">829</span>        BloomType.NONE, true);<a name="line.829"></a>
+<span class="sourceLineNo">830</span>      sf.initReader();<a name="line.830"></a>
+<span class="sourceLineNo">831</span>      HFile.Reader reader = sf.getReader().getHFileReader();<a name="line.831"></a>
+<span class="sourceLineNo">832</span>      byte[] encryptionKey = reader.getTrailer().getEncryptionKey();<a name="line.832"></a>
+<span class="sourceLineNo">833</span>      Assert.assertTrue(null != encryptionKey);<a name="line.833"></a>
+<span class="sourceLineNo">834</span>      Assert.assertTrue(reader.getFileContext().getEncryptionContext().getCipher().getName()<a name="line.834"></a>
+<span class="sourceLineNo">835</span>        .equals(HConstants.CIPHER_AES));<a name="line.835"></a>
+<span class="sourceLineNo">836</span>    }<a name="line.836"></a>
+<span class="sourceLineNo">837</span>    return hasFiles;<a name="line.837"></a>
+<span class="sourceLineNo">838</span>  }<a name="line.838"></a>
+<span class="sourceLineNo">839</span><a name="line.839"></a>
+<span class="sourceLineNo">840</span>  /**<a name="line.840"></a>
+<span class="sourceLineNo">841</span>   * Gets the number of HFileLink in the mob path.<a name="line.841"></a>
+<span class="sourceLineNo">842</span>   * @param familyName the family name<a name="line.842"></a>
+<span class="sourceLineNo">843</span>   * @return the number of the HFileLink<a name="line.843"></a>
+<span class="sourceLineNo">844</span>   */<a name="line.844"></a>
+<span class="sourceLineNo">845</span>  private int countHFileLinks(String familyName) throws IOException {<a name="line.845"></a>
+<span class="sourceLineNo">846</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, familyName);<a name="line.846"></a>
+<span class="sourceLineNo">847</span>    int count = 0;<a name="line.847"></a>
+<span class="sourceLineNo">848</span>    if (fs.exists(mobDirPath)) {<a name="line.848"></a>
+<span class="sourceLineNo">849</span>      FileStatus[] files = fs.listStatus(mobDirPath);<a name="line.849"></a>
+<span class="sourceLineNo">850</span>      for (FileStatus file : files) {<a name="line.850"></a>
+<span class="sourceLineNo">851</span>        if (HFileLink.isHFileLink(file.getPath())) {<a name="line.851"></a>
+<span class="sourceLineNo">852</span>          count++;<a name="line.852"></a>
+<span class="sourceLineNo">853</span>        }<a name="line.853"></a>
+<span class="sourceLineNo">854</span>      }<a name="line.854"></a>
+<span class="sourceLineNo">855</span>    }<a name="line.855"></a>
+<span class="sourceLineNo">856</span>    return count;<a name="line.856"></a>
+<span class="sourceLineNo">857</span>  }<a name="line.857"></a>
+<span class="sourceLineNo">858</span><a name="line.858"></a>
+<span class="sourceLineNo">859</span>  /**<a name="line.859"></a>
+<span class="sourceLineNo">860</span>   * Gets the number of files.<a name="line.860"></a>
+<span class="sourceLineNo">861</span>   * @param size the size of the file<a name="line.861"></a>
+<span class="sourceLineNo">862</span>   * @param tableName the current table name<a name="line.862"></a>
+<span class="sourceLineNo">863</span>   * @param familyName the family name<a name="line.863"></a>
+<span class="sourceLineNo">864</span>   * @return the number of files large than the size<a name="line.864"></a>
+<span class="sourceLineNo">865</span>   */<a name="line.865"></a>
+<span class="sourceLineNo">866</span>  private int countLargeFiles(int size, TableName tableName, String familyName) throws IOException {<a name="line.866"></a>
+<span class="sourceLineNo">867</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, familyName);<a name="line.867"></a>
+<span class="sourceLineNo">868</span>    int count = 0;<a name="line.868"></a>
+<span class="sourceLineNo">869</span>    if (fs.exists(mobDirPath)) {<a name="line.869"></a>
+<span class="sourceLineNo">870</span>      FileStatus[] files = fs.listStatus(mobDirPath);<a name="line.870"></a>
+<span class="sourceLineNo">871</span>      for (FileStatus file : files) {<a name="line.871"></a>
+<span class="sourceLineNo">872</span>        // ignore the del files in the mob path<a name="line.872"></a>
+<span class="sourceLineNo">873</span>        if ((!StoreFileInfo.isDelFile(file.getPath())) &amp;&amp; (file.getLen() &gt; size)) {<a name="line.873"></a>
+<span class="sourceLineNo">874</span>          count++;<a name="line.874"></a>
+<span class="sourceLineNo">875</span>        }<a name="line.875"></a>
+<span class="sourceLineNo">876</span>      }<a name="line.876"></a>
+<span class="sourceLineNo">877</span>    }<a name="line.877"></a>
+<span class="sourceLineNo">878</span>    return count;<a name="line.878"></a>
+<span class="sourceLineNo">879</span>  }<a name="line.879"></a>
+<span class="sourceLineNo">880</span><a name="line.880"></a>
+<span class="sourceLineNo">881</span>  /**<a name="line.881"></a>
+<span class="sourceLineNo">882</span>   * loads some data to the table.<a name="line.882"></a>
+<span class="sourceLineNo">883</span>   */<a name="line.883"></a>
+<span class="sourceLineNo">884</span>  private void loadData(Admin admin, BufferedMutator table, TableName tableName, int fileNum,<a name="line.884"></a>
+<span class="sourceLineNo">885</span>    int rowNumPerFile) throws IOException, InterruptedException {<a name="line.885"></a>
+<span class="sourceLineNo">886</span>    if (fileNum &lt;= 0) {<a name="line.886"></a>
+<span class="sourceLineNo">887</span>      throw new IllegalArgumentException();<a name="line.887"></a>
+<span class="sourceLineNo">888</span>    }<a name="line.888"></a>
+<span class="sourceLineNo">889</span>    for (int i = 0; i &lt; fileNum * rowNumPerFile; i++) {<a name="line.889"></a>
+<span class="sourceLineNo">890</span>      for (byte k0 : KEYS) {<a name="line.890"></a>
+<span class="sourceLineNo">891</span>        byte[] k = new byte[] { k0 };<a name="line.891"></a>
+<span class="sourceLineNo">892</span>        byte[] key = Bytes.add(k, Bytes.toBytes(i));<a name="line.892"></a>
+<span class="sourceLineNo">893</span>        byte[] mobVal = makeDummyData(10 * (i + 1));<a name="line.893"></a>
+<span class="sourceLineNo">894</span>        Put put = new Put(key);<a name="line.894"></a>
+<span class="sourceLineNo">895</span>        put.setDurability(Durability.SKIP_WAL);<a name="line.895"></a>
+<span class="sourceLineNo">896</span>        put.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), mobVal);<a name="line.896"></a>
+<span class="sourceLineNo">897</span>        put.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf2), mobVal);<a name="line.897"></a>
+<span class="sourceLineNo">898</span>        put.addColumn(Bytes.toBytes(family2), Bytes.toBytes(qf1), mobVal);<a name="line.898"></a>
+<span class="sourceLineNo">899</span>        table.mutate(put);<a name="line.899"></a>
+<span class="sourceLineNo">900</span>      }<a name="line.900"></a>
+<span class="sourceLineNo">901</span>      if ((i + 1) % rowNumPerFile == 0) {<a name="line.901"></a>
+<span class="sourceLineNo">902</span>        table.flush();<a name="line.902"></a>
+<span class="sourceLineNo">903</span>        admin.flush(tableName);<a name="line.903"></a>
+<span class="sourceLineNo">904</span>      }<a name="line.904"></a>
+<span class="sourceLineNo">905</span>    }<a name="line.905"></a>
+<span class="sourceLineNo">906</span>  }<a name="line.906"></a>
+<span class="sourceLineNo">907</span><a name="line.907"></a>
+<span class="sourceLineNo">908</span>  private void loadData(Admin admin, BufferedMutator table, TableName tableName, Put[] puts)<a name="line.908"></a>
+<span class="sourceLineNo">909</span>    throws IOException {<a name="line.909"></a>
+<span class="sourceLineNo">910</span>    table.mutate(Arrays.asList(puts));<a name="line.910"></a>
+<span class="sourceLineNo">911</span>    table.flush();<a name="line.911"></a>
+<span class="sourceLineNo">912</span>    admin.flush(tableName);<a name="line.912"></a>
+<span class="sourceLineNo">913</span>  }<a name="line.913"></a>
+<span class="sourceLineNo">914</span><a name="line.914"></a>
+<span class="sourceLineNo">915</span>  private void loadDataForPartitionPolicy(Admin admin, BufferedMutator table, TableName tableName)<a name="line.915"></a>
+<span class="sourceLineNo">916</span>      throws IOException {<a name="line.916"></a>
+<span class="sourceLineNo">917</span><a name="line.917"></a>
+<span class="sourceLineNo">918</span>    Put[] pArray = new Put[1000];<a name="line.918"></a>
+<span class="sourceLineNo">919</span><a name="line.919"></a>
+<span class="sourceLineNo">920</span>    for (int i = 0; i &lt; 1000; i ++) {<a name="line.920"></a>
+<span class="sourceLineNo">921</span>      Put put0 = new Put(Bytes.toBytes("r0" + i));<a name="line.921"></a>
+<span class="sourceLineNo">922</span>      put0.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151130Monday, Bytes.toBytes(mobValue0));<a name="line.922"></a>
+<span class="sourceLineNo">923</span>      pArray[i] = put0;<a name="line.923"></a>
+<span class="sourceLineNo">924</span>    }<a name="line.924"></a>
+<span class="sourceLineNo">925</span>    loadData(admin, bufMut, tableName, pArray);<a name="line.925"></a>
+<span class="sourceLineNo">926</span><a name="line.926"></a>
+<span class="sourceLineNo">927</span>    Put put06 = new Put(mobKey06);<a name="line.927"></a>
+<span class="sourceLineNo">928</span>    put06.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151128Saturday, Bytes.toBytes(mobValue0));<a name="line.928"></a>
+<span class="sourceLineNo">929</span><a name="line.929"></a>
+<span class="sourceLineNo">930</span>    loadData(admin, bufMut, tableName, new Put[] { put06 });<a name="line.930"></a>
+<span class="sourceLineNo">931</span><a name="line.931"></a>
+<span class="sourceLineNo">932</span>    Put put1 = new Put(mobKey1);<a name="line.932"></a>
+<span class="sourceLineNo">933</span>    put1.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151201Tuesday,<a name="line.933"></a>
+<span class="sourceLineNo">934</span>        Bytes.toBytes(mobValue1));<a name="line.934"></a>
+<span class="sourceLineNo">935</span>    loadData(admin, bufMut, tableName, new Put[] { put1 });<a name="line.935"></a>
+<span class="sourceLineNo">936</span><a name="line.936"></a>
+<span class="sourceLineNo">937</span>    Put put2 = new Put(mobKey2);<a name="line.937"></a>
+<span class="sourceLineNo">938</span>    put2.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151205Saturday,<a name="line.938"></a>
+<span class="sourceLineNo">939</span>        Bytes.toBytes(mobValue2));<a name="line.939"></a>
+<span class="sourceLineNo">940</span>    loadData(admin, bufMut, tableName, new Put[] { put2 });<a name="line.940"></a>
+<span class="sourceLineNo">941</span><a name="line.941"></a>
+<span class="sourceLineNo">942</span>    Put put3 = new Put(mobKey3);<a name="line.942"></a>
+<span class="sourceLineNo">943</span>    put3.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151228Monday,<a name="line.943"></a>
+<span class="sourceLineNo">944</span>        Bytes.toBytes(mobValue3));<a name="line.944"></a>
+<span class="sourceLineNo">945</span>    loadData(admin, bufMut, tableName, new Put[] { put3 });<a name="line.945"></a>
+<span class="sourceLineNo">946</span><a name="line.946"></a>
+<span class="sourceLineNo">947</span>    Put put4 = new Put(mobKey4);<a name="line.947"></a>
+<span class="sourceLineNo">948</span>    put4.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151231Thursday,<a name="line.948"></a>
+<span class="sourceLineNo">949</span>        Bytes.toBytes(mobValue4));<a name="line.949"></a>
+<span class="sourceLineNo">950</span>    loadData(admin, bufMut, tableName, new Put[] { put4 });<a name="line.950"></a>
+<span class="sourceLineNo">951</span><a name="line.951"></a>
+<span class="sourceLineNo">952</span>    Put put5 = new Put(mobKey5);<a name="line.952"></a>
+<span class="sourceLineNo">953</span>    put5.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20160101Friday,<a name="line.953"></a>
+<span class="sourceLineNo">954</span>        Bytes.toBytes(mobValue5));<a name="line.954"></a>
+<span class="sourceLineNo">955</span>    loadData(admin, bufMut, tableName, new Put[] { put5 });<a name="line.955"></a>
+<span class="sourceLineNo">956</span><a name="line.956"></a>
+<span class="sourceLineNo">957</span>    Put put6 = new Put(mobKey6);<a name="line.957"></a>
+<span class="sourceLineNo">958</span>    put6.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20160103Sunday,<a name="line.958"></a>
+<span class="sourceLineNo">959</span>        Bytes.toBytes(mobValue6));<a name="line.959"></a>
+<span class="sourceLineNo">960</span>    loadData(admin, bufMut, tableName, new Put[] { put6 });<a name="line.960"></a>
+<span class="sourceLineNo">961</span><a name="line.961"></a>
+<span class="sourceLineNo">962</span>    Put put7 = new Put(mobKey7);<a name="line.962"></a>
+<span class="sourceLineNo">963</span>    put7.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20150907Monday,<a name="line.963"></a>
+<span class="sourceLineNo">964</span>        Bytes.toBytes(mobValue7));<a name="line.964"></a>
+<span class="sourceLineNo">965</span>    loadData(admin, bufMut, tableName, new Put[] { put7 });<a name="line.965"></a>
+<span class="sourceLineNo">966</span><a name="line.966"></a>
+<span class="sourceLineNo">967</span>    Put put8 = new Put(mobKey8);<a name="line.967"></a>
+<span class="sourceLineNo">968</span>    put8.addColumn(Bytes.toBytes(family1), Bytes.toBytes(qf1), tsFor20151120Sunday,<a name="line.968"></a>
+<span class="sourceLineNo">969</span>        Bytes.toBytes(mobValue8));<a name="line.969"></a>
+<span class="sourceLineNo">970</span>    loadData(admin, bufMut, tableName, new Put[] { put8 });<a name="line.970"></a>
+<span class="sourceLineNo">971</span>  }<a name="line.971"></a>
+<span class="sourceLineNo">972</span><a name="line.972"></a>
 <span class="sourceLineNo">973</span><a name="line.973"></a>
-<span class="sourceLineNo">974</span><a name="line.974"></a>
-<span class="sourceLineNo">975</span>  /**<a name="line.975"></a>
-<span class="sourceLineNo">976</span>   * delete the row, family and cell to create the del file<a name="line.976"></a>
-<span class="sourceLineNo">977</span>   */<a name="line.977"></a>
-<span class="sourceLineNo">978</span>  private void createDelFile(Table table, TableName tableName, byte[] family, byte[] qf)<a name="line.978"></a>
-<span class="sourceLineNo">979</span>    throws IOException, InterruptedException {<a name="line.979"></a>
-<span class="sourceLineNo">980</span>    for (byte k0 : KEYS) {<a name="line.980"></a>
-<span class="sourceLineNo">981</span>      byte[] k = new byte[] { k0 };<a name="line.981"></a>
-<span class="sourceLineNo">982</span>      // delete a family<a name="line.982"></a>
-<span class="sourceLineNo">983</span>      byte[] key1 = Bytes.add(k, Bytes.toBytes(0));<a name="line.983"></a>
-<span class="sourceLineNo">984</span>      Delete delete1 = new Delete(key1);<a name="line.984"></a>
-<span class="sourceLineNo">985</span>      delete1.addFamily(family);<a name="line.985"></a>
-<span class="sourceLineNo">986</span>      table.delete(delete1);<a name="line.986"></a>
-<span class="sourceLineNo">987</span>      // delete one row<a name="line.987"></a>
-<span class="sourceLineNo">988</span>      byte[] key2 = Bytes.add(k, Bytes.toBytes(2));<a name="line.988"></a>
-<span class="sourceLineNo">989</span>      Delete delete2 = new Delete(key2);<a name="line.989"></a>
-<span class="sourceLineNo">990</span>      table.delete(delete2);<a name="line.990"></a>
-<span class="sourceLineNo">991</span>      // delete one cell<a name="line.991"></a>
-<span class="sourceLineNo">992</span>      byte[] key3 = Bytes.add(k, Bytes.toBytes(4));<a name="line.992"></a>
-<span class="sourceLineNo">993</span>      Delete delete3 = new Delete(key3);<a name="line.993"></a>
-<span class="sourceLineNo">994</span>      delete3.addColumn(family, qf);<a name="line.994"></a>
-<span class="sourceLineNo">995</span>      table.delete(delete3);<a name="line.995"></a>
-<span class="sourceLineNo">996</span>    }<a name="line.996"></a>
-<span class="sourceLineNo">997</span>    admin.flush(tableName);<a name="line.997"></a>
-<span class="sourceLineNo">998</span>    List&lt;HRegion&gt; regions = TEST_UTIL.getHBaseCluster().getRegions(tableName);<a name="line.998"></a>
-<span class="sourceLineNo">999</span>    for (HRegion region : regions) {<a name="line.999"></a>
-<span class="sourceLineNo">1000</span>      region.waitForFlushesAndCompactions();<a name="line.1000"></a>
-<span class="sourceLineNo">1001</span>      region.compact(true);<a name="line.1001"></a>
-<span class="sourceLineNo">1002</span>    }<a name="line.1002"></a>
-<span class="sourceLineNo">1003</span>  }<a name="line.1003"></a>
-<span class="sourceLineNo">1004</span>  /**<a name="line.1004"></a>
-<span class="sourceLineNo">1005</span>   * Creates the dummy data with a specific size.<a name="line.1005"></a>
-<span class="sourceLineNo">1006</span>   * @param size the size of value<a name="line.1006"></a>
-<span class="sourceLineNo">1007</span>   * @return the dummy data<a name="line.1007"></a>
-<span class="sourceLineNo">1008</span>   */<a name="line.1008"></a>
-<span class="sourceLineNo">1009</span>  private byte[] makeDummyData(int size) {<a name="line.1009"></a>
-<span class="sourceLineNo">1010</span>    byte[] dummyData = new byte[size];<a name="line.1010"></a>
-<span class="sourceLineNo">1011</span>    new Random().nextBytes(dummyData);<a name="line.1011"></a>
-<span class="sourceLineNo">1012</span>    return dummyData;<a name="line.1012"></a>
-<span class="sourceLineNo">1013</span>  }<a name="line.1013"></a>
-<span class="sourceLineNo">1014</span><a name="line.1014"></a>
-<span class="sourceLineNo">1015</span>  /**<a name="line.1015"></a>
-<span class="sourceLineNo">1016</span>   * Gets the split keys<a name="line.1016"></a>
-<span class="sourceLineNo">1017</span>   */<a name="line.1017"></a>
-<span class="sourceLineNo">1018</span>  private byte[][] getSplitKeys() {<a name="line.1018"></a>
-<span class="sourceLineNo">1019</span>    byte[][] splitKeys = new byte[KEYS.length - 1][];<a name="line.1019"></a>
-<span class="sourceLineNo">1020</span>    for (int i = 0; i &lt; splitKeys.length; ++i) {<a name="line.1020"></a>
-<span class="sourceLineNo">1021</span>      splitKeys[i] = new byte[] { KEYS[i + 1] };<a name="line.1021"></a>
-<span class="sourceLineNo">1022</span>    }<a name="line.1022"></a>
-<span class="sourceLineNo">1023</span>    return splitKeys;<a name="line.1023"></a>
-<span class="sourceLineNo">1024</span>  }<a name="line.1024"></a>
-<span class="sourceLineNo">1025</span><a name="line.1025"></a>
-<span class="sourceLineNo">1026</span>  private static ExecutorService createThreadPool(Configuration conf) {<a name="line.1026"></a>
-<span class="sourceLineNo">1027</span>    int maxThreads = 10;<a name="line.1027"></a>
-<span class="sourceLineNo">1028</span>    long keepAliveTime = 60;<a name="line.1028"></a>
-<span class="sourceLineNo">1029</span>    final SynchronousQueue&lt;Runnable&gt; queue = new SynchronousQueue&lt;&gt;();<a name="line.1029"></a>
-<span class="sourceLineNo">1030</span>    ThreadPoolExecutor pool = new ThreadPoolExecutor(1, maxThreads,<a name="line.1030"></a>
-<span class="sourceLineNo">1031</span>        keepAliveTime, TimeUnit.SECONDS, queue,<a name="line.1031"></a>
-<span class="sourceLineNo">1032</span>        Threads.newDaemonThreadFactory("MobFileCompactionChore"),<a name="line.1032"></a>
-<span class="sourceLineNo">1033</span>        new RejectedExecutionHandler() {<a name="line.1033"></a>
-<span class="sourceLineNo">1034</span>          @Override<a name="line.1034"></a>
-<span class="sourceLineNo">1035</span>          public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {<a name="line.1035"></a>
-<span class="sourceLineNo">1036</span>            try {<a name="line.1036"></a>
-<span class="sourceLineNo">1037</span>              // waiting for a thread to pick up instead of throwing exceptions.<a name="line.1037"></a>
-<span class="sourceLineNo">1038</span>              queue.put(r);<a name="line.1038"></a>
-<span class="sourceLineNo">1039</span>            } catch (InterruptedException e) {<a name="line.1039"></a>
-<span class="sourceLineNo">1040</span>              throw new RejectedExecutionException(e);<a name="line.1040"></a>
-<span class="sourceLineNo">1041</span>            }<a name="line.1041"></a>
-<span class="sourceLineNo">1042</span>          }<a name="line.1042"></a>
-<span class="sourceLineNo">1043</span>        });<a name="line.1043"></a>
-<span class="sourceLineNo">1044</span>    ((ThreadPoolExecutor) pool).allowCoreThreadTimeOut(true);<a name="line.1044"></a>
-<span class="sourceLineNo">1045</span>    return pool;<a name="line.1045"></a>
-<span class="sourceLineNo">1046</span>  }<a name="line.1046"></a>
-<span class="sourceLineNo">1047</span><a name="line.1047"></a>
-<span class="sourceLineNo">1048</span>  private void assertRefFileNameEqual(String familyName) throws IOException {<a name="line.1048"></a>
-<span class="sourceLineNo">1049</span>    Scan scan = new Scan();<a name="line.1049"></a>
-<span class="sourceLineNo">1050</span>    scan.addFamily(Bytes.toBytes(familyName));<a name="line.1050"></a>
-<span class="sourceLineNo">1051</span>    // Do not retrieve the mob data when scanning<a name="line.1051"></a>
-<span class="sourceLineNo">1052</span>    scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE));<a name="line.1052"></a>
-<span class="sourceLineNo">1053</span>    ResultScanner results = table.getScanner(scan);<a name="line.1053"></a>
-<span class="sourceLineNo">1054</span>    Path mobFamilyPath = MobUtils.getMobFamilyPath(TEST_UTIL.getConfiguration(),<a name="line.1054"></a>
-<span class="sourceLineNo">1055</span>        tableName, familyName);<a name="line.1055"></a>
-<span class="sourceLineNo">1056</span>    List&lt;Path&gt; actualFilePaths = new ArrayList&lt;&gt;();<a name="line.1056"></a>
-<span class="sourceLineNo">1057</span>    List&lt;Path&gt; expectFilePaths = new ArrayList&lt;&gt;();<a name="line.1057"></a>
-<span class="sourceLineNo">1058</span>    for (Result res : results) {<a name="line.1058"></a>
-<span class="sourceLineNo">1059</span>      for (Cell cell : res.listCells()) {<a name="line.1059"></a>
-<span class="sourceLineNo">1060</span>        byte[] referenceValue = CellUtil.cloneValue(cell);<a name="line.1060"></a>
-<span class="sourceLineNo">1061</span>        String fileName = Bytes.toString(referenceValue, Bytes.SIZEOF_INT,<a name="line.1061"></a>
-<span class="sourceLineNo">1062</span>            referenceValue.length - Bytes.SIZEOF_INT);<a name="line.1062"></a>
-<span class="sourceLineNo">1063</span>        Path targetPath = new Path(mobFamilyPath, fileName);<a name="line.1063"></a>
-<span class="sourceLineNo">1064</span>        if(!actualFilePaths.contains(targetPath)) {<a name="line.1064"></a>
-<span class="sourceLineNo">1065</span>          actualFilePaths.add(targetPath);<a name="line.1065"></a>
-<span class="sourceLineNo">1066</span>        }<a name="line.1066"></a>
-<span class="sourceLineNo">1067</span>      }<a name="line.1067"></a>
-<span class="sourceLineNo">1068</span>    }<a name="line.1068"></a>
-<span class="sourceLineNo">1069</span>    results.close();<a name="line.1069"></a>
-<span class="sourceLineNo">1070</span>    if (fs.exists(mobFamilyPath)) {<a name="line.1070"></a>
-<span class="sourceLineNo">1071</span>      FileStatus[] files = fs.listStatus(mobFamilyPath);<a name="line.1071"></a>
-<span class="sourceLineNo">1072</span>      for (FileStatus file : files) {<a name="line.1072"></a>
-<span class="sourceLineNo">1073</span>        if (!StoreFileInfo.isDelFile(file.getPath())) {<a name="line.1073"></a>
-<span class="sourceLineNo">1074</span>          expectFilePaths.add(file.getPath());<a name="line.1074"></a>
-<span class="sourceLineNo">1075</span>        }<a name="line.1075"></a>
-<span class="sourceLineNo">1076</span>      }<a name="line.1076"></a>
-<span class="sourceLineNo">1077</span>    }<a name="line.1077"></a>
-<span class="sourceLineNo">1078</span>    Collections.sort(actualFilePaths);<a name="line.1078"></a>
-<span class="sourceLineNo">1079</span>    Collections.sort(expectFilePaths);<a name="line.1079"></a>
-<span class="sourceLineNo">1080</span>    assertEquals(expectFilePaths, actualFilePaths);<a name="line.1080"></a>
-<span class="sourceLineNo">1081</span>  }<a name="line.1081"></a>
-<span class="sourceLineNo">1082</span><a name="line.1082"></a>
-<span class="sourceLineNo">1083</span>  /**<a name="line.1083"></a>
-<span class="sourceLineNo">1084</span>   * Resets the configuration.<a name="line.1084"></a>
-<span class="sourceLineNo">1085</span>   */<a name="line.1085"></a>
-<span class="sourceLineNo">1086</span>  private void resetConf() {<a name="line.1086"></a>
-<span class="sourceLineNo">1087</span>    conf.setLong(MobConstants.MOB_COMPACTION_MERGEABLE_THRESHOLD,<a name="line.1087"></a>
-<span class="sourceLineNo">1088</span>      MobConstants.DEFAULT_MOB_COMPACTION_MERGEABLE_THRESHOLD);<a name="line.1088"></a>
-<span class="sourceLineNo">1089</span>    conf.setInt(MobConstants.MOB_COMPACTION_BATCH_SIZE,<a name="line.1089"></a>
-<span class="sourceLineNo">1090</span>      MobConstants.DEFAULT_MOB_COMPACTION_BATCH_SIZE);<a name="line.1090"></a>
-<span class="sourceLineNo">1091</span>  }<a name="line.1091"></a>
-<span class="sourceLineNo">1092</span><a name="line.1092"></a>
-<span class="sourceLineNo">1093</span>  /**<a name="line.1093"></a>
-<span class="sourceLineNo">1094</span>   * Verify mob partition policy compaction values.<a name="line.1094"></a>
-<span class="sourceLineNo">1095</span>   */<a name="line.1095"></a>
-<span class="sourceLineNo">1096</span>  private void verifyPolicyValues() throws Exception {<a name="line.1096"></a>
-<span class="sourceLineNo">1097</span>    Get get = new Get(mobKey01);<a name="line.1097"></a>
-<span class="sourceLineNo">1098</span>    Result result = table.get(get);<a name="line.1098"></a>
-<span class="sourceLineNo">1099</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1099"></a>
-<span class="sourceLineNo">1100</span>        Bytes.toBytes(mobValue0)));<a name="line.1100"></a>
-<span class="sourceLineNo">1101</span><a name="line.1101"></a>
-<span class="sourceLineNo">1102</span>    get = new Get(mobKey02);<a name="line.1102"></a>
-<span class="sourceLineNo">1103</span>    result = table.get(get);<a name="line.1103"></a>
-<span class="sourceLineNo">1104</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1104"></a>
-<span class="sourceLineNo">1105</span>        Bytes.toBytes(mobValue0)));<a name="line.1105"></a>
-<span class="sourceLineNo">1106</span><a name="line.1106"></a>
-<span class="sourceLineNo">1107</span>    get = new Get(mobKey03);<a name="line.1107"></a>
-<span class="sourceLineNo">1108</span>    result = table.get(get);<a name="line.1108"></a>
-<span class="sourceLineNo">1109</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1109"></a>
-<span class="sourceLineNo">1110</span>        Bytes.toBytes(mobValue0)));<a name="line.1110"></a>
-<span class="sourceLineNo">1111</span><a name="line.1111"></a>
-<span class="sourceLineNo">1112</span>    get = new Get(mobKey04);<a name="line.1112"></a>
-<span class="sourceLineNo">1113</span>    result = table.get(get);<a name="line.1113"></a>
-<span class="sourceLineNo">1114</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1114"></a>
-<span class="sourceLineNo">1115</span>        Bytes.toBytes(mobValue0)));<a name="line.1115"></a>
-<span class="sourceLineNo">1116</span><a name="line.1116"></a>
-<span class="sourceLineNo">1117</span>    get = new Get(mobKey05);<a name="line.1117"></a>
-<span class="sourceLineNo">1118</span>    result = table.get(get);<a name="line.1118"></a>
-<span class="sourceLineNo">1119</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1119"></a>
-<span class="sourceLineNo">1120</span>        Bytes.toBytes(mobValue0)));<a name="line.1120"></a>
-<span class="sourceLineNo">1121</span><a name="line.1121"></a>
-<span class="sourceLineNo">1122</span>    get = new Get(mobKey06);<a name="line.1122"></a>
-<span class="sourceLineNo">1123</span>    result = table.get(get);<a name="line.1123"></a>
-<span class="sourceLineNo">1124</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1124"></a>
-<span class="sourceLineNo">1125</span>        Bytes.toBytes(mobValue0)));<a name="line.1125"></a>
-<span class="sourceLineNo">1126</span><a name="line.1126"></a>
-<span class="sourceLineNo">1127</span>    get = new Get(mobKey1);<a name="line.1127"></a>
-<span class="sourceLineNo">1128</span>    result = table.get(get);<a name="line.1128"></a>
-<span class="sourceLineNo">1129</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1129"></a>
-<span class="sourceLineNo">1130</span>        Bytes.toBytes(mobValue1)));<a name="line.1130"></a>
-<span class="sourceLineNo">1131</span><a name="line.1131"></a>
-<span class="sourceLineNo">1132</span>    get = new Get(mobKey2);<a name="line.1132"></a>
-<span class="sourceLineNo">1133</span>    result = table.get(get);<a name="line.1133"></a>
-<span class="sourceLineNo">1134</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1134"></a>
-<span class="sourceLineNo">1135</span>        Bytes.toBytes(mobValue2)));<a name="line.1135"></a>
-<span class="sourceLineNo">1136</span><a name="line.1136"></a>
-<span class="sourceLineNo">1137</span>    get = new Get(mobKey3);<a name="line.1137"></a>
-<span class="sourceLineNo">1138</span>    result = table.get(get);<a name="line.1138"></a>
-<span class="sourceLineNo">1139</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1139"></a>
-<span class="sourceLineNo">1140</span>        Bytes.toBytes(mobValue3)));<a name="line.1140"></a>
-<span class="sourceLineNo">1141</span><a name="line.1141"></a>
-<span class="sourceLineNo">1142</span>    get = new Get(mobKey4);<a name="line.1142"></a>
-<span class="sourceLineNo">1143</span>    result = table.get(get);<a name="line.1143"></a>
-<span class="sourceLineNo">1144</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1144"></a>
-<span class="sourceLineNo">1145</span>        Bytes.toBytes(mobValue4)));<a name="line.1145"></a>
-<span class="sourceLineNo">1146</span><a name="line.1146"></a>
-<span class="sourceLineNo">1147</span>    get = new Get(mobKey5);<a name="line.1147"></a>
-<span class="sourceLineNo">1148</span>    result = table.get(get);<a name="line.1148"></a>
-<span class="sourceLineNo">1149</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1149"></a>
-<span class="sourceLineNo">1150</span>        Bytes.toBytes(mobValue5)));<a name="line.1150"></a>
-<span class="sourceLineNo">1151</span><a name="line.1151"></a>
-<span class="sourceLineNo">1152</span>    get = new Get(mobKey6);<a name="line.1152"></a>
-<span class="sourceLineNo">1153</span>    result = table.get(get);<a name="line.1153"></a>
-<span class="sourceLineNo">1154</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1154"></a>
-<span class="sourceLineNo">1155</span>        Bytes.toBytes(mobValue6)));<a name="line.1155"></a>
-<span class="sourceLineNo">1156</span><a name="line.1156"></a>
-<span class="sourceLineNo">1157</span>    get = new Get(mobKey7);<a name="line.1157"></a>
-<span class="sourceLineNo">1158</span>    result = table.get(get);<a name="line.1158"></a>
-<span class="sourceLineNo">1159</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1159"></a>
-<span class="sourceLineNo">1160</span>        Bytes.toBytes(mobValue7)));<a name="line.1160"></a>
-<span class="sourceLineNo">1161</span><a name="line.1161"></a>
-<span class="sourceLineNo">1162</span>    get = new Get(mobKey8);<a name="line.1162"></a>
-<span class="sourceLineNo">1163</span>    result = table.get(get);<a name="line.1163"></a>
-<span class="sourceLineNo">1164</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1164"></a>
-<span class="sourceLineNo">1165</span>        Bytes.toBytes(mobValue8)));<a name="line.1165"></a>
-<span class="sourceLineNo">1166</span>  }<a name="line.1166"></a>
-<span class="sourceLineNo">1167</span><a name="line.1167"></a>
-<span class="sourceLineNo">1168</span>  private void commonPolicyTestLogic (final String tableNameAsString,<a name="line.1168"></a>
-<span class="sourceLineNo">1169</span>      final MobCompactPartitionPolicy pType, final boolean majorCompact,<a name="line.1169"></a>
-<span class="sourceLineNo">1170</span>      final int expectedFileNumbers, final String[] expectedFileNames,<a name="line.1170"></a>
-<span class="sourceLineNo">1171</span>      final boolean setupAndLoadData<a name="line.1171"></a>
-<span class="sourceLineNo">1172</span>      ) throws Exception {<a name="line.1172"></a>
-<span class="sourceLineNo">1173</span>    if (setupAndLoadData) {<a name="line.1173"></a>
-<span class="sourceLineNo">1174</span>      setUpForPolicyTest(tableNameAsString, pType);<a name="line.1174"></a>
-<span class="sourceLineNo">1175</span><a name="line.1175"></a>
-<span class="sourceLineNo">1176</span>      loadDataForPartitionPolicy(admin, bufMut, tableName);<a name="line.1176"></a>
-<span class="sourceLineNo">1177</span>    } else {<a name="line.1177"></a>
-<span class="sourceLineNo">1178</span>      alterForPolicyTest(pType);<a name="line.1178"></a>
-<span class="sourceLineNo">1179</span>    }<a name="line.1179"></a>
-<span class="sourceLineNo">1180</span><a name="line.1180"></a>
-<span class="sourceLineNo">1181</span>    if (majorCompact) {<a name="line.1181"></a>
-<span class="sourceLineNo">1182</span>      admin.majorCompact(tableName, hcd1.getName(), CompactType.MOB);<a name="line.1182"></a>
-<span class="sourceLineNo">1183</span>    } else {<a name="line.1183"></a>
-<span class="sourceLineNo">1184</span>      admin.compact(tableName, hcd1.getName(), CompactType.MOB);<a name="line.1184"></a>
-<span class="sourceLineNo">1185</span>    }<a name="line.1185"></a>
-<span class="sourceLineNo">1186</span><a name="line.1186"></a>
-<span class="sourceLineNo">1187</span>    waitUntilMobCompactionFinished(tableName);<a name="line.1187"></a>
-<span class="sourceLineNo">1188</span><a name="line.1188"></a>
-<span class="sourceLineNo">1189</span>    // Run cleaner to make sure that files in archive directory are cleaned up<a name="line.1189"></a>
-<span class="sourceLineNo">1190</span>    TEST_UTIL.getMiniHBaseCluster().getMaster().getHFileCleaner().choreForTesting();<a name="line.1190"></a>
-<span class="sourceLineNo">1191</span><a name="line.1191"></a>
-<span class="sourceLineNo">1192</span>    //check the number of files<a name="line.1192"></a>
-<span class="sourceLineNo">1193</span>    Path mobDirPath = MobUtils.getMobFamilyPath(conf, tableName, family1);<a name="line.1193"></a>
-<span class="sourceLineNo">1194</span>    FileStatus[] fileList = fs.listStatus(mobDirPath);<a name="line.1194"></a>
-<span class="sourceLineNo">1195</span><a name="line.1195"></a>
-<span class="sourceLineNo">1196</span>    assertTrue(fileList.length == expectedFileNumbers);<a name="line.1196"></a>
-<span class="sourceLineNo">1197</span><a name="line.1197"></a>
-<span class="sourceLineNo">1198</span>    // the file names are expected<a name="line.1198"></a>
-<span class="sourceLineNo">1199</span>    ArrayList&lt;String&gt; fileNames = new ArrayList&lt;&gt;(expectedFileNumbers);<a name="line.1199"></a>
-<span class="sourceLineNo">1200</span>    for (FileStatus file : fileList) {<a name="line.1200"></a>
-<span class="sourceLineNo">1201</span>      fileNames.add(MobFileName.getDateFromName(file.getPath().getName()));<a name="line.1201"></a>
-<span class="sourceLineNo">1202</span>    }<a name="line.1202"></a>
-<span class="sourceLineNo">1203</span>    int index = 0;<a name="line.1203"></a>
-<span class="sourceLineNo">1204</span>    for (String fileName : expectedFileNames) {<a name="line.1204"></a>
-<span class="sourceLineNo">1205</span>      index = fileNames.indexOf(fileName);<a name="line.1205"></a>
-<span class="sourceLineNo">1206</span>      assertTrue(index &gt;= 0);<a name="line.1206"></a>
-<span class="sourceLineNo">1207</span>      fileNames.remove(index);<a name="line.1207"></a>
-<span class="sourceLineNo">1208</span>    }<a name="line.1208"></a>
-<span class="sourceLineNo">1209</span><a name="line.1209"></a>
-<span class="sourceLineNo">1210</span>    // Check daily mob files are removed from the mobdir, and only weekly mob files are there.<a name="line.1210"></a>
-<span class="sourceLineNo">1211</span>    // Also check that there is no data loss.<a name="line.1211"></a>
-<span class="sourceLineNo">1212</span><a name="line.1212"></a>
-<span class="sourceLineNo">1213</span>    verifyPolicyValues();<a name="line.1213"></a>
-<span class="sourceLineNo">1214</span>  }<a name="line.1214"></a>
-<span class="sourceLineNo">1215</span> }<a name="line.1215"></a>
+<span class="sourceLineNo">974</span>  /**<a name="line.974"></a>
+<span class="sourceLineNo">975</span>   * delete the row, family and cell to create the del file<a name="line.975"></a>
+<span class="sourceLineNo">976</span>   */<a name="line.976"></a>
+<span class="sourceLineNo">977</span>  private void createDelFile(Table table, TableName tableName, byte[] family, byte[] qf)<a name="line.977"></a>
+<span class="sourceLineNo">978</span>    throws IOException, InterruptedException {<a name="line.978"></a>
+<span class="sourceLineNo">979</span>    for (byte k0 : KEYS) {<a name="line.979"></a>
+<span class="sourceLineNo">980</span>      byte[] k = new byte[] { k0 };<a name="line.980"></a>
+<span class="sourceLineNo">981</span>      // delete a family<a name="line.981"></a>
+<span class="sourceLineNo">982</span>      byte[] key1 = Bytes.add(k, Bytes.toBytes(0));<a name="line.982"></a>
+<span class="sourceLineNo">983</span>      Delete delete1 = new Delete(key1);<a name="line.983"></a>
+<span class="sourceLineNo">984</span>      delete1.addFamily(family);<a name="line.984"></a>
+<span class="sourceLineNo">985</span>      table.delete(delete1);<a name="line.985"></a>
+<span class="sourceLineNo">986</span>      // delete one row<a name="line.986"></a>
+<span class="sourceLineNo">987</span>      byte[] key2 = Bytes.add(k, Bytes.toBytes(2));<a name="line.987"></a>
+<span class="sourceLineNo">988</span>      Delete delete2 = new Delete(key2);<a name="line.988"></a>
+<span class="sourceLineNo">989</span>      table.delete(delete2);<a name="line.989"></a>
+<span class="sourceLineNo">990</span>      // delete one cell<a name="line.990"></a>
+<span class="sourceLineNo">991</span>      byte[] key3 = Bytes.add(k, Bytes.toBytes(4));<a name="line.991"></a>
+<span class="sourceLineNo">992</span>      Delete delete3 = new Delete(key3);<a name="line.992"></a>
+<span class="sourceLineNo">993</span>      delete3.addColumn(family, qf);<a name="line.993"></a>
+<span class="sourceLineNo">994</span>      table.delete(delete3);<a name="line.994"></a>
+<span class="sourceLineNo">995</span>    }<a name="line.995"></a>
+<span class="sourceLineNo">996</span>    admin.flush(tableName);<a name="line.996"></a>
+<span class="sourceLineNo">997</span>    List&lt;HRegion&gt; regions = TEST_UTIL.getHBaseCluster().getRegions(tableName);<a name="line.997"></a>
+<span class="sourceLineNo">998</span>    for (HRegion region : regions) {<a name="line.998"></a>
+<span class="sourceLineNo">999</span>      region.waitForFlushesAndCompactions();<a name="line.999"></a>
+<span class="sourceLineNo">1000</span>      region.compact(true);<a name="line.1000"></a>
+<span class="sourceLineNo">1001</span>    }<a name="line.1001"></a>
+<span class="sourceLineNo">1002</span>  }<a name="line.1002"></a>
+<span class="sourceLineNo">1003</span>  /**<a name="line.1003"></a>
+<span class="sourceLineNo">1004</span>   * Creates the dummy data with a specific size.<a name="line.1004"></a>
+<span class="sourceLineNo">1005</span>   * @param size the size of value<a name="line.1005"></a>
+<span class="sourceLineNo">1006</span>   * @return the dummy data<a name="line.1006"></a>
+<span class="sourceLineNo">1007</span>   */<a name="line.1007"></a>
+<span class="sourceLineNo">1008</span>  private byte[] makeDummyData(int size) {<a name="line.1008"></a>
+<span class="sourceLineNo">1009</span>    byte[] dummyData = new byte[size];<a name="line.1009"></a>
+<span class="sourceLineNo">1010</span>    new Random().nextBytes(dummyData);<a name="line.1010"></a>
+<span class="sourceLineNo">1011</span>    return dummyData;<a name="line.1011"></a>
+<span class="sourceLineNo">1012</span>  }<a name="line.1012"></a>
+<span class="sourceLineNo">1013</span><a name="line.1013"></a>
+<span class="sourceLineNo">1014</span>  /**<a name="line.1014"></a>
+<span class="sourceLineNo">1015</span>   * Gets the split keys<a name="line.1015"></a>
+<span class="sourceLineNo">1016</span>   */<a name="line.1016"></a>
+<span class="sourceLineNo">1017</span>  private byte[][] getSplitKeys() {<a name="line.1017"></a>
+<span class="sourceLineNo">1018</span>    byte[][] splitKeys = new byte[KEYS.length - 1][];<a name="line.1018"></a>
+<span class="sourceLineNo">1019</span>    for (int i = 0; i &lt; splitKeys.length; ++i) {<a name="line.1019"></a>
+<span class="sourceLineNo">1020</span>      splitKeys[i] = new byte[] { KEYS[i + 1] };<a name="line.1020"></a>
+<span class="sourceLineNo">1021</span>    }<a name="line.1021"></a>
+<span class="sourceLineNo">1022</span>    return splitKeys;<a name="line.1022"></a>
+<span class="sourceLineNo">1023</span>  }<a name="line.1023"></a>
+<span class="sourceLineNo">1024</span><a name="line.1024"></a>
+<span class="sourceLineNo">1025</span>  private static ExecutorService createThreadPool(Configuration conf) {<a name="line.1025"></a>
+<span class="sourceLineNo">1026</span>    int maxThreads = 10;<a name="line.1026"></a>
+<span class="sourceLineNo">1027</span>    long keepAliveTime = 60;<a name="line.1027"></a>
+<span class="sourceLineNo">1028</span>    final SynchronousQueue&lt;Runnable&gt; queue = new SynchronousQueue&lt;&gt;();<a name="line.1028"></a>
+<span class="sourceLineNo">1029</span>    ThreadPoolExecutor pool = new ThreadPoolExecutor(1, maxThreads,<a name="line.1029"></a>
+<span class="sourceLineNo">1030</span>        keepAliveTime, TimeUnit.SECONDS, queue,<a name="line.1030"></a>
+<span class="sourceLineNo">1031</span>        Threads.newDaemonThreadFactory("MobFileCompactionChore"),<a name="line.1031"></a>
+<span class="sourceLineNo">1032</span>        new RejectedExecutionHandler() {<a name="line.1032"></a>
+<span class="sourceLineNo">1033</span>          @Override<a name="line.1033"></a>
+<span class="sourceLineNo">1034</span>          public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {<a name="line.1034"></a>
+<span class="sourceLineNo">1035</span>            try {<a name="line.1035"></a>
+<span class="sourceLineNo">1036</span>              // waiting for a thread to pick up instead of throwing exceptions.<a name="line.1036"></a>
+<span class="sourceLineNo">1037</span>              queue.put(r);<a name="line.1037"></a>
+<span class="sourceLineNo">1038</span>            } catch (InterruptedException e) {<a name="line.1038"></a>
+<span class="sourceLineNo">1039</span>              throw new RejectedExecutionException(e);<a name="line.1039"></a>
+<span class="sourceLineNo">1040</span>            }<a name="line.1040"></a>
+<span class="sourceLineNo">1041</span>          }<a name="line.1041"></a>
+<span class="sourceLineNo">1042</span>        });<a name="line.1042"></a>
+<span class="sourceLineNo">1043</span>    ((ThreadPoolExecutor) pool).allowCoreThreadTimeOut(true);<a name="line.1043"></a>
+<span class="sourceLineNo">1044</span>    return pool;<a name="line.1044"></a>
+<span class="sourceLineNo">1045</span>  }<a name="line.1045"></a>
+<span class="sourceLineNo">1046</span><a name="line.1046"></a>
+<span class="sourceLineNo">1047</span>  private void assertRefFileNameEqual(String familyName) throws IOException {<a name="line.1047"></a>
+<span class="sourceLineNo">1048</span>    Scan scan = new Scan();<a name="line.1048"></a>
+<span class="sourceLineNo">1049</span>    scan.addFamily(Bytes.toBytes(familyName));<a name="line.1049"></a>
+<span class="sourceLineNo">1050</span>    // Do not retrieve the mob data when scanning<a name="line.1050"></a>
+<span class="sourceLineNo">1051</span>    scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE));<a name="line.1051"></a>
+<span class="sourceLineNo">1052</span>    ResultScanner results = table.getScanner(scan);<a name="line.1052"></a>
+<span class="sourceLineNo">1053</span>    Path mobFamilyPath = MobUtils.getMobFamilyPath(TEST_UTIL.getConfiguration(),<a name="line.1053"></a>
+<span class="sourceLineNo">1054</span>        tableName, familyName);<a name="line.1054"></a>
+<span class="sourceLineNo">1055</span>    List&lt;Path&gt; actualFilePaths = new ArrayList&lt;&gt;();<a name="line.1055"></a>
+<span class="sourceLineNo">1056</span>    List&lt;Path&gt; expectFilePaths = new ArrayList&lt;&gt;();<a name="line.1056"></a>
+<span class="sourceLineNo">1057</span>    for (Result res : results) {<a name="line.1057"></a>
+<span class="sourceLineNo">1058</span>      for (Cell cell : res.listCells()) {<a name="line.1058"></a>
+<span class="sourceLineNo">1059</span>        byte[] referenceValue = CellUtil.cloneValue(cell);<a name="line.1059"></a>
+<span class="sourceLineNo">1060</span>        String fileName = Bytes.toString(referenceValue, Bytes.SIZEOF_INT,<a name="line.1060"></a>
+<span class="sourceLineNo">1061</span>            referenceValue.length - Bytes.SIZEOF_INT);<a name="line.1061"></a>
+<span class="sourceLineNo">1062</span>        Path targetPath = new Path(mobFamilyPath, fileName);<a name="line.1062"></a>
+<span class="sourceLineNo">1063</span>        if(!actualFilePaths.contains(targetPath)) {<a name="line.1063"></a>
+<span class="sourceLineNo">1064</span>          actualFilePaths.add(targetPath);<a name="line.1064"></a>
+<span class="sourceLineNo">1065</span>        }<a name="line.1065"></a>
+<span class="sourceLineNo">1066</span>      }<a name="line.1066"></a>
+<span class="sourceLineNo">1067</span>    }<a name="line.1067"></a>
+<span class="sourceLineNo">1068</span>    results.close();<a name="line.1068"></a>
+<span class="sourceLineNo">1069</span>    if (fs.exists(mobFamilyPath)) {<a name="line.1069"></a>
+<span class="sourceLineNo">1070</span>      FileStatus[] files = fs.listStatus(mobFamilyPath);<a name="line.1070"></a>
+<span class="sourceLineNo">1071</span>      for (FileStatus file : files) {<a name="line.1071"></a>
+<span class="sourceLineNo">1072</span>        if (!StoreFileInfo.isDelFile(file.getPath())) {<a name="line.1072"></a>
+<span class="sourceLineNo">1073</span>          expectFilePaths.add(file.getPath());<a name="line.1073"></a>
+<span class="sourceLineNo">1074</span>        }<a name="line.1074"></a>
+<span class="sourceLineNo">1075</span>      }<a name="line.1075"></a>
+<span class="sourceLineNo">1076</span>    }<a name="line.1076"></a>
+<span class="sourceLineNo">1077</span>    Collections.sort(actualFilePaths);<a name="line.1077"></a>
+<span class="sourceLineNo">1078</span>    Collections.sort(expectFilePaths);<a name="line.1078"></a>
+<span class="sourceLineNo">1079</span>    assertEquals(expectFilePaths, actualFilePaths);<a name="line.1079"></a>
+<span class="sourceLineNo">1080</span>  }<a name="line.1080"></a>
+<span class="sourceLineNo">1081</span><a name="line.1081"></a>
+<span class="sourceLineNo">1082</span>  /**<a name="line.1082"></a>
+<span class="sourceLineNo">1083</span>   * Resets the configuration.<a name="line.1083"></a>
+<span class="sourceLineNo">1084</span>   */<a name="line.1084"></a>
+<span class="sourceLineNo">1085</span>  private void resetConf() {<a name="line.1085"></a>
+<span class="sourceLineNo">1086</span>    conf.setLong(MobConstants.MOB_COMPACTION_MERGEABLE_THRESHOLD,<a name="line.1086"></a>
+<span class="sourceLineNo">1087</span>      MobConstants.DEFAULT_MOB_COMPACTION_MERGEABLE_THRESHOLD);<a name="line.1087"></a>
+<span class="sourceLineNo">1088</span>    conf.setInt(MobConstants.MOB_COMPACTION_BATCH_SIZE,<a name="line.1088"></a>
+<span class="sourceLineNo">1089</span>      MobConstants.DEFAULT_MOB_COMPACTION_BATCH_SIZE);<a name="line.1089"></a>
+<span class="sourceLineNo">1090</span>  }<a name="line.1090"></a>
+<span class="sourceLineNo">1091</span><a name="line.1091"></a>
+<span class="sourceLineNo">1092</span>  /**<a name="line.1092"></a>
+<span class="sourceLineNo">1093</span>   * Verify mob partition policy compaction values.<a name="line.1093"></a>
+<span class="sourceLineNo">1094</span>   */<a name="line.1094"></a>
+<span class="sourceLineNo">1095</span>  private void verifyPolicyValues() throws Exception {<a name="line.1095"></a>
+<span class="sourceLineNo">1096</span>    Get get = new Get(mobKey01);<a name="line.1096"></a>
+<span class="sourceLineNo">1097</span>    Result result = table.get(get);<a name="line.1097"></a>
+<span class="sourceLineNo">1098</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1098"></a>
+<span class="sourceLineNo">1099</span>        Bytes.toBytes(mobValue0)));<a name="line.1099"></a>
+<span class="sourceLineNo">1100</span><a name="line.1100"></a>
+<span class="sourceLineNo">1101</span>    get = new Get(mobKey02);<a name="line.1101"></a>
+<span class="sourceLineNo">1102</span>    result = table.get(get);<a name="line.1102"></a>
+<span class="sourceLineNo">1103</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1103"></a>
+<span class="sourceLineNo">1104</span>        Bytes.toBytes(mobValue0)));<a name="line.1104"></a>
+<span class="sourceLineNo">1105</span><a name="line.1105"></a>
+<span class="sourceLineNo">1106</span>    get = new Get(mobKey03);<a name="line.1106"></a>
+<span class="sourceLineNo">1107</span>    result = table.get(get);<a name="line.1107"></a>
+<span class="sourceLineNo">1108</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1108"></a>
+<span class="sourceLineNo">1109</span>        Bytes.toBytes(mobValue0)));<a name="line.1109"></a>
+<span class="sourceLineNo">1110</span><a name="line.1110"></a>
+<span class="sourceLineNo">1111</span>    get = new Get(mobKey04);<a name="line.1111"></a>
+<span class="sourceLineNo">1112</span>    result = table.get(get);<a name="line.1112"></a>
+<span class="sourceLineNo">1113</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1113"></a>
+<span class="sourceLineNo">1114</span>        Bytes.toBytes(mobValue0)));<a name="line.1114"></a>
+<span class="sourceLineNo">1115</span><a name="line.1115"></a>
+<span class="sourceLineNo">1116</span>    get = new Get(mobKey05);<a name="line.1116"></a>
+<span class="sourceLineNo">1117</span>    result = table.get(get);<a name="line.1117"></a>
+<span class="sourceLineNo">1118</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1118"></a>
+<span class="sourceLineNo">1119</span>        Bytes.toBytes(mobValue0)));<a name="line.1119"></a>
+<span class="sourceLineNo">1120</span><a name="line.1120"></a>
+<span class="sourceLineNo">1121</span>    get = new Get(mobKey06);<a name="line.1121"></a>
+<span class="sourceLineNo">1122</span>    result = table.get(get);<a name="line.1122"></a>
+<span class="sourceLineNo">1123</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1123"></a>
+<span class="sourceLineNo">1124</span>        Bytes.toBytes(mobValue0)));<a name="line.1124"></a>
+<span class="sourceLineNo">1125</span><a name="line.1125"></a>
+<span class="sourceLineNo">1126</span>    get = new Get(mobKey1);<a name="line.1126"></a>
+<span class="sourceLineNo">1127</span>    result = table.get(get);<a name="line.1127"></a>
+<span class="sourceLineNo">1128</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1128"></a>
+<span class="sourceLineNo">1129</span>        Bytes.toBytes(mobValue1)));<a name="line.1129"></a>
+<span class="sourceLineNo">1130</span><a name="line.1130"></a>
+<span class="sourceLineNo">1131</span>    get = new Get(mobKey2);<a name="line.1131"></a>
+<span class="sourceLineNo">1132</span>    result = table.get(get);<a name="line.1132"></a>
+<span class="sourceLineNo">1133</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1133"></a>
+<span class="sourceLineNo">1134</span>        Bytes.toBytes(mobValue2)));<a name="line.1134"></a>
+<span class="sourceLineNo">1135</span><a name="line.1135"></a>
+<span class="sourceLineNo">1136</span>    get = new Get(mobKey3);<a name="line.1136"></a>
+<span class="sourceLineNo">1137</span>    result = table.get(get);<a name="line.1137"></a>
+<span class="sourceLineNo">1138</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1138"></a>
+<span class="sourceLineNo">1139</span>        Bytes.toBytes(mobValue3)));<a name="line.1139"></a>
+<span class="sourceLineNo">1140</span><a name="line.1140"></a>
+<span class="sourceLineNo">1141</span>    get = new Get(mobKey4);<a name="line.1141"></a>
+<span class="sourceLineNo">1142</span>    result = table.get(get);<a name="line.1142"></a>
+<span class="sourceLineNo">1143</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1143"></a>
+<span class="sourceLineNo">1144</span>        Bytes.toBytes(mobValue4)));<a name="line.1144"></a>
+<span class="sourceLineNo">1145</span><a name="line.1145"></a>
+<span class="sourceLineNo">1146</span>    get = new Get(mobKey5);<a name="line.1146"></a>
+<span class="sourceLineNo">1147</span>    result = table.get(get);<a name="line.1147"></a>
+<span class="sourceLineNo">1148</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1148"></a>
+<span class="sourceLineNo">1149</span>        Bytes.toBytes(mobValue5)));<a name="line.1149"></a>
+<span class="sourceLineNo">1150</span><a name="line.1150"></a>
+<span class="sourceLineNo">1151</span>    get = new Get(mobKey6);<a name="line.1151"></a>
+<span class="sourceLineNo">1152</span>    result = table.get(get);<a name="line.1152"></a>
+<span class="sourceLineNo">1153</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1153"></a>
+<span class="sourceLineNo">1154</span>        Bytes.toBytes(mobValue6)));<a name="line.1154"></a>
+<span class="sourceLineNo">1155</span><a name="line.1155"></a>
+<span class="sourceLineNo">1156</span>    get = new Get(mobKey7);<a name="line.1156"></a>
+<span class="sourceLineNo">1157</span>    result = table.get(get);<a name="line.1157"></a>
+<span class="sourceLineNo">1158</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1158"></a>
+<span class="sourceLineNo">1159</span>        Bytes.toBytes(mobValue7)));<a name="line.1159"></a>
+<span class="sourceLineNo">1160</span><a name="line.1160"></a>
+<span class="sourceLineNo">1161</span>    get = new Get(mobKey8);<a name="line.1161"></a>
+<span class="sourceLineNo">1162</span>    result = table.get(get);<a name="line.1162"></a>
+<span class="sourceLineNo">1163</span>    assertTrue(Arrays.equals(result.getValue(Bytes.toBytes(family1), Bytes.toBytes(qf1)),<a name="line.1163"></a>
+<span class="sourceLineNo">1164</span>        Bytes.toBytes(mobValue8)));<a name="line.1164"></a>
+<span class="sourceLineNo">1165</span>  }<a name="line.1165"></a>
+<span class="sourceLineNo">1166</span><a name="line.1166"></a>
+<span class="sourceLineNo">1167</span>  private void commonPolicyTestLogic (final String tableNameAsString,<a name="line.1167"></a>
+<span class="sourceLineNo">1168</span>      final MobCompactPartitionPolicy pType, final boolean majorCompact,<a name="line.1168"></a>
+<span class="sourceLineNo">1169</span>      final int expectedFileNumbers, final String[] expectedFileNames,<a name="line.1169"></a>
+<span class="sourceLineNo">1170</span>      final boolean setupAndLoadData<a name="line.1170"></a>
+<span class="sourceLineNo">1171</span>      ) throws Exception {<a name="line.1171"></a>
+<span class="sourceLineNo">1172</span>    if (setupAndLoadData) {<a name="line.1172"></a>
+<span class="sourceLineNo">1173</span>      setUpForPolicyTest(tableNameAsString, pType);<a name="line.1173"></a>
+<span class="sourceLineNo">1174</span><a name="line.1174"></a>
+<span class="sourceLineNo">1175</span>      loadDataForPartitionPolicy(admin, bufMut, tableName);<a name="line.1175"></a>
+<span class="sourceLineNo">1176</span>    } else {<a name="line.1176"></a>
+<span class="sourceLineNo">1177</span>      alterForPolicyTest(pType);<a name="line.1177"></a>
+<span class="sourceLineNo">1178</span>    }<a name="line.1178"></a>
+<span class="sourceLineNo">1179</span><a name="line.1179"></a>
+<span class="sourceLineNo">1180</span>    if (majorCompact) {<a name="line.1180"></a>
+<span class="sourceLineNo">1181</span>      admin.majorCompact(tableName, hcd1.getName(), CompactType.MOB);<a name="line.11

<TRUNCATED>

Mime
View raw message