public byte[] json() { return StringUtils.toUTF(source); }
public void write(DataOutput out) throws IOException { out.writeUTF(index); out.writeInt(shardId); out.writeBoolean(slice != null); if (slice != null) { out.writeInt(slice.id); out.writeInt(slice.max); } out.writeBoolean(serializedSettings != null); if (serializedSettings != null) { // same goes for settings byte[] utf = StringUtils.toUTF(serializedSettings); out.writeInt(utf.length); out.write(utf); } out.writeBoolean(serializedMapping != null); if (serializedMapping != null) { // avoid using writeUTF since the mapping can be longer than 65K byte[] utf = StringUtils.toUTF(serializedMapping); out.writeInt(utf.length); out.write(utf); } out.writeInt(locations.length); for (String location : locations) { out.writeUTF(location); } }
public byte[] json() { return StringUtils.toUTF(source); }
public byte[] json() { return StringUtils.toUTF(source); }
public byte[] json() { return StringUtils.toUTF(source); }
public byte[] json() { return StringUtils.toUTF(source); }
@Override public void write(DataOutput out) throws IOException { out.writeUTF(nodeIp); out.writeInt(httpPort); out.writeUTF(nodeId); out.writeUTF(nodeName); out.writeUTF(shardId); out.writeBoolean(onlyNode); // avoid using writeUTF since the mapping can be longer than 65K byte[] utf = StringUtils.toUTF(mapping); out.writeInt(utf.length); out.write(utf); // same goes for settings utf = StringUtils.toUTF(settings); out.writeInt(utf.length); out.write(utf); }
public void write(DataOutput out) throws IOException { out.writeUTF(index); out.writeInt(shardId); out.writeBoolean(slice != null); if (slice != null) { out.writeInt(slice.id); out.writeInt(slice.max); } out.writeBoolean(serializedSettings != null); if (serializedSettings != null) { // same goes for settings byte[] utf = StringUtils.toUTF(serializedSettings); out.writeInt(utf.length); out.write(utf); } out.writeBoolean(serializedMapping != null); if (serializedMapping != null) { // avoid using writeUTF since the mapping can be longer than 65K byte[] utf = StringUtils.toUTF(serializedMapping); out.writeInt(utf.length); out.write(utf); } out.writeInt(locations.length); for (String location : locations) { out.writeUTF(location); } }
public void write(DataOutput out) throws IOException { out.writeUTF(index); out.writeInt(shardId); out.writeBoolean(slice != null); if (slice != null) { out.writeInt(slice.id); out.writeInt(slice.max); } out.writeBoolean(serializedSettings != null); if (serializedSettings != null) { // same goes for settings byte[] utf = StringUtils.toUTF(serializedSettings); out.writeInt(utf.length); out.write(utf); } out.writeBoolean(serializedMapping != null); if (serializedMapping != null) { // avoid using writeUTF since the mapping can be longer than 65K byte[] utf = StringUtils.toUTF(serializedMapping); out.writeInt(utf.length); out.write(utf); } out.writeInt(locations.length); for (String location : locations) { out.writeUTF(location); } }
public void write(DataOutput out) throws IOException { out.writeUTF(index); out.writeInt(shardId); out.writeBoolean(slice != null); if (slice != null) { out.writeInt(slice.id); out.writeInt(slice.max); } out.writeBoolean(serializedSettings != null); if (serializedSettings != null) { // same goes for settings byte[] utf = StringUtils.toUTF(serializedSettings); out.writeInt(utf.length); out.write(utf); } out.writeBoolean(serializedMapping != null); if (serializedMapping != null) { // avoid using writeUTF since the mapping can be longer than 65K byte[] utf = StringUtils.toUTF(serializedMapping); out.writeInt(utf.length); out.write(utf); } out.writeInt(locations.length); for (String location : locations) { out.writeUTF(location); } }
while (sq.hasNext()) { entry.reset(); entry.add(StringUtils.toUTF(String.format(format, sq.next()[0]))); writeProcessedToIndex(entry);