Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

Increase meta client connection timeout。 #161

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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 @@ -30,7 +30,7 @@ class MetaProvider(addresses: List[HostAndPort], timeout: Int, retry: Int)
address.append(new HostAddress(addr.getHostText, addr.getPort))
}

private val metaClient = new MetaClient(address.asJava)
private val metaClient = new MetaClient(address.asJava,timeout,retry,retry)
metaClient.connect()

def getPartNumber(space: String): Int = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ import scala.collection.mutable

class MetaProvider(addresses: List[Address]) extends AutoCloseable {

private val DEFAULT_TIMEOUT_MS = 6000
private val DEFAULT_CONNECTION_RETRY_SIZE = 3
private val DEFAULT_EXECUTION_RETRY_SIZE = 3
val metaAddress = addresses.map(address => new HostAddress(address._1, address._2)).asJava
val client = new MetaClient(metaAddress)
val client = new MetaClient(metaAddress,DEFAULT_TIMEOUT_MS,DEFAULT_CONNECTION_RETRY_SIZE,DEFAULT_EXECUTION_RETRY_SIZE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should get timeout and retry parameter from NebulaConnectionConfig

client.connect()

def getPartitionNumber(space: String): Int = {
Expand Down