forked from pepite/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
100 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/org/elasticsearch/common/netty/NettyStaticSetup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.elasticsearch.common.netty; | ||
|
||
import org.elasticsearch.transport.netty.NettyInternalESLoggerFactory; | ||
import org.jboss.netty.logging.InternalLogger; | ||
import org.jboss.netty.logging.InternalLoggerFactory; | ||
import org.jboss.netty.util.ThreadNameDeterminer; | ||
import org.jboss.netty.util.ThreadRenamingRunnable; | ||
|
||
/** | ||
*/ | ||
public class NettyStaticSetup { | ||
|
||
private static EsThreadNameDeterminer ES_THREAD_NAME_DETERMINER = new EsThreadNameDeterminer(); | ||
|
||
public static class EsThreadNameDeterminer implements ThreadNameDeterminer { | ||
@Override | ||
public String determineThreadName(String currentThreadName, String proposedThreadName) throws Exception { | ||
// we control the thread name with a context, so use both | ||
return currentThreadName + "{" + proposedThreadName + "}"; | ||
} | ||
} | ||
|
||
static { | ||
InternalLoggerFactory.setDefaultFactory(new NettyInternalESLoggerFactory() { | ||
@Override | ||
public InternalLogger newInstance(String name) { | ||
return super.newInstance(name.replace("org.jboss.netty.", "netty.").replace("org.jboss.netty.", "netty.")); | ||
} | ||
}); | ||
|
||
ThreadRenamingRunnable.setThreadNameDeterminer(ES_THREAD_NAME_DETERMINER); | ||
} | ||
|
||
public static void setup() { | ||
|
||
} | ||
} |
61 changes: 0 additions & 61 deletions
61
src/main/java/org/elasticsearch/common/thread/ThreadNameDeterminer.java
This file was deleted.
Oops, something went wrong.
122 changes: 0 additions & 122 deletions
122
src/main/java/org/elasticsearch/common/thread/ThreadRenamingRunnable.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.