Merge branch 'master' of ssh://git@gitorious.org/yacy/rc1.git

Conflicts:
	source/net/yacy/peers/Protocol.java
This commit is contained in:
Michael Peter Christen 2014-10-07 23:33:28 +02:00
commit 883622306e
3 changed files with 19 additions and 4 deletions

View File

@ -502,10 +502,10 @@ public final class Protocol {
// duetime : maximum time that a peer should spent to create a result
final long timestamp = System.currentTimeMillis();
event.addExpectedRemoteReferences(count);
event.addExpectedRemoteReferences(count);
SearchResult result = null;
for (String ip: target.getIPs()) {
if (ip.indexOf(':') >= 0) System.out.println("Search target: IPv6: " + ip);
//if (ip.indexOf(':') >= 0) System.out.println("Search target: IPv6: " + ip);
String clusteraddress = target.getPublicAddress(ip);
if (target.clash(event.peers.mySeed().getIPs())) clusteraddress = "localhost:" + event.peers.mySeed().getPort();
try {
@ -531,6 +531,7 @@ public final class Protocol {
event.peers.peerActions.interfaceDeparture(target, ip);
return -1;
}
}
// computation time
final long totalrequesttime = System.currentTimeMillis() - timestamp;

View File

@ -966,6 +966,7 @@ public final class SeedDB implements AlternativeDomainNames {
}
}
@Deprecated
public String targetAddress(final String targetHash) {
// find target address
String address;
@ -979,6 +980,19 @@ public final class SeedDB implements AlternativeDomainNames {
if (address == null) address = "localhost" + (this.mySeed.getPort() > 0 ? ":" + this.mySeed.getPort() : "");
return address;
}
public Set<String> targetIPs(final String targetHash) {
// find target address
Set<String> ips;
if (targetHash.equals(mySeed().hash)) {
ips = mySeed().getIPs();
} else {
final Seed targetSeed = getConnected(targetHash);
if (targetSeed == null) { return null; }
ips = targetSeed.getIPs();
}
return ips;
}
private class seedEnum implements Iterator<Seed> {

View File

@ -1267,9 +1267,9 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
Collection<Object> proctags = doc.getFieldValues(CollectionSchema.process_sxt.getSolrFieldName());
final String u = (String) doc.getFieldValue(CollectionSchema.sku.getSolrFieldName());
final String i = (String) doc.getFieldValue(CollectionSchema.id.getSolrFieldName());
if (proctags == null) {
if (proctags == null || proctags.size() == 0) {
// this should not happen since we collected the documents using a process_sxt:[* TO *] term
ConcurrentLog.warn("CollectionConfiguration", "no process_sxt entry for url " + u);
ConcurrentLog.warn("CollectionConfiguration", "no process_sxt entry for url " + u + ", id=" + i);
continue;
}
try {