#NEWLINE# def table_location( self , table , database = 'default' , partition = None ) : #NEWLINE# #INDENT# cmd = 'use {0}; describe formatted {1}' . format ( database , table ) #NEWLINE# if ( partition is not None ) : #NEWLINE# #INDENT# cmd += ' PARTITION ({0})' . format ( self . partition_spec ( partition ) ) #NEWLINE# #UNINDENT# stdout = run_hive_cmd ( cmd ) #NEWLINE# for line in stdout . split ( '\n' ) : #NEWLINE# #INDENT# if ( 'Location:' in line ) : #NEWLINE# #INDENT# return line . split ( '\t' ) [ 1 ]