Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def topic_Offset_lz(self):
- 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)
- t_out_lz, t_error_lz = subprocess.Popen(CMD, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate()
- return t_out_lz
- def topic_offset_sl(self):
- 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)
- t_out_sl, t_error_sl = subprocess.Popen(["ssh", "-q", CMD], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate()
- return t_error_sl
Add Comment
Please, Sign In to add comment