Module Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore IfExp CompareGtE Call NameLoad NameLoad Num Call NameLoad SubscriptLoad NameLoad Index Num Num Assign NameStore IfExp CompareGtE Call NameLoad NameLoad Num CompareEq SubscriptLoad NameLoad Index Num Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call NameLoad NameLoad Import alias Import alias ImportFrom alias TryExcept body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad AttributeLoad NameLoad attr Index Str handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Raise Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Num For NameStore NameLoad body TryExcept body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr NameLoad AugAssignAdd NameStore Num handlers ExceptHandler type NameLoad name NameStore body AugAssignAdd NameStore Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A logging datetime datetime timedelta django.core.management.base BaseCommand beeswax.models Session beeswax.server dbms N/A LOG N/A N/A logging getLogger __name__ Command N/A BaseCommand N/A N/A 
  Close HiveServer2 sessions.

  e.g.
  build/env/bin/hue close_sessions 7 all
  Closing (all=True) queries older than 7 days...
  0 queries closed.
   N/A args <age_in_days> (default is 7) N/A help Close finished Hive queries older than 7 days. handle N/A N/A self N/A args options N/A N/A days N/A N/A N/A len args 1 N/A int N/A args N/A 0 7 N/A close_all N/A N/A N/A len args 2 N/A N/A args N/A 1 all False N/A N/A N/A N/A self stdout write N/A Closing (all=%s) HiveServer2 sessions older than %s days...
 N/A close_all days N/A sessions N/A N/A N/A Session objects filter status_code 0 N/A N/A close_all N/A N/A sessions N/A N/A sessions filter application beeswax N/A sessions N/A N/A sessions filter last_used__lte N/A N/A N/A datetime today N/A timedelta days days N/A N/A N/A N/A self stdout write N/A Found %d open HiveServer2 sessions to close N/A len sessions N/A os N/A beeswax beeswax hive_site N/A N/A N/A N/A N/A N/A N/A beeswax conf HIVE_CONF_DIR set_for_testing N/A N/A os environ N/A HIVE_CONF_DIR N/A N/A N/A N/A N/A N/A LOG exception failed to lookup HIVE_CONF_DIR in environment N/A N/A N/A N/A self stdout write Did you export HIVE_CONF_DIR=/etc/hive/conf?
 N/A N/A N/A N/A hive_site reset N/A N/A N/A hive_site get_conf N/A closed 0 N/A skipped 0 N/A session sessions N/A N/A N/A N/A session N/A N/A N/A N/A dbms get user N/A session owner close_session session N/A closed 1 N/A N/A N/A Exception N/A e N/A N/A skipped 1 N/A N/A N/A N/A self stdout write N/A Session with ID %d could not be closed: %s N/A N/A session id N/A str e N/A N/A N/A N/A self stdout write N/A %d sessions closed.
%d sessions skipped because already closed. N/A closed skipped N/A N/A