Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
nezihyigitbasi committed Aug 15, 2015
1 parent 14330b0 commit 29500aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ client.getQueryStatistics(queryId, statistics =>
####Getting All Nodes

```
client.getAllNodes(prestoNode => println(prestoNode))
client.forEachPrestoNode(prestoNode => println(prestoNode))
```

##Using the Library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ object PrestoNodesSample extends BaseSample with LazyLogging {

def main(args: Array[String]) {
val client = new PrestoClient(new PrestoClientConfig(baseURI="http://localhost:8080//"))
client.getAllNodes(prestoNode => println(prestoNode))
client.forEachPrestoNode(prestoNode => println(prestoNode))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ class PrestoClient(val config: PrestoClientConfig) extends LazyLogging {
}

/**
* Get all the nodes in the cluster
* Call the given function for each Presto node in the cluster
* @param callback This callback gets called for every node in the cluster
*/
def getAllNodes(callback: PrestoNode => Unit) = {
def forEachPrestoNode(callback: PrestoNode => Unit) = {
val url = new URL(s"${nodeURL}")
GET(url).setHeaders(httpHeaders).apply.onComplete {
case Success(response) => {
Expand Down

0 comments on commit 29500aa

Please sign in to comment.