Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8b56400
Add new module and add v11 thrift protocol
AngersZhuuuu Oct 22, 2019
e30f686
add pom lincense
AngersZhuuuu Oct 23, 2019
4a50bc9
update code folder name
AngersZhuuuu Oct 23, 2019
7ffdc3b
all like hive
AngersZhuuuu Oct 23, 2019
b74d5e0
remove py/cpp/r/php
AngersZhuuuu Oct 23, 2019
fc2648f
Maven generate thrift source code
wangyum Oct 24, 2019
5365dcf
org.apache.thrift.tools:maven-thrift-plugin -> org.apache.thrift:thri…
wangyum Oct 25, 2019
95d8137
save some basic code
AngersZhuuuu Oct 26, 2019
4dc5c7e
Merge pull request #2 from wangyum/SPARK-29108
AngersZhuuuu Oct 27, 2019
24ce6d4
Merge branch 'SPARK-29018-V11' of https://github.com/AngersZhuuuu/spa…
AngersZhuuuu Oct 27, 2019
5efe8cb
Revert "save some basic code"
AngersZhuuuu Oct 27, 2019
6f7d48a
Update TCLIService.thrift
AngersZhuuuu Oct 27, 2019
cf24306
Add basic data
AngersZhuuuu Oct 27, 2019
24fce6b
save code
AngersZhuuuu Oct 28, 2019
bc36bdf
change
AngersZhuuuu Oct 28, 2019
c438673
format code
AngersZhuuuu Oct 28, 2019
a7ec8b0
format code
AngersZhuuuu Oct 29, 2019
5cf7eb0
Update SparkSQLEnv.scala
AngersZhuuuu Oct 29, 2019
0023bcb
fix logger conflict
AngersZhuuuu Oct 29, 2019
723450b
fix scala style
AngersZhuuuu Oct 29, 2019
3eb7672
start with execution hive
AngersZhuuuu Oct 29, 2019
5aa4d9d
format code add file header
AngersZhuuuu Oct 29, 2019
782d36b
FOR BUILD spark-thriftserver
AngersZhuuuu Oct 29, 2019
f2b5346
add UT class
AngersZhuuuu Oct 29, 2019
a14a9e9
fix UT case, remove can't supported UT
AngersZhuuuu Oct 29, 2019
e1bb6e1
fix for UT
AngersZhuuuu Oct 29, 2019
74fb240
fix UT
AngersZhuuuu Oct 29, 2019
2f90ed9
fix for UT
AngersZhuuuu Oct 30, 2019
cd92f3f
fix return error
AngersZhuuuu Oct 30, 2019
60dc24f
fix client convert row map
AngersZhuuuu Oct 30, 2019
409a1a3
add UT of TCLIServiceClient
AngersZhuuuu Oct 31, 2019
5771a9b
fix java code style
AngersZhuuuu Oct 31, 2019
77578c3
add processGlobalInitFile
AngersZhuuuu Oct 31, 2019
4f7cbac
Update ThriftServerSessionImpl.scala
AngersZhuuuu Oct 31, 2019
d93ab72
Keep type in scala and remove unused type
AngersZhuuuu Oct 31, 2019
ac9ad54
basic service to java
AngersZhuuuu Oct 31, 2019
795ada1
Handle to java
AngersZhuuuu Oct 31, 2019
63076d3
Operation Type State Status to java
AngersZhuuuu Oct 31, 2019
000443a
Fetch type and orientation to java
AngersZhuuuu Oct 31, 2019
5de2bf9
PatternOrIdentifier to java
AngersZhuuuu Oct 31, 2019
a6b0ed1
Interface to Java
AngersZhuuuu Oct 31, 2019
2e6d221
fix bug
AngersZhuuuu Nov 1, 2019
158b298
remove setApplicationName
AngersZhuuuu Nov 1, 2019
745ca60
Session Basic Class to java
AngersZhuuuu Nov 1, 2019
f62e577
auth and thrift service to java
AngersZhuuuu Nov 1, 2019
5fae842
Update ColumnBasedSet.scala
AngersZhuuuu Nov 1, 2019
fe39db0
Update RowBasedSet.scala
AngersZhuuuu Nov 1, 2019
1c303ba
Update type map
AngersZhuuuu Nov 1, 2019
9a32af8
make RowSetFactory clean
AngersZhuuuu Nov 1, 2019
287c6be
update
AngersZhuuuu Nov 2, 2019
f6a7736
format code
AngersZhuuuu Nov 2, 2019
f8b7351
add thrift file
AngersZhuuuu Nov 6, 2019
272ba3c
not check current java code now
AngersZhuuuu Nov 6, 2019
0de3191
remove import jdk.tools dependency
AngersZhuuuu Nov 6, 2019
6374f42
follow comment
AngersZhuuuu Nov 6, 2019
f464773
Merge branch 'master' into SPARK-29018-V11-STEP4-ADD-TEST
AngersZhuuuu Nov 7, 2019
13da926
fix for `mvn install`
AngersZhuuuu Nov 7, 2019
d0de49f
fix for `mvn install`
AngersZhuuuu Nov 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix java code style
  • Loading branch information
AngersZhuuuu committed Oct 31, 2019
commit 5771a9bde45dc47800fa544f51f40a4b472340aa
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class AnonymousAuthenticationProviderImpl implements PasswdAuthenticationProvider {

@Override
public void Authenticate(String user, String password) throws AuthenticationException {
public void authenticate(String user, String password) throws AuthenticationException {
// no-op authentication
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class CustomAuthenticationProviderImpl implements PasswdAuthenticationPro
}

@Override
public void Authenticate(String user, String password) throws AuthenticationException {
customProvider.Authenticate(user, password);
public void authenticate(String user, String password) throws AuthenticationException {
customProvider.authenticate(user, password);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class LdapAuthenticationProviderImpl implements PasswdAuthenticationProvi
}

@Override
public void Authenticate(String user, String password) throws AuthenticationException {
public void authenticate(String user, String password) throws AuthenticationException {

Hashtable<String, Object> env = new Hashtable<String, Object>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class PamAuthenticationProviderImpl implements PasswdAuthenticationProvid
}

@Override
public void Authenticate(String user, String password) throws AuthenticationException {
public void authenticate(String user, String password) throws AuthenticationException {

if (pamServiceNames == null || pamServiceNames.trim().isEmpty()) {
throw new AuthenticationException("No PAM services are set.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public interface PasswdAuthenticationProvider {

/**
* The Authenticate method is called by the HiveServer2 authentication layer
* The authenticate method is called by the HiveServer2 authentication layer
* to authenticate users for their requests.
* If a user is to be granted, return nothing/throw nothing.
* When a user is to be disallowed, throw an appropriate {@link AuthenticationException}.
Expand All @@ -35,5 +35,5 @@ public interface PasswdAuthenticationProvider {
* @throws AuthenticationException When a user is found to be
* invalid by the implementation
*/
void Authenticate(String user, String password) throws AuthenticationException;
void authenticate(String user, String password) throws AuthenticationException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public static GetInfoType getGetInfoType(TGetInfoType tGetInfoType) {
return infoType;
}
}
throw new IllegalArgumentException("Unrecognized Thrift TGetInfoType value: " + tGetInfoType);
throw new IllegalArgumentException("Unrecognized Thrift TGetInfoType value: "
+ tGetInfoType);
}

public TGetInfoType toTGetInfoType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ public SparkThriftServerSQLException(String reason, String sqlState, Throwable c
* @param vendorCode
* @param cause
*/
public SparkThriftServerSQLException(String reason, String sqlState, int vendorCode, Throwable cause) {
public SparkThriftServerSQLException(String reason,
String sqlState,
int vendorCode,
Throwable cause) {
super(reason, sqlState, vendorCode, cause);
}

Expand Down Expand Up @@ -197,7 +200,9 @@ public static Throwable toCause(List<String> details) {
return toStackTrace(details, null, 0);
}

private static Throwable toStackTrace(List<String> details, StackTraceElement[] parent, int index) {
private static Throwable toStackTrace(List<String> details,
StackTraceElement[] parent,
int index) {
String detail = details.get(index++);
if (!detail.startsWith("*")) {
return null; // should not be happened. ignore remaining
Expand Down Expand Up @@ -241,7 +246,8 @@ private static Throwable toStackTrace(List<String> details, StackTraceElement[]

private static Throwable newInstance(String className, String message) {
try {
return (Throwable)Class.forName(className).getConstructor(String.class).newInstance(message);
return (Throwable)Class.forName(className)
.getConstructor(String.class).newInstance(message);
} catch (Exception e) {
return new RuntimeException(className + ":" + message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ private void setLayout(boolean isVerbose, Layout lo) {
if (isVerbose) {
if (lo == null) {
lo = CLIServiceUtils.verboseLayout;
LOG.info("Cannot find a Layout from a ConsoleAppender. Using default Layout pattern.");
LOG.info("Cannot find a Layout from a ConsoleAppender. " +
"Using default Layout pattern.");
}
} else {
lo = CLIServiceUtils.nonVerboseLayout;
Expand Down Expand Up @@ -171,7 +172,8 @@ public void doAppend(LoggingEvent event) {

// Set current layout depending on the verbose/non-verbose mode.
if (log != null) {
boolean isCurrModeVerbose = (log.getOpLoggingLevel() == OperationLog.LoggingLevel.VERBOSE);
boolean isCurrModeVerbose =
(log.getOpLoggingLevel() == OperationLog.LoggingLevel.VERBOSE);

// If there is a logging level change from verbose->non-verbose or vice-versa since
// the last subAppend call, change the layout to preserve consistency.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private class PlainServerCallbackHandler @throws[AuthenticationException]
}
}
val provider = AuthenticationProviderFactory.getAuthenticationProvider(authMethod)
provider.Authenticate(username, password)
provider.authenticate(username, password)
if (ac != null) {
ac.setAuthorized(true)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private[thriftserver] class ThriftHttpServlet(processor: TProcessor,
AuthMethods.getValidAuthMethod(authType)
val provider: PasswdAuthenticationProvider =
AuthenticationProviderFactory.getAuthenticationProvider(authMethod)
provider.Authenticate(userName, getPassword(request, authType))
provider.authenticate(userName, getPassword(request, authType))
} catch {
case e: Exception =>
throw new HttpAuthenticationException(e)
Expand Down Expand Up @@ -359,7 +359,7 @@ private[thriftserver] class ThriftHttpServlet(processor: TProcessor,
val serviceTicketBase64: String = getAuthHeader(request, authType)
val inToken: Array[Byte] = Base64.decodeBase64(serviceTicketBase64.getBytes)
gssContext.acceptSecContext(inToken, 0, inToken.length)
// Authenticate or deny based on its context completion
// authenticate or deny based on its context completion
if (!gssContext.isEstablished) {
throw new HttpAuthenticationException("Kerberos authentication failed: " +
"unable to establish context with the service ticket " + "provided by the client.")
Expand Down