Exemplo n.º 1
0
    def _check_roundtrip(self, df):
        writer = DataFrameWriter(self.con, df)
        writer.write_csv()

        table = writer.delimited_table()
        df2 = table.execute()

        assert_frame_equal(df2, df)
Exemplo n.º 2
0
    def _check_roundtrip(self, df):
        writer = DataFrameWriter(self.con, df)
        writer.write_csv()

        table = writer.delimited_table()
        df2 = table.execute()

        assert_frame_equal(df2, df)
Exemplo n.º 3
0
    def test_writer_cleanup_deletes_hdfs_dir(self):
        writer = DataFrameWriter(self.con, self.alltypes)
        writer.write_csv()

        path = writer.csv_dir
        assert self.con.hdfs.exists(path)

        writer.cleanup()
        assert not self.con.hdfs.exists(path)

        # noop
        writer.cleanup()
        assert not self.con.hdfs.exists(path)
Exemplo n.º 4
0
    def test_writer_cleanup_deletes_hdfs_dir(self):
        writer = DataFrameWriter(self.con, self.alltypes)
        writer.write_csv()

        path = writer.csv_dir
        assert self.con.hdfs.exists(path)

        writer.cleanup()
        assert not self.con.hdfs.exists(path)

        # noop
        writer.cleanup()
        assert not self.con.hdfs.exists(path)