mirror of https://github.com/apache/nifi.git
Fixing check-style errors for solr bundle
This commit is contained in:
parent
e557e1e6e7
commit
fabb2c997e
|
@ -40,9 +40,21 @@ import org.apache.solr.client.solrj.util.ClientUtils;
|
|||
import org.apache.solr.common.SolrDocument;
|
||||
import org.apache.solr.common.SolrDocumentList;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.apache.nifi.processors.solr;
|
|||
import org.apache.nifi.annotation.behavior.DynamicProperty;
|
||||
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
||||
import org.apache.nifi.annotation.documentation.Tags;
|
||||
import org.apache.nifi.annotation.lifecycle.OnScheduled;
|
||||
import org.apache.nifi.components.PropertyDescriptor;
|
||||
import org.apache.nifi.flowfile.FlowFile;
|
||||
import org.apache.nifi.processor.ProcessContext;
|
||||
|
@ -44,7 +43,16 @@ import org.apache.solr.common.util.ContentStreamBase;
|
|||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Tags({"Apache", "Solr", "Put", "Send"})
|
||||
|
|
|
@ -40,8 +40,8 @@ public class EmbeddedSolrServerFactory {
|
|||
/**
|
||||
* Use the defaults to create the core.
|
||||
*
|
||||
* @param coreName
|
||||
* @return
|
||||
* @param coreName the name of the core
|
||||
* @return an EmbeddedSolrServer for the given core
|
||||
*/
|
||||
public static SolrClient create(String coreName) throws IOException {
|
||||
return create(DEFAULT_SOLR_HOME, DEFAULT_CORE_HOME,
|
||||
|
|
|
@ -33,7 +33,13 @@ import java.io.File;
|
|||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
|
|
@ -38,7 +38,11 @@ import java.util.Arrays;
|
|||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.mockito.Mockito.any;
|
||||
import static org.mockito.Mockito.eq;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
/**
|
||||
* Test for PutSolr processor.
|
||||
|
@ -101,7 +105,10 @@ public class TestPutSolrContentStream {
|
|||
|
||||
verifySolrDocuments(proc.getSolrClient(), Arrays.asList(expectedDoc1, expectedDoc2));
|
||||
} finally {
|
||||
try { proc.getSolrClient().close(); } catch (Exception e) { }
|
||||
try {
|
||||
proc.getSolrClient().close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,7 +137,10 @@ public class TestPutSolrContentStream {
|
|||
|
||||
verifySolrDocuments(proc.getSolrClient(), Arrays.asList(expectedDoc1, expectedDoc2));
|
||||
} finally {
|
||||
try { proc.getSolrClient().close(); } catch (Exception e) { }
|
||||
try {
|
||||
proc.getSolrClient().close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +163,10 @@ public class TestPutSolrContentStream {
|
|||
|
||||
verifySolrDocuments(proc.getSolrClient(), Arrays.asList(expectedDoc1, expectedDoc2));
|
||||
} finally {
|
||||
try { proc.getSolrClient().close(); } catch (Exception e) { }
|
||||
try {
|
||||
proc.getSolrClient().close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,7 +189,10 @@ public class TestPutSolrContentStream {
|
|||
|
||||
verifySolrDocuments(proc.getSolrClient(), Arrays.asList(expectedDoc1, expectedDoc2));
|
||||
} finally {
|
||||
try { proc.getSolrClient().close(); } catch (Exception e) { }
|
||||
try {
|
||||
proc.getSolrClient().close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue