Skip to content

1.8.0 features merge #5224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import java.nio.charset.StandardCharsets
import java.security.{KeyPair, KeyPairGenerator, PrivateKey, PublicKey}

object RSAUtils {
private implicit val keyPair = genKeyPair(1024)
private implicit val keyPair = genKeyPair(2048)

def genKeyPair(keyLength: Int): KeyPair = {
val keyPair = KeyPairGenerator.getInstance("RSA")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ object HadoopConf {
val HDFS_ENABLE_CACHE_CLOSE =
CommonVars("linkis.hadoop.hdfs.cache.close.enable", true).getValue

val HDFS_ENABLE_NOT_CLOSE_USERS =
CommonVars("linkis.hadoop.hdfs.cache.not.close.users", "").getValue

val HDFS_ENABLE_CACHE_IDLE_TIME =
CommonVars("wds.linkis.hadoop.hdfs.cache.idle.time", 3 * 60 * 1000).getValue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ object HDFSUtils extends Logging {
.foreach { hdfsFileSystemContainer =>
val locker = hdfsFileSystemContainer.getUser + LOCKER_SUFFIX
locker.intern() synchronized {
if (hdfsFileSystemContainer.canRemove()) {
if (
hdfsFileSystemContainer.canRemove() && !HadoopConf.HDFS_ENABLE_NOT_CLOSE_USERS
.contains(hdfsFileSystemContainer.getUser)
) {
fileSystemCache.remove(
hdfsFileSystemContainer.getUser + JOINT + hdfsFileSystemContainer.getLabel
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class SecurityFilter extends Filter {
ServerConfiguration.BDP_SERVER_RESTFUL_PASS_AUTH_REQUEST_URI
.exists(r => !r.equals("") && request.getRequestURI.startsWith(r))
) {
logger.info("pass auth uri: " + request.getRequestURI)
logger.debug("pass auth uri: " + request.getRequestURI)
true
} else {
val userName = Utils.tryCatch(SecurityFilter.getLoginUser(request)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ object LinkisStorageConf {
CommonVars
.apply(
"wds.linkis.hdfs.rest.errs",
".*Filesystem closed.*|.*Failed to find any Kerberos tgt.*"
".*Filesystem closed.*|.*Failed to find any Kerberos tgt.*|.*The client is stopped.*"
)
.getValue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ object LinkisJobBuilder {

var authTokenValue: String = CommonVars[String](
"wds.linkis.client.test.common.tokenValue",
"LINKIS_CLI_TEST"
Configuration.LINKIS_TOKEN.getValue
).getValue // This is the default authToken, we usually suggest set different ones for users.

def setDefaultClientConfig(clientConfig: DWSClientConfig): Unit = this.clientConfig = clientConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.linkis.computation.client.once.simple

import org.apache.linkis.bml.client.{BmlClient, BmlClientFactory}
import org.apache.linkis.common.conf.Configuration.LINKIS_TOKEN
import org.apache.linkis.common.utils.Utils
import org.apache.linkis.computation.client.LinkisJobBuilder
import org.apache.linkis.computation.client.LinkisJobBuilder.clientConfig
Expand Down Expand Up @@ -171,7 +172,7 @@ object SimpleOnceJobBuilder {
) // We think 90s is enough, if SocketTimeoutException is throw, just set a new clientConfig to modify it.
.setAuthenticationStrategy(new TokenAuthenticationStrategy())
.setAuthTokenKey(TokenAuthenticationStrategy.TOKEN_KEY)
.setAuthTokenValue(LinkisJobBuilder.authTokenValue)
.setAuthTokenValue(LINKIS_TOKEN.getValue)
.setDWSVersion(clientConfig.getDWSVersion)
.build()
bmlClient = BmlClientFactory.createBmlClient(newClientConfig)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ object JobRequestConstants {
val ENABLE_DIRECT_PUSH = "enableDirectPush"

val DIRECT_PUSH_FETCH_SIZE = "direct_push_fetch_size"
val LINKIS_HIVE_EC_READ_RESULT_BY_OBJECT = "readResByObject"

}

This file was deleted.

Loading