package tachyon.hadoop;

import java.io.IOException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.server.common.HdfsConstants.StartupOption;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import tachyon.LocalTachyonCluster;
import tachyon.client.TachyonFS;

/**
 * Unit tests for <code>tachyon.hadoop.HadoopCompatibleFS</code>.
 */
public class HadoopCompatibleFSTest {
  private LocalTachyonCluster mLocalTachyonCluster = null;
  private TachyonFS mTfs = null;

  private MiniDFSCluster mDfsCluster = null;
  private DistributedFileSystem mDfs = null;

  @Before
  public final void before() throws IOException {
    System.setProperty("tachyon.user.quota.unit.bytes", "1000");
    mLocalTachyonCluster = new LocalTachyonCluster(10000);
    mLocalTachyonCluster.start();
    mTfs = mLocalTachyonCluster.getClient();

    //    Configuration conf = new Configuration();
    //    System.setProperty("fs.default.name", "hdfs://localhost:54310");
    //    mDfsCluster = new MiniDFSCluster();
    //    FileSystem fs = mDfsCluster.getFileSystem();
    //    Assert.assertTrue("Not a HDFS: "+fs.getUri(), fs instanceof DistributedFileSystem);
    //    mDfs = (DistributedFileSystem) fs;
  }

  @After
  public final void after() throws Exception {
    mLocalTachyonCluster.stop();
    System.clearProperty("tachyon.user.quota.unit.bytes");
  }
}

@@ -47,16 +47,18 @@
 ption;%0A%0A
+//
 import o
@@ -90,24 +90,26 @@
 figuration;%0A
+//
 import org.a
@@ -128,32 +128,34 @@
 .fs.FileSystem;%0A
+//
 import org.apach
@@ -191,16 +191,18 @@
 System;%0A
+//
 import o
@@ -235,24 +235,26 @@
 DFSCluster;%0A
+//
 import org.a
@@ -687,16 +687,18 @@
  null;%0A%0A
+//
   privat
@@ -726,32 +726,34 @@
 Cluster = null;%0A
+//
   private Distri

comment hadoop client test temporarily.