mirror of https://github.com/apache/druid.git
Reapply "fix regex and assign random user ids" from Xavier
This commit is contained in:
parent
d61fe9585a
commit
6150365c12
|
@ -39,6 +39,7 @@ import org.joda.time.DateTime;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
/**
|
||||
|
@ -147,9 +148,7 @@ public class IrcFirehoseFactory implements FirehoseFactory
|
|||
@Override
|
||||
public List<String> getAlternativeNicknames()
|
||||
{
|
||||
return Lists.newArrayList(nick + "_",
|
||||
nick + "__",
|
||||
nick + "___");
|
||||
return Lists.newArrayList(nick + UUID.randomUUID(), nick + UUID.randomUUID(), nick + UUID.randomUUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -50,8 +50,10 @@ class WikipediaIrcDecoder implements IrcDecoder
|
|||
final DatabaseReader geoLookup;
|
||||
|
||||
static final Pattern pattern = Pattern.compile(
|
||||
"\\x0314\\[\\[\\x0307(.+?)\\x0314\\]\\]\\x034 (.*?)\\x0310.*\\x0302(http.+?)\\x03.+\\x0303(.+?)\\x03.+\\x03 (\\(([+-]\\d+)\\).*|.+) \\x0310(.+)\\x03"
|
||||
".*\\x0314\\[\\[\\x0307(.+?)\\x0314\\]\\]\\x034 (.*?)\\x0310.*\\x0302(http.+?)" +
|
||||
"\\x03.+\\x0303(.+?)\\x03.+\\x03 (\\(([+-]\\d+)\\).*|.+) \\x0310(.+)\\x03.*"
|
||||
);
|
||||
|
||||
static final Pattern ipPattern = Pattern.compile("\\d+.\\d+.\\d+.\\d+");
|
||||
static final Pattern shortnamePattern = Pattern.compile("#(\\w\\w)\\..*");
|
||||
|
||||
|
|
Loading…
Reference in New Issue