mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-30 03:48:54 +00:00
- Fix for [1393]
This commit is contained in:
parent
dee4b42b16
commit
7fb32a0287
@ -33,8 +33,10 @@ configurations {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile project(':elasticsearch')
|
compile project(':elasticsearch')
|
||||||
|
|
||||||
compile('org.twitter4j:twitter4j-core:2.1.10') { transitive = false }
|
compile('org.twitter4j:twitter4j-core:2.2.4') { transitive = false }
|
||||||
distLib('org.twitter4j:twitter4j-core:2.1.10') { transitive = false }
|
compile('org.twitter4j:twitter4j-stream:2.2.4') { transitive = false }
|
||||||
|
compile('org.twitter4j:twitter4j-core:2.2.4') { transitive = false }
|
||||||
|
compile('org.twitter4j:twitter4j-stream:2.2.4') { transitive = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||||
@ -129,4 +131,4 @@ uploadArchives {
|
|||||||
|
|
||||||
eclipseClasspath {
|
eclipseClasspath {
|
||||||
defaultOutputDir = file('build/eclipse-build')
|
defaultOutputDir = file('build/eclipse-build')
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ public class TwitterRiver extends AbstractRiverComponent implements River {
|
|||||||
if (follow != null) {
|
if (follow != null) {
|
||||||
if (follow instanceof List) {
|
if (follow instanceof List) {
|
||||||
List lFollow = (List) follow;
|
List lFollow = (List) follow;
|
||||||
int[] followIds = new int[lFollow.size()];
|
long[] followIds = new long[lFollow.size()];
|
||||||
for (int i = 0; i < lFollow.size(); i++) {
|
for (int i = 0; i < lFollow.size(); i++) {
|
||||||
Object o = lFollow.get(i);
|
Object o = lFollow.get(i);
|
||||||
if (o instanceof Number) {
|
if (o instanceof Number) {
|
||||||
@ -150,7 +150,7 @@ public class TwitterRiver extends AbstractRiverComponent implements River {
|
|||||||
filterQuery.follow(followIds);
|
filterQuery.follow(followIds);
|
||||||
} else {
|
} else {
|
||||||
String[] ids = Strings.commaDelimitedListToStringArray(follow.toString());
|
String[] ids = Strings.commaDelimitedListToStringArray(follow.toString());
|
||||||
int[] followIds = new int[ids.length];
|
long[] followIds = new long[ids.length];
|
||||||
for (int i = 0; i < ids.length; i++) {
|
for (int i = 0; i < ids.length; i++) {
|
||||||
followIds[i] = Integer.parseInt(ids[i]);
|
followIds[i] = Integer.parseInt(ids[i]);
|
||||||
}
|
}
|
||||||
@ -265,11 +265,9 @@ public class TwitterRiver extends AbstractRiverComponent implements River {
|
|||||||
}
|
}
|
||||||
currentRequest = client.prepareBulk();
|
currentRequest = client.prepareBulk();
|
||||||
if (streamType.equals("filter") || filterQuery != null) {
|
if (streamType.equals("filter") || filterQuery != null) {
|
||||||
try {
|
|
||||||
stream.filter(filterQuery);
|
stream.filter(filterQuery);
|
||||||
} catch (TwitterException e) {
|
|
||||||
logger.warn("failed to create filter stream based on query, disabling river....");
|
|
||||||
}
|
|
||||||
} else if (streamType.equals("firehose")) {
|
} else if (streamType.equals("firehose")) {
|
||||||
stream.firehose(0);
|
stream.firehose(0);
|
||||||
} else {
|
} else {
|
||||||
@ -309,11 +307,8 @@ public class TwitterRiver extends AbstractRiverComponent implements River {
|
|||||||
stream.addListener(new StatusHandler());
|
stream.addListener(new StatusHandler());
|
||||||
|
|
||||||
if (streamType.equals("filter") || filterQuery != null) {
|
if (streamType.equals("filter") || filterQuery != null) {
|
||||||
try {
|
stream.filter(filterQuery);
|
||||||
stream.filter(filterQuery);
|
|
||||||
} catch (TwitterException e) {
|
|
||||||
logger.warn("failed to create filter stream based on query, disabling river....");
|
|
||||||
}
|
|
||||||
} else if (streamType.equals("firehose")) {
|
} else if (streamType.equals("firehose")) {
|
||||||
stream.firehose(0);
|
stream.firehose(0);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user