You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2015/09/24 01:29:05 UTC
[jira] [Created] (PHOENIX-2289) PhoenixContextExecutor spends a lot
of time in getClassLoader
Todd Lipcon created PHOENIX-2289:
------------------------------------
Summary: PhoenixContextExecutor spends a lot of time in getClassLoader
Key: PHOENIX-2289
URL: https://issues.apache.org/jira/browse/PHOENIX-2289
Project: Phoenix
Issue Type: Bug
Affects Versions: 4.3.0
Reporter: Todd Lipcon
Doing some "poor man's profiling" of a CSV bulk import job, I noticed a lot of time spent in this stack:
{code}
"main" prio=10 tid=0x00007f3410018000 nid=0x6f3f runnable [0x00007f3414b4e000]
java.lang.Thread.State: RUNNABLE
at java.lang.Class.getClassLoader0(Native Method)
at java.lang.Class.getClassLoader(Class.java:609)
at org.apache.phoenix.util.PhoenixContextExecutor$CurrentContextWrapper.before(PhoenixContextExecutor.java:45)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:51)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:270)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:211)
at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:174)
at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:179)
at org.apache.phoenix.util.csv.CsvUpsertExecutor.execute(CsvUpsertExecutor.java:155)
at org.apache.phoenix.util.csv.CsvUpsertExecutor.execute(CsvUpsertExecutor.java:136)
at org.apache.phoenix.mapreduce.CsvToKeyValueMapper.map(CsvToKeyValueMapper.java:163)
at org.apache.phoenix.mapreduce.CsvToKeyValueMapper.map(CsvToKeyValueMapper.java:69)
{code}
Class.getClassLoader is relatively expensive (see http://bugs.java.com/view_bug.do?bug_id=6642881 ) so it may make sense to cache this classloader as a static final member of the class.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)