Skip to content
Permalink
Browse files
[refactor](spark-connector) delete useless maven dependencies and som…
…e code variable definition issues (#7655)
  • Loading branch information
hf200012 committed Jan 9, 2022
1 parent 040b959 commit ecc7633b5b649250112b717eff9515f34edabcec
Showing 7 changed files with 8 additions and 9 deletions.
@@ -45,7 +45,7 @@
* Client to request Doris BE
*/
public class BackendClient {
private static Logger logger = LoggerFactory.getLogger(BackendClient.class);
private final static Logger logger = LoggerFactory.getLogger(BackendClient.class);

private Routing routing;

@@ -29,7 +29,7 @@
import org.slf4j.LoggerFactory;

public abstract class Settings {
private static Logger logger = LoggerFactory.getLogger(Settings.class);
private final static Logger logger = LoggerFactory.getLogger(Settings.class);

public abstract String getProperty(String name);

@@ -174,16 +174,16 @@ private static String parseResponse(HttpURLConnection connection,Logger logger)
connection.getURL(), connection.getResponseCode());
throw new IOException("Failed to get response from Doris");
}
String result = "";
StringBuilder result = new StringBuilder("");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf-8"));
String line;
while ((line = in.readLine()) != null) {
result += line;
result.append(line);
}
if (in != null) {
in.close();
}
return result;
return result.toString();
}

private static String getConnectionPost(HttpRequestBase request,String user, String passwd,Logger logger) throws IOException {
@@ -27,7 +27,7 @@
* present an Doris BE address.
*/
public class Routing {
private static Logger logger = LoggerFactory.getLogger(Routing.class);
private final static Logger logger = LoggerFactory.getLogger(Routing.class);

private String host;
private int port;
@@ -22,7 +22,6 @@
import java.io.StringWriter;
import java.util.Properties;

import org.apache.doris.spark.exception.DorisException;
import org.apache.doris.spark.exception.IllegalArgumentException;

public class IOUtils {
@@ -53,7 +53,7 @@
import jdk.nashorn.internal.ir.annotations.Ignore;

public class TestRestService {
private static Logger logger = LoggerFactory.getLogger(TestRestService.class);
private final static Logger logger = LoggerFactory.getLogger(TestRestService.class);

@Rule
public ExpectedException thrown = ExpectedException.none();
@@ -60,7 +60,7 @@
import com.google.common.collect.ImmutableList;

public class TestRowBatch {
private static Logger logger = LoggerFactory.getLogger(TestRowBatch.class);
private final static Logger logger = LoggerFactory.getLogger(TestRowBatch.class);

@Rule
public ExpectedException thrown = ExpectedException.none();

0 comments on commit ecc7633

Please sign in to comment.