Skip to content

Commit

Permalink
Merge 52a904f into c55f1d7
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjmh committed Jan 28, 2019
2 parents c55f1d7 + 52a904f commit 212cc52
Show file tree
Hide file tree
Showing 72 changed files with 169 additions and 167 deletions.
Expand Up @@ -138,7 +138,7 @@ public ForwardDictionaryCache(CarbonLRUCache carbonLRUCache) {
executorService.shutdown();
executorService.awaitTermination(2, TimeUnit.HOURS);
} catch (InterruptedException e) {
LOGGER.error("Error loading the dictionary: " + e.getMessage());
LOGGER.error("Error loading the dictionary: " + e.getMessage(), e);
}
for (int i = 0; i < taskSubmitList.size(); i++) {
try {
Expand Down
Expand Up @@ -115,7 +115,7 @@ public ReverseDictionaryCache(CarbonLRUCache carbonLRUCache) {
executorService.shutdown();
executorService.awaitTermination(2, TimeUnit.HOURS);
} catch (InterruptedException e) {
LOGGER.error("Error loading the dictionary: " + e.getMessage());
LOGGER.error("Error loading the dictionary: " + e.getMessage(), e);
}
for (int i = 0; i < taskSubmitList.size(); i++) {
try {
Expand Down
Expand Up @@ -502,7 +502,7 @@ public CarbonTable getCarbonTable(AbsoluteTableIdentifier identifier) {
.buildFromTablePath(identifier.getTableName(), identifier.getDatabaseName(),
identifier.getTablePath(), identifier.getCarbonTableIdentifier().getTableId());
} catch (IOException e) {
LOGGER.warn("failed to get carbon table from table Path" + e.getMessage());
LOGGER.warn("failed to get carbon table from table Path" + e.getMessage(), e);
// ignoring exception
}
}
Expand Down
Expand Up @@ -51,7 +51,7 @@ public static Object createDataMapJob(String className) {
try {
return Class.forName(className).getDeclaredConstructors()[0].newInstance();
} catch (Exception e) {
LOGGER.error(e);
LOGGER.error(e.getMessage(), e);
return null;
}
}
Expand Down
Expand Up @@ -74,7 +74,7 @@ public AbstractDFSCarbonFile(String filePath, Configuration hadoopConf) {
fs = path.getFileSystem(this.hadoopConf);
fileStatus = fs.getFileStatus(path);
} catch (IOException e) {
LOGGER.debug("Exception occurred:" + e.getMessage());
LOGGER.debug("Exception occurred:" + e.getMessage(), e);
}
}

Expand All @@ -89,7 +89,7 @@ public AbstractDFSCarbonFile(Path path, Configuration hadoopConf) {
fs = path.getFileSystem(this.hadoopConf);
fileStatus = fs.getFileStatus(path);
} catch (IOException e) {
LOGGER.debug("Exception occurred:" + e.getMessage());
LOGGER.debug("Exception occurred:" + e.getMessage(), e);
}
}

Expand Down Expand Up @@ -129,7 +129,7 @@ public AbstractDFSCarbonFile(FileStatus fileStatus) {
return fs.exists(fileStatus.getPath());
}
} catch (IOException e) {
LOGGER.error("Exception occurred:" + e.getMessage());
LOGGER.error("Exception occurred:" + e.getMessage(), e);
}
return false;
}
Expand All @@ -154,7 +154,7 @@ public boolean renameTo(String changeToName) {
return fs.rename(fileStatus.getPath(), new Path(changeToName));
}
} catch (IOException e) {
LOGGER.error("Exception occurred:" + e.getMessage());
LOGGER.error("Exception occurred:" + e.getMessage(), e);
return false;
}
return false;
Expand All @@ -168,7 +168,7 @@ public boolean delete() {
return fs.delete(fileStatus.getPath(), true);
}
} catch (IOException e) {
LOGGER.error("Exception occurred:" + e.getMessage());
LOGGER.error("Exception occurred:" + e.getMessage(), e);
return false;
}
return false;
Expand Down Expand Up @@ -238,7 +238,7 @@ public boolean delete() {
tempFile.renameForce(fileName);
fileTruncatedSuccessfully = true;
} catch (IOException e) {
LOGGER.error("Exception occurred while truncating the file " + e.getMessage());
LOGGER.error("Exception occurred while truncating the file " + e.getMessage(), e);
} finally {
CarbonUtil.closeStreams(dataOutputStream, dataInputStream);
}
Expand Down Expand Up @@ -506,7 +506,7 @@ public CarbonFile[] listFiles() {
return new CarbonFile[0];
}
} catch (IOException e) {
LOGGER.error("Exception occured: " + e.getMessage());
LOGGER.error("Exception occured: " + e.getMessage(), e);
return new CarbonFile[0];
}
return getFiles(listStatus);
Expand Down
Expand Up @@ -136,7 +136,7 @@ public boolean renameForce(String changeToName) {
}
return false;
} catch (IOException e) {
LOGGER.error("Exception occured: " + e.getMessage());
LOGGER.error("Exception occured: " + e.getMessage(), e);
return false;
}
}
Expand Down
Expand Up @@ -111,7 +111,7 @@ public boolean renameForce(String changeToName) {
return fs.rename(fileStatus.getPath(), new Path(changeToName));
}
} catch (IOException e) {
LOGGER.error("Exception occured: " + e.getMessage());
LOGGER.error("Exception occured: " + e.getMessage(), e);
return false;
}
}
Expand Down
Expand Up @@ -254,7 +254,7 @@ public List<CarbonFile> listFiles(Boolean recursive) {
tempFile.renameForce(fileName);
fileTruncatedSuccessfully = true;
} catch (IOException e) {
LOGGER.error("Exception occured while truncating the file " + e.getMessage());
LOGGER.error("Exception occured while truncating the file " + e.getMessage(), e);
} finally {
CarbonUtil.closeStreams(source, destination);
}
Expand Down
Expand Up @@ -66,7 +66,7 @@ public boolean renameForce(String changeToName) {
fs = fileStatus.getPath().getFileSystem(hadoopConf);
return fs.rename(fileStatus.getPath(), new Path(changeToName));
} catch (IOException e) {
LOGGER.error("Exception occured: " + e.getMessage());
LOGGER.error("Exception occured: " + e.getMessage(), e);
return false;
}
}
Expand Down
Expand Up @@ -101,7 +101,7 @@ public boolean renameForce(String changeToName) {
return false;
}
} catch (IOException e) {
LOGGER.error("Exception occured" + e.getMessage());
LOGGER.error("Exception occured" + e.getMessage(), e);
return false;
}
}
Expand Down
Expand Up @@ -335,7 +335,7 @@ public static void truncateFile(String path, FileType fileType, long newSize) th
CarbonFile carbonFile = FileFactory.getCarbonFile(path, fileType);
carbonFile.truncate(path, newSize);
} catch (Exception e) {
LOGGER.error("Other exception occurred while truncating the file " + e.getMessage());
LOGGER.error("Other exception occurred while truncating the file " + e.getMessage(), e);
}
return;
default:
Expand Down Expand Up @@ -505,7 +505,7 @@ public static void createDirectoryAndSetPermission(String directoryPath, FsPermi
fs.setPermission(path, permission);
}
} catch (IOException e) {
LOGGER.error("Exception occurred : " + e.getMessage());
LOGGER.error("Exception occurred : " + e.getMessage(), e);
throw e;
}
return;
Expand Down
Expand Up @@ -91,7 +91,7 @@ public DictionaryMessage getDictionary(
try {
workerGroup.terminationFuture().sync();
} catch (InterruptedException e) {
LOGGER.error(e);
LOGGER.error(e.getMessage(), e);
}
}
}
Expand Up @@ -61,7 +61,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
data.release();
responseMsgQueue.add(key);
} catch (Exception e) {
LOGGER.error(e);
LOGGER.error(e.getMessage(), e);
throw e;
}
}
Expand Down Expand Up @@ -102,7 +102,7 @@ public DictionaryMessage getDictionary(DictionaryMessage key) {
}
return dictionaryMessage;
} catch (Exception e) {
LOGGER.error(e);
LOGGER.error(e.getMessage(), e);
throw new RuntimeException(e);
}
}
Expand Down
Expand Up @@ -89,7 +89,7 @@ public Integer size(DictionaryMessage key) {
executorService.shutdown();
executorService.awaitTermination(1, TimeUnit.HOURS);
} catch (InterruptedException e) {
LOGGER.error("Error loading the dictionary: " + e.getMessage());
LOGGER.error("Error loading the dictionary: " + e.getMessage(), e);
}
LOGGER.info("Total time taken to write dictionary file is: " +
(System.currentTimeMillis() - start));
Expand Down
Expand Up @@ -65,7 +65,7 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception {
key.writeData(buffer);
ctx.writeAndFlush(buffer);
} catch (Exception e) {
LOGGER.error(e);
LOGGER.error(e.getMessage(), e);
throw e;
}
}
Expand Down
Expand Up @@ -78,11 +78,11 @@ public String findLocalIpAddress(Logger LOGGER) {
return address.getHostAddress();
}
} catch (UnknownHostException e) {
LOGGER.error("do not get local host address:" + e.getMessage());
throw new RuntimeException(e.getMessage());
LOGGER.error("do not get local host address:" + e.getMessage(), e);
throw new RuntimeException(e);
} catch (SocketException e) {
LOGGER.error("do not get net work interface:" + e.getMessage());
throw new RuntimeException(e.getMessage());
LOGGER.error("do not get net work interface:" + e.getMessage(), e);
throw new RuntimeException(e);
}
}
}
Expand Up @@ -148,8 +148,8 @@ private BlockletDataMapIndexWrapper get(TableBlockIndexUniqueIdentifierWrapper i
for (DataMap dataMap : dataMaps) {
dataMap.clear();
}
LOGGER.error("memory exception when loading datamap: " + e.getMessage());
throw new RuntimeException(e.getMessage(), e);
LOGGER.error("memory exception when loading datamap: " + e.getMessage(), e);
throw new RuntimeException(e);
}
}
return blockletDataMapIndexWrapper;
Expand Down
Expand Up @@ -129,7 +129,7 @@ private void setBlockletInfoFromBinary() throws IOException {
blockletInfo.readFields(inputStream);
} catch (IOException e) {
LOGGER.error("Problem in reading blocklet info", e);
throw new IOException("Problem in reading blocklet info." + e.getMessage());
throw new IOException("Problem in reading blocklet info." + e.getMessage(), e);
} finally {
try {
inputStream.close();
Expand Down
Expand Up @@ -153,8 +153,8 @@ private int generateDirectSurrogateKeyForNonTimestampType(String memberStr) {
timeValue = Long.parseLong(memberStr) / 1000;
} catch (NumberFormatException e) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(
"Cannot convert value to Long type value. Value considered as null." + e.getMessage());
LOGGER.debug("Cannot convert value to Long type value. Value considered as null."
+ e.getMessage(), e);
}
}
if (timeValue == -1) {
Expand Down
Expand Up @@ -47,7 +47,7 @@ private ZookeeperInit(String zooKeeperUrl) {
zk = new ZooKeeper(zooKeeperUrl, sessionTimeOut, new DummyWatcher());

} catch (IOException e) {
LOGGER.error(e.getMessage());
LOGGER.error(e.getMessage(), e);
}

}
Expand Down
Expand Up @@ -1124,7 +1124,7 @@ public boolean canAllow(CarbonTable carbonTable, TableOperation operation, Objec
} catch (Exception e) {
// since method returns true or false and based on that calling function throws exception, no
// need to throw the catched exception
LOGGER.error(e.getMessage());
LOGGER.error(e.getMessage(), e);
return true;
}
return true;
Expand Down
Expand Up @@ -691,9 +691,9 @@ private static boolean compareTimestampsAndDelete(
CarbonUtil.deleteFoldersAndFiles(invalidFile);
return true;
} catch (IOException e) {
LOGGER.error("error in clean up of compacted files." + e.getMessage());
LOGGER.error("error in clean up of compacted files." + e.getMessage(), e);
} catch (InterruptedException e) {
LOGGER.error("error in clean up of compacted files." + e.getMessage());
LOGGER.error("error in clean up of compacted files." + e.getMessage(), e);
}
}
return false;
Expand Down
Expand Up @@ -91,7 +91,7 @@ public Map<Integer, Integer[]> getDeleteDataFromAllFiles(List<String> deltaFiles
executorService.shutdown();
executorService.awaitTermination(30, TimeUnit.MINUTES);
} catch (InterruptedException e) {
LOGGER.error("Error while reading the delete delta files : " + e.getMessage());
LOGGER.error("Error while reading the delete delta files : " + e.getMessage(), e);
}

Map<Integer, Integer[]> pageIdDeleteRowsMap =
Expand All @@ -109,8 +109,8 @@ public Map<Integer, Integer[]> getDeleteDataFromAllFiles(List<String> deltaFiles
}

} catch (Throwable e) {
LOGGER.error(e.getMessage());
throw new Exception(e.getMessage());
LOGGER.error(e.getMessage(), e);
throw new Exception(e);
}
}
return pageIdDeleteRowsMap;
Expand All @@ -134,7 +134,7 @@ public Map<String, DeleteDeltaVo> getDeletedRowsDataVo(String[] deltaFiles) {
executorService.shutdown();
executorService.awaitTermination(30, TimeUnit.MINUTES);
} catch (InterruptedException e) {
LOGGER.error("Error while reading the delete delta files : " + e.getMessage());
LOGGER.error("Error while reading the delete delta files : " + e.getMessage(), e);
}
Map<String, DeleteDeltaVo> pageIdToBlockLetVo = new HashMap<>();
List<DeleteDeltaBlockletDetails> blockletDetails = null;
Expand Down Expand Up @@ -175,7 +175,7 @@ public DeleteDeltaBlockDetails getCompactedDeleteDeltaFileFromBlock(List<String>
executorService.shutdown();
executorService.awaitTermination(30, TimeUnit.MINUTES);
} catch (InterruptedException e) {
LOGGER.error("Error while reading the delete delta files : " + e.getMessage());
LOGGER.error("Error while reading the delete delta files : " + e.getMessage(), e);
}

// Get a new DeleteDeltaBlockDetails as result set where all the data will me merged
Expand All @@ -190,8 +190,8 @@ public DeleteDeltaBlockDetails getCompactedDeleteDeltaFileFromBlock(List<String>
deleteDeltaResultSet.addBlockletDetails(blocklet);
}
} catch (Throwable e) {
LOGGER.error(e.getMessage());
throw new Exception(e.getMessage());
LOGGER.error(e.getMessage(), e);
throw new Exception(e);
}
}
return deleteDeltaResultSet;
Expand Down

0 comments on commit 212cc52

Please sign in to comment.