Github user mohammadshahidkhan commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/454#discussion_r94019232
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/carbon/datastore/BlockIndexStore.java
 ---
    @@ -244,124 +222,96 @@ public static BlockIndexStore getInstance() {
        *
        * @param loadedBlockArray array of blocks which will be filled
        * @param blocksList       blocks loaded in thread
    -   * @throws IndexBuilderException in case of any failure
    +   * @throws CarbonUtilException in case of any failure
        */
    -  private void fillLoadedBlocks(AbstractIndex[] loadedBlockArray, 
List<BlockInfo> blockInfos)
    -      throws IndexBuilderException {
    +  private void fillLoadedBlocks(AbstractIndex[] loadedBlockArray,
    +      List<Future<AbstractIndex>> blocksList) throws CarbonUtilException {
    +    int blockCounter = 0;
    +    boolean exceptionOccurred = false;
    +    Throwable exceptionRef = null;
         for (int i = 0; i < loadedBlockArray.length; i++) {
    -      if (null == loadedBlockArray[i]) {
    -        try {
    -          loadedBlockArray[i] = 
mapOfBlockInfoToFuture.get(blockInfos.get(i)).get();
    -        } catch (InterruptedException | ExecutionException e) {
    -          throw new IndexBuilderException(e);
    -        }
    +      try {
    +        loadedBlockArray[i] = blocksList.get(blockCounter++).get();
    +      } catch (Throwable e) {
    --- End diff --
    
    You are correct instead of throwable we can add specialized cache clause


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to