private void setupFileSystem(FsType fsType, HiveConf conf) throws IOException {
    if (fsType == FsType.LOCAL) {
      fs = FileSystem.getLocal(conf);
    } else if (fsType == FsType.HDFS || fsType == FsType.ENCRYPTED_HDFS
        || fsType == FsType.ERASURE_CODED_HDFS) {
      int numDataNodes = 4;

      // Setup before getting dfs
      switch (fsType) {
      case ENCRYPTED_HDFS:
        // Set the security key provider so that the MiniDFS cluster is initialized
        // with encryption
        conf.set(SECURITY_KEY_PROVIDER_URI_NAME, getKeyProviderURI());
        conf.setInt("fs.trash.interval", 50);
        break;
      case ERASURE_CODED_HDFS:
        // We need more NameNodes for EC.
        // To fully exercise hdfs code paths we need 5 NameNodes for the RS-3-2-1024k policy.
        // With 6 NameNodes we can also run the RS-6-3-1024k policy.
        numDataNodes = 6;
        break;
      default:
        break;
      }

      dfs = shims.getMiniDfs(conf, numDataNodes, true, null);
      fs = dfs.getFileSystem();

      // Setup after getting dfs
      switch (fsType) {
      case ENCRYPTED_HDFS:
        // set up the java key provider for encrypted hdfs cluster
        hes = shims.createHdfsEncryptionShim(fs, conf);
        LOG.info("key provider is initialized");
        break;
      case ERASURE_CODED_HDFS:
        // The Erasure policy can't be set in a q_test_init script as QTestUtil runs that code in
        // a mode that disallows test-only CommandProcessors.
        // Set the default policy on the root of the file system here.
        HdfsErasureCodingShim erasureCodingShim = shims.createHdfsErasureCodingShim(fs, conf);
        erasureCodingShim.enableErasureCodingPolicy(DEFAULT_TEST_EC_POLICY);
        erasureCodingShim.setErasureCodingPolicy(new Path("hdfs:///"), DEFAULT_TEST_EC_POLICY);
        break;
      default:
        break;
      }
    } else {
      throw new IllegalArgumentException("Unknown or unhandled fsType [" + fsType + "]");
    }
  }
Should deleted test tables have their data purged.

@return true if data should be purged
itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestMiniClusters.java