restructure the directory and different hive version support