hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabiano D. Beppler" <...@knewin.com>
Subject Re: Unit test (junit) very slow
Date Sat, 19 Feb 2011 18:09:15 GMT
Thanks a lot J-D
I changed the dns settings and it worked properly, although the test still
takes more than 19 seconds.
http://goo.gl/jA0oN

On Fri, Feb 18, 2011 at 3:58 PM, Jean-Daniel Cryans <jdcryans@apache.org>wrote:

> There's probably (and I'm 99% sure) a DNS timeout happening when
> resolving your machine's hostname. Review your DNS settings.
>
> J-D
>
> On Fri, Feb 18, 2011 at 10:53 AM, Fabiano D. Beppler <fdb@knewin.com>
> wrote:
> > Hi,
> >
> > I am running a very simple JUnit test with HBase and the test takes a lot
> of
> > time to run when the computer is online (ie., connected to a wifi
> network).
> > When the computer is offline it runs a lot faster.
> >
> > Online it takes more than 169 seconds to run
> > Offline it takes "only" 19 seconds to run
> >
> > What is more interesting is that when the computer is online there isn't
> > other computers in the network, just a WIFI connection.
> > My computer is a MacBook Pro with Snow Leopard, HBase 0.20.6.
> >
> > As you can see, the test is using the HBaseTestingUtility class. The
> > "problem" occurs when running line 7.
> >
> > Is there anything I can do to avoid waiting so much time to run my JUnit
> > tests?
> >
> > 1    @Test
> > 2   public void test1() throws Exception {
> > 3        System.setProperty("test.build.data", "test_files/hbase/");
> > 4
> > 5        final HBaseTestingUtility hbaseUtility = new
> HBaseTestingUtility();
> > 6        final HBaseConfiguration configuration =
> > hbaseUtility.getConfiguration();
> > 7        hbaseUtility.startMiniCluster(); // "PROBLEM" HAPPENS WHEN
> STARTING
> > THE CLUSTER
> > 8        final HTable table =
> > hbaseUtility.createTable(Bytes.toBytes("my_table"),
> > 9                new byte[][] { Bytes.toBytes("my_family_1"),
> > Bytes.toBytes("my_family_2") });
> > 10       final HTable recTable = new HTable(configuration, "my_table");
> > 11       Assert.assertEquals("my_table",
> > Bytes.toString(recTable.getTableName()));
> > 12       hbaseUtility.shutdownMiniCluster();
> > 13    }
> >
> > Thanks in advance.
> > Fabiano
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message