Skip to content

Commit

Permalink
Add org name
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhtien522 committed Aug 1, 2017
1 parent c51d7f2 commit 5ac73f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions build.sbt
@@ -1,3 +1,5 @@
organization := "com.github.thanhtien522"

name := "es_http_client"

version := "1.0-SNAPSHOT"
Expand Down
Expand Up @@ -38,14 +38,14 @@ class ESHttpClient(servers: Seq[String], authInfo: AuthInfo) {
httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider)
})

case BasicAuthWithEncryptAuthInfo(user, pass, keyStorePath, keyStorePass) =>
//TODO: Implement encrypted communication
case BasicAuthWithEncryptAuthInfo(_, _, _, _) =>
throw new IllegalArgumentException("BasicAuthWithEncryptAuthInfo currently does not supported.")
case _ => //Do nothing
}
builder.build()
}

val clusterInfo = {
val clusterInfo: ClusterInfo = {
val resp = client.performRequest(HttpGet.METHOD_NAME, "/", Map.empty[String, String])
objectMapper.readValue(resp.getEntity.getContent, classOf[ClusterInfo])
}
Expand Down Expand Up @@ -170,7 +170,7 @@ class ESHttpClient(servers: Seq[String], authInfo: AuthInfo) {
def refresh(indies: Set[String]): Unit = {
val resp = client.performRequest(HttpPost.METHOD_NAME, s"/${indies.mkString(",")}/_refresh")
resp.getStatusLine.getStatusCode match {
case 200 => true
case 200 =>
case code => throw new Exception(s"Refresh topic return code $code")
}
}
Expand Down

0 comments on commit 5ac73f7

Please sign in to comment.