mirror of https://github.com/apache/druid.git
fix regex and assign random user ids
This commit is contained in:
parent
5a64e2a64a
commit
cd14e7fbca
|
@ -38,6 +38,7 @@ import org.joda.time.DateTime;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
/**
|
||||
|
@ -146,9 +147,9 @@ 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