@Override public String toString() { StringBuilder sb = new StringBuilder(128); try { boolean first=true; for (Map.Entry<String,String> entry : map.entrySet()) { String key = entry.getKey(); Object val = entry.getValue(); if (val instanceof String[]) { String[] strings = (String[]) val; val = StrUtils.join(Arrays.asList(strings),','); } if (!first) sb.append('&'); first=false; sb.append(key); sb.append('='); StrUtils.partialURLEncodeVal(sb, val==null ? "" : String.valueOf(val)); } } catch (IOException e) {throw new RuntimeException(e);} // can't happen return sb.toString(); } }
} else if (varType.type == String.class) { if (isRuleVal && !varType.vals.isEmpty() && !varType.vals.contains(val)) throw new RuntimeException(name + ": " + val + " must be one of " + StrUtils.join(varType.vals, ',')); return val; } else {
ids.add(shardDoc.id.toString()); sreq.params.add(TermVectorParams.DOC_IDS, StrUtils.join(ids, ','));
sreq.params.add(ShardParams.IDS, StrUtils.join(ids, ','));
String termsVal = StrUtils.join(refList, ',');
/** Writes the cores configuration node for a given core. */ void persist(Writer w, List<String> aliases, CoreDescriptor dcore) throws IOException { w.write(" <core"); writeAttribute(w,"name",StrUtils.join(aliases,',')); writeAttribute(w,"instanceDir",dcore.getInstanceDir()); //write config (if not default) String opt = dcore.getConfigName(); if (opt != null && !opt.equals(dcore.getDefaultConfigName())) { writeAttribute(w, "config",opt); } //write schema (if not default) opt = dcore.getSchemaName(); if (opt != null && !opt.equals(dcore.getDefaultSchemaName())) { writeAttribute(w,"schema",opt); } opt = dcore.getPropertiesName(); if (opt != null) { writeAttribute(w,"properties",opt); } opt = dcore.dataDir; if (opt != null) writeAttribute(w,"dataDir",opt); if (dcore.getCoreProperties() == null || dcore.getCoreProperties().isEmpty()) w.write("/>\n"); // core else { w.write(">\n"); writeProperties(w, dcore.getCoreProperties()); w.write("</core>"); } }
String joinedInputCollections = StrUtils.join(inputCollections, ','); for (Slice slice : slices.values()) { for (ZkNodeProps nodeProps : slice.getReplicasMap().values()) {