Guest User

Untitled

a guest
Oct 23rd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. def topic_Offset_lz(self):
  2. CMD = "/dsapps/admin/edp/scripts/edp-admin.sh kafka-topic offset %s -e %s | grep -v Getting |grep -v Verifying | egrep -v '^[[:space:]]*$|^#' | awk -F: '{print $3}'|sed '%sq;d'" % (self.topic,self.envr,self.partition)
  3. t_out_lz, t_error_lz = subprocess.Popen(CMD, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate()
  4. return t_out_lz
  5.  
  6. def topic_offset_sl(self):
  7. CMD = "/dsapps/admin/edp/scripts/edp-admin.sh kafka-topic offset %s -e %s | grep -v Getting |grep -v Verifying | egrep -v '^[[:space:]]*$|^#' | awk -F: '{print $3}'|sed '%sq;d'" % (self.topic, self.envr, self.partition)
  8. t_out_sl, t_error_sl = subprocess.Popen(["ssh", "-q", CMD], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate()
  9. return t_error_sl
Add Comment
Please, Sign In to add comment