<commit_before>#
# Cookbook Name:: zookeeper
# Recipe:: default
# Author:: <EMAIL> / <EMAIL>
#
# Copyright 2012, Webtrends
#
# All rights reserved - Do Not Redistribute
# This recipe installs the needed components to prepare machine for db_index exe

include_recipe "java"

# setup zookeeper group
group "zookeeper" do
end

# setup zookeeper user
user "zookeeper" do
  comment "Zookeeper user"
  gid "zookeeper"
  home "/home/zookeeper"
  shell "/bin/bash"
  supports :manage_home => true
end

# create the install directory
directory "#{node[:zookeeper][:installDir]}" do
  owner "zookeeper"
  group "zookeeper"
  recursive true
  mode "0744"
end

# create the data directory
directory "#{node[:zookeeper][:dataDir]}" do
  owner "zookeeper"
  group "zookeeper"
  recursive true
  mode "0744"
end

# create the snapshot directory
directory "#{node[:zookeeper][:snapshotDir]}" do
  owner "zookeeper"
  group "zookeeper"
  recursive true
  mode "0744"
end

# download zookeeper
remote_file "#{Chef::Config[:file_cache_path]}/zookeeper-#{node[:zookeeper][:version]}.tar.gz" do
  source "#{default[:zookeeper][:sourceURL]}"
  owner "zookeeper"
  group "zookeeper"
  mode "0744"
  action :create_if_missing
end

# extract it
execute "extract-zookeeper" do
  command "tar -zxf zookeeper-#{node[:zookeeper][:version]}.tar.gz"
  creates "zookeeper-#{node[:zookeeper][:version]}"
  cwd "#{node[:zookeeper][:installDir]}"<commit_msg>Uncompress from the correct location now that we're storing the source in a temp did<commit_after>#
# Cookbook Name:: zookeeper
# Recipe:: default
# Author:: <EMAIL> / <EMAIL>
#
# Copyright 2012, Webtrends
#
# All rights reserved - Do Not Redistribute
# This recipe installs the needed components to prepare machine for db_index exe

include_recipe "java"

# setup zookeeper group
group "zookeeper" do
end

# setup zookeeper user
user "zookeeper" do
  comment "Zookeeper user"
  gid "zookeeper"
  home "/home/zookeeper"
  shell "/bin/bash"
  supports :manage_home => true
end

# create the install directory
directory "#{node[:zookeeper][:installDir]}" do
  owner "zookeeper"
  group "zookeeper"
  recursive true
  mode "0744"
end

# create the data directory
directory "#{node[:zookeeper][:dataDir]}" do
  owner "zookeeper"
  group "zookeeper"
  recursive true
  mode "0744"
end

# create the snapshot directory
directory "#{node[:zookeeper][:snapshotDir]}" do
  owner "zookeeper"
  group "zookeeper"
  recursive true
  mode "0744"
end

# download zookeeper
remote_file "#{Chef::Config[:file_cache_path]}/zookeeper-#{node[:zookeeper][:version]}.tar.gz" do
  source "#{default[:zookeeper][:sourceURL]}"
  owner "zookeeper"
  group "zookeeper"
  mode "0744"
  action :create_if_missing
end

# extract it
execute "extract-zookeeper" do
  command "tar -zxf #{Chef::Config[:file_cache_path]}/zookeeper-#{node[:zookeeper][:version]}.tar.gz"
  creates "zookeeper-#{node[:zookeeper][:version]}"
  cwd "#{node[:zookeeper][:installDir]}"
{'fraction_non_alphanumeric': 0.12944764486614707, 'fraction_numerical': 0.013554727211114876, 'mean_word_length': 5.3076923076923075, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7305167', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1039, 'n_words': 283}