Skip to content

Commit 2631b13

Browse files
author
Kunal Khatua
committed
Clean up
1 parent 40ba8a4 commit 2631b13

File tree

4 files changed

+106
-165
lines changed

4 files changed

+106
-165
lines changed

exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public void run() throws Exception {
240240
Runtime.getRuntime().addShutdownHook(shutdownHook);
241241
gracefulShutdownThread.start();
242242

243-
// Launch an archiving job that is # files and time bound
243+
// Launch an archiving job that is limited by # files (so as to be timebound)
244244
PersistentStore<QueryProfile> queryProfileStore = drillbitContext.getProfileStoreContext().getCompletedProfileStore();
245245
if (queryProfileStore instanceof LocalPersistentStore
246246
&& context.getConfig().getBoolean(ExecConstants.PROFILES_STORE_INDEX_ENABLED)) {

exec/java-exec/src/main/java/org/apache/drill/exec/server/profile/ProfileIndexer.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import java.util.concurrent.TimeUnit;
3030

3131
import org.apache.commons.io.IOUtils;
32-
import org.apache.commons.lang3.exception.ExceptionUtils;
3332
import org.apache.drill.common.config.DrillConfig;
3433
import org.apache.drill.exec.ExecConstants;
3534
import org.apache.drill.exec.coord.ClusterCoordinator;
@@ -113,7 +112,6 @@ public ProfileIndexer(ClusterCoordinator coord, DrillbitContext context) throws
113112
this.sysFileSuffixFilter = new DrillSysFilePathFilter();
114113
String indexPathPattern = drillConfig.getString(ExecConstants.PROFILES_STORE_INDEX_FORMAT);
115114
this.indexedPathFormat = new SimpleDateFormat(indexPathPattern);
116-
logger.info("Organizing any existing unindexed profiles");
117115
}
118116

119117

@@ -211,8 +209,7 @@ private long getProfileStart(Path srcPath) {
211209
QueryProfile profile = pStoreConfig.getSerializer().deserialize(IOUtils.toByteArray(is));
212210
return profile.getStart();
213211
} catch (IOException e) {
214-
logger.info("Unable to deserialize {}\n---{}====", srcPath, e.getMessage()); //Illegal character ((CTRL-CHAR, code 0)): only regular white space (\r, \n, \t) is allowed between tokens at [Source: [B@f76ca5b; line: 1, column: 65538]
215-
logger.info("deserialization RCA==> \n {}", ExceptionUtils.getRootCause(e));
212+
logger.error("Unable to deserialize {}\n{}", srcPath, e.getMessage());
216213
}
217214
return Long.MIN_VALUE;
218215
}

exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileResources.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import javax.ws.rs.core.UriInfo;
3838
import javax.xml.bind.annotation.XmlRootElement;
3939

40-
4140
import org.apache.drill.common.config.DrillConfig;
4241
import org.apache.drill.common.exceptions.DrillRuntimeException;
4342
import org.apache.drill.common.exceptions.UserException;
@@ -74,7 +73,6 @@ public class ProfileResources {
7473
public static class ProfileInfo implements Comparable<ProfileInfo> {
7574
private static final int QUERY_SNIPPET_MAX_CHAR = 150;
7675
private static final int QUERY_SNIPPET_MAX_LINES = 8;
77-
7876
public static final SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
7977

8078
private final String queryId;
@@ -379,7 +377,7 @@ public Viewable getProfile(@PathParam("queryid") String queryId){
379377
ProfileWrapper wrapper = new ProfileWrapper(getQueryProfile(queryId), work.getContext().getConfig());
380378
return ViewableWithPermissions.create(authEnabled.get(), "/rest/profile/profile.ftl", sc, wrapper);
381379
} catch (Exception | Error e) {
382-
logger.error("Exception was thrown when fetching profile {} :\n{}\n====\n", queryId, e);
380+
logger.error("Exception was thrown when fetching profile {} :\n{}", queryId, e);
383381
return ViewableWithPermissions.create(authEnabled.get(), "/rest/errorMessage.ftl", sc, e);
384382
}
385383
}

0 commit comments

Comments
 (0)