Skip to content

Commit 77e3c3c

Browse files
Kunal Khatuakkhatua
authored andcommitted
Initial clean up
1 parent 40ba8a4 commit 77e3c3c

File tree

4 files changed

+106
-164
lines changed

4 files changed

+106
-164
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public ProfileIndexer(ClusterCoordinator coord, DrillbitContext context) throws
113113
this.sysFileSuffixFilter = new DrillSysFilePathFilter();
114114
String indexPathPattern = drillConfig.getString(ExecConstants.PROFILES_STORE_INDEX_FORMAT);
115115
this.indexedPathFormat = new SimpleDateFormat(indexPathPattern);
116-
logger.info("Organizing any existing unindexed profiles");
117116
}
118117

119118

@@ -211,8 +210,7 @@ private long getProfileStart(Path srcPath) {
211210
QueryProfile profile = pStoreConfig.getSerializer().deserialize(IOUtils.toByteArray(is));
212211
return profile.getStart();
213212
} 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));
213+
logger.error("Unable to deserialize {}\n{}", srcPath, e.getMessage());
216214
}
217215
return Long.MIN_VALUE;
218216
}

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)