PREHOOK: query: -- protect mode: syntax to change protect mode works and queries are not blocked if a table or partition is not in protect mode drop table tbl_protectmode_tbl4 PREHOOK: type: DROPTABLE POSTHOOK: query: -- protect mode: syntax to change protect mode works and queries are not blocked if a table or partition is not in protect mode drop table tbl_protectmode_tbl4 POSTHOOK: type: DROPTABLE PREHOOK: query: drop table tbl_protectmode_tbl4_src PREHOOK: type: DROPTABLE POSTHOOK: query: drop table tbl_protectmode_tbl4_src POSTHOOK: type: DROPTABLE PREHOOK: query: create table tbl_protectmode_tbl4_src (col string) PREHOOK: type: CREATETABLE POSTHOOK: query: create table tbl_protectmode_tbl4_src (col string) POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@tbl_protectmode_tbl4_src PREHOOK: query: create table tbl_protectmode_tbl4 (col string) partitioned by (p string) PREHOOK: type: CREATETABLE POSTHOOK: query: create table tbl_protectmode_tbl4 (col string) partitioned by (p string) POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@tbl_protectmode_tbl4 PREHOOK: query: alter table tbl_protectmode_tbl4 add partition (p='p1') PREHOOK: type: ALTERTABLE_ADDPARTS PREHOOK: Input: default@tbl_protectmode_tbl4 POSTHOOK: query: alter table tbl_protectmode_tbl4 add partition (p='p1') POSTHOOK: type: ALTERTABLE_ADDPARTS POSTHOOK: Input: default@tbl_protectmode_tbl4 POSTHOOK: Output: default@tbl_protectmode_tbl4@p=p1 PREHOOK: query: alter table tbl_protectmode_tbl4 enable no_drop PREHOOK: type: ALTERTABLE_PROTECTMODE PREHOOK: Input: default@tbl_protectmode_tbl4 PREHOOK: Output: default@tbl_protectmode_tbl4 POSTHOOK: query: alter table tbl_protectmode_tbl4 enable no_drop POSTHOOK: type: ALTERTABLE_PROTECTMODE POSTHOOK: Input: default@tbl_protectmode_tbl4 POSTHOOK: Output: default@tbl_protectmode_tbl4 PREHOOK: query: alter table tbl_protectmode_tbl4 enable offline PREHOOK: type: ALTERTABLE_PROTECTMODE PREHOOK: Input: default@tbl_protectmode_tbl4 PREHOOK: Output: default@tbl_protectmode_tbl4 POSTHOOK: query: alter table tbl_protectmode_tbl4 enable offline POSTHOOK: type: ALTERTABLE_PROTECTMODE POSTHOOK: Input: default@tbl_protectmode_tbl4 POSTHOOK: Output: default@tbl_protectmode_tbl4 PREHOOK: query: alter table tbl_protectmode_tbl4 disable no_drop PREHOOK: type: ALTERTABLE_PROTECTMODE PREHOOK: Input: default@tbl_protectmode_tbl4 PREHOOK: Output: default@tbl_protectmode_tbl4 POSTHOOK: query: alter table tbl_protectmode_tbl4 disable no_drop POSTHOOK: type: ALTERTABLE_PROTECTMODE POSTHOOK: Input: default@tbl_protectmode_tbl4 POSTHOOK: Output: default@tbl_protectmode_tbl4 PREHOOK: query: desc extended tbl_protectmode_tbl4 PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended tbl_protectmode_tbl4 POSTHOOK: type: DESCTABLE col string p string Detailed Table Information Table(tableName:tbl_protectmode_tbl4, dbName:default, owner:thiruvel, createTime:1286826591, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:col, type:string, comment:null), FieldSchema(name:p, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/tbl_protectmode_tbl4, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:p, type:string, comment:null)], parameters:{last_modified_by=thiruvel, last_modified_time=1286826591, PROTECT_MODE=OFFLINE, transient_lastDdlTime=1286826591}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) FAILED: Error in semantic analysis: Query against an offline table or partition Table tbl_protectmode_tbl4