mirror of https://github.com/apache/lucene.git
SOLR-13682: precommit errors
This commit is contained in:
parent
e45e8127d5
commit
b9912411ea
|
@ -21,6 +21,7 @@ import java.io.FileOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
@ -248,7 +249,7 @@ public class ExportTool extends SolrCLI.ToolBase {
|
|||
@Override
|
||||
public void start() throws IOException {
|
||||
fos = new FileOutputStream(info.out);
|
||||
writer = FastWriter.wrap(new OutputStreamWriter(fos));
|
||||
writer = FastWriter.wrap(new OutputStreamWriter(fos, StandardCharsets.UTF_8));
|
||||
jsonw = new SolrJSONWriter(writer);
|
||||
jsonw.setIndent(false);
|
||||
|
||||
|
|
|
@ -19,8 +19,9 @@ package org.apache.solr.util;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.apache.lucene.util.TestUtil;
|
||||
|
@ -79,7 +80,7 @@ public class TestExportTool extends SolrCloudTestCase {
|
|||
|
||||
assertTrue(info.docsWritten >= 200);
|
||||
JsonRecordReader jsonReader = JsonRecordReader.getInst("/", Arrays.asList("$FQN:/**"));
|
||||
Reader rdr = new FileReader(absolutePath);
|
||||
Reader rdr = new InputStreamReader(new FileInputStream( absolutePath), StandardCharsets.UTF_8);
|
||||
try {
|
||||
int[] count = new int[]{0};
|
||||
jsonReader.streamRecords(rdr, (record, path) -> count[0]++);
|
||||
|
@ -97,7 +98,7 @@ public class TestExportTool extends SolrCloudTestCase {
|
|||
|
||||
assertTrue(info.docsWritten >= 1000);
|
||||
jsonReader = JsonRecordReader.getInst("/", Arrays.asList("$FQN:/**"));
|
||||
rdr = new FileReader(absolutePath);
|
||||
rdr = new InputStreamReader(new FileInputStream( absolutePath), StandardCharsets.UTF_8);
|
||||
try {
|
||||
int[] count = new int[]{0};
|
||||
jsonReader.streamRecords(rdr, (record, path) -> count[0]++);
|
||||
|
|
|
@ -889,7 +889,7 @@ Export all documents from a collection `gettingstarted` to a file called `gettin
|
|||
|
||||
`bin/solr export -url http://localhost:8983/solr/gettingstarted limit -1`
|
||||
|
||||
=== Arguments
|
||||
*Arguments*
|
||||
|
||||
* `format` : `jsonl` (default) or `javabin`. `format=javabin` exports to a file with extension `.javabin` which is the native Solr format. This is compact & faster to import
|
||||
* `out` : export file name
|
||||
|
|
Loading…
Reference in New Issue