<commit_before>package main

/**
 * Sample Go Client for Barista
 *
 * @author: <NAME>
 * @date: 03/23/2014
 */

import "fmt"
import "barista"
import "git.apache.org/thrift.git/lib/go/thrift"
import "sync"
import crand "crypto/rand"
import "math/big"
import "strconv"

func nrand() int64 {
  max := big.NewInt(int64(1) << 62)
  bigx, _ := crand.Int(crand.Reader, max)
  x := bigx.Int64()
  return x
}

type Clerk struct {
  servers []string
  mu sync.Mutex
  me int64 // passed as clientId
  curRequest int
}


func MakeClerk(servers []string) *Clerk {
  ck := new(Clerk)
  ck.servers = servers

  ck.me = nrand()
  ck.curRequest = 0

  return ck
}

//const ADDR = "localhost:9000"
//var addrs = []string {"172.16.58.3:9000", "172.16.17.32:9000", "192.168.127.12:9000", "172.16.17.32:9000", "172.16.58.3:9000"}
var addrs = []string{"localhost:9000"}

func main() {  
  clerk := MakeClerk(addrs)
  con := clerk.OpenConnection()
  clerk.ExecuteSQL(con, "SELECT 6.824 as id, 'Distributed Systems' as name", nil) 
  clerk.CloseConnection(con)
}

//
// execute SQL query
// keeps trying forever in the face of all other errors.
//<commit_msg>ip addresses working<commit_after>package main

/**
 * Sample Go Client for Barista
 *
 * @author: <NAME>
 * @date: 03/23/2014
 */

import "fmt"
import "barista"
import "git.apache.org/thrift.git/lib/go/thrift"
import "sync"
import crand "crypto/rand"
import "math/big"
import "strconv"

func nrand() int64 {
  max := big.NewInt(int64(1) << 62)
  bigx, _ := crand.Int(crand.Reader, max)
  x := bigx.Int64()
  return x
}

type Clerk struct {
  servers []string
  mu sync.Mutex
  me int64 // passed as clientId
  curRequest int
}


func MakeClerk(servers []string) *Clerk {
  ck := new(Clerk)
  ck.servers = servers

  ck.me = nrand()
  ck.curRequest = 0

  return ck
}

var addrs = []string {"172.16.58.3:9000", "172.16.17.32:9000", "192.168.127.12:9000", "172.16.17.32:9000", "172.16.58.3:9000"}

func main() {  
  clerk := MakeClerk(addrs)
  con := clerk.OpenConnection()
  clerk.ExecuteSQL(con, "SELECT 6.824 as id, 'Distributed Systems' as name", nil) 
  clerk.CloseConnection(con)
}

//
// execute SQL query
// keeps trying forever in the face of all other errors.
//
{'fraction_non_alphanumeric': 0.161231884057971, 'fraction_numerical': 0.08423913043478261, 'mean_word_length': 3.4807302231237323, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 10, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1744597', 'n_tokens_mistral': 975, 'n_tokens_neox': 862, 'n_words': 218}