Thanks Jonathan,

Before I file the bug, I'll post here in case it's me being stupid and not
worthy of a Jira. I simplified my test and there are some log entries that
may or may not be misleading. Note at the end of the log the test folder
can't be deleted. I've included the base test class; the real test extends
this and adds a simple noop @Test. hbase-site-test is a copy of the one
yanked from the test jar, with the zookeeper port set to 21810 to match
the hardcoded value.

Mark


-----Original Message-----
From: Jonathan Gray [mailto:[email protected]] 
Sent: Thursday, January 20, 2011 4:57 PM
To: [email protected]
Subject: RE: hbase 0.20.6 - HBaseClusterTestCase, DU, cygwin, IntelliJ -
arg!

Sounds like a bug.  Want to file a JIRA with as much detail as you can
including log snippets?

> -----Original Message-----
> From: Mark Laffoon [mailto:[email protected]]
> Sent: Thursday, January 20, 2011 2:43 PM
> To: [email protected]
> Subject: RE: hbase 0.20.6 - HBaseClusterTestCase, DU, cygwin, IntelliJ -
arg!
> 
> Follow up on this, hopefully Jonathan and/or Stack are still watching
;)
> 
> I switched to HBaseTestingUtility (we had a class which was doing
more-or-
> less the same thing with HBaseClusterTestCase). I dealt with my IDE
issues by
> jamming cygwin/bin into my Windows PATH <sigh>. However, we still can't
> run multiple test suites using command-line maven. When the test suite
> finishes running and calls HTU.shutdownMiniCluster, it logs a warning
that it
> can't delete the temporary data folder. Looking in the folder, the
zookeeper
> subfolder is being left around. This implies that there is a zookeeper
process
> that isn't letting go. When the next test suite tries to run, it bumps
into port
> issues with the previous process.
> Or something.
> 
> Anybody out there doing anything like this?
> 
> Is my only solution to run *all* my persist tests in one giant test
suite?
> I really hope not.'
> 
> Thanks,
> Mark
> 
> 
> -----Original Message-----
> From: Jonathan Gray [mailto:[email protected]]
> Sent: Tuesday, January 18, 2011 7:56 PM
> To: [email protected]
> Subject: RE: hbase 0.20.6 - HBaseClusterTestCase, DU, cygwin, IntelliJ -
arg!
> 
> Hey Mark.  Sorry to hear about your troubles.
> 
> There is a new testing facility that has replaced HBaseClusterTestCase.
> Check out HBaseTestingUtility.  It's JUnit4 based.  One sample usage of
it is
> the test TestFromClientSide.
> 
> This new one includes support for multiple DataNodes, RegionServers, and
> Masters.  Hopefully that will work better for you.
> 
> As far as working in your IDE, du is part of Cygwin.  So if it's saying
not found,
> something in your environment (like your path) is not configured
properly for
> Cygwin and is not finding du.
> 
> Hope that helps.
> 
> JG
> 
> > -----Original Message-----
> > From: Mark Laffoon [mailto:[email protected]]
> > Sent: Tuesday, January 18, 2011 2:57 PM
> > To: [email protected]
> > Subject: hbase 0.20.6 - HBaseClusterTestCase, DU, cygwin, IntelliJ -
> arg!
> >
> > Sorry about the goofy subject but this is driving me nuts. Any answers
> to any
> > of these questions would be greatly appreciated (well, except a
> > generic "yes").
> >
> >
> >
> > My goal is to be able to run a sequence of unit tests (well,
> > integration
> tests
> > really) on our persistence stack. We're using HBaseClusterTestCase.
> > We have about 25 sets of 20-40 tests that we want to run. Each set
> > needs
> to
> > stand up a fresh, independent store. We're using maven to do our
builds.
> >
> > 1.      In our build machine environment (Ubuntu, Anthill) and my
build
> > environment (Windows, cygwin), it doesn't work because the test cases
> > don't tear down properly, and the test folders stick around, messing
> > up
> the
> > subsequent tests.
> >
> > 2.      In my IDE (IntelliJ on Windows using IDE's internal maven),
the
> > tests don't work because MiniDFSCluster eventually calls "du" which
> doesn't
> > exist.
> >
> > 3.      Anybody have sample code for setting up a simulated data node?
> Is
> > there such thing as a simulated persistence for zookeeper? (Our test
> data
> > isn't very large so this would be fine)
> >
> >
> >
> > One final question that may at least help my blood pressure: has hbase
> unit
> > testing improved at all in version 0.90?
> >
> >
> >
> > Thanks,
> >
> > Mark

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 * Copyright 2007 The Apache Software Foundation
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<!-- test settings -->
<configuration>
    <property>
        <name>hbase.regionserver.msginterval</name>
        <value>1000</value>
        <description>Interval between messages from the RegionServer to HMaster
            in milliseconds. Default is 15. Set this value low if you want unit
            tests to be responsive.
        </description>
    </property>
    <property>
        <name>hbase.client.pause</name>
        <value>5000</value>
        <description>General client pause value. Used mostly as value to wait
            before running a retry of a failed get, region lookup, etc.
        </description>
    </property>
    <property>
        <name>hbase.client.retries.number</name>
        <value>4</value>
        <description>Maximum retries. Used as maximum for all retryable
            operations such as fetching of the root region from root region
            server, getting a cell's value, starting a row update, etc.
            Default: 10.
        </description>
    </property>
    <property>
        <name>hbase.server.thread.wakefrequency</name>
        <value>1000</value>
        <description>Time to sleep in between searches for work (in milliseconds).
            Used as sleep interval by service threads such as META scanner and log roller.
        </description>
    </property>
    <property>
        <name>hbase.regionserver.handler.count</name>
        <value>5</value>
        <description>Count of RPC Server instances spun up on RegionServers
            Same property is used by the HMaster for count of master handlers.
            Default is 10.
        </description>
    </property>
    <property>
        <name>hbase.master.info.port</name>
        <value>-1</value>
        <description>The port for the hbase master web UI
            Set to -1 if you do not want the info server to run.
        </description>
    </property>
    <property>
        <name>hbase.regionserver.info.port</name>
        <value>-1</value>
        <description>The port for the hbase regionserver web UI
            Set to -1 if you do not want the info server to run.
        </description>
    </property>
    <property>
        <name>hbase.regionserver.info.port.auto</name>
        <value>true</value>
        <description>Info server auto port bind. Enables automatic port
            search if hbase.regionserver.info.port is already in use.
            Enabled for testing to run multiple tests on one machine.
        </description>
    </property>
    <property>
        <name>hbase.master.lease.thread.wakefrequency</name>
        <value>3000</value>
        <description>The interval between checks for expired region server leases.
            This value has been reduced due to the other reduced values above so that
            the master will notice a dead region server sooner. The default is 15 seconds.
        </description>
    </property>
    <property>
        <name>hbase.regionserver.optionalcacheflushinterval</name>
        <value>10000</value>
        <description>
            Amount of time to wait since the last time a region was flushed before
            invoking an optional cache flush. Default 60,000.
        </description>
    </property>
    <property>
        <name>hbase.regionserver.safemode</name>
        <value>false</value>
        <description>Turn on/off safe mode in region server.
            Always on for production, always off for tests.
        </description>
    </property>
    <property>
        <name>hbase.hregion.max.filesize</name>
        <value>67108864</value>
        <description>
            Maximum desired file size for an HRegion. If filesize exceeds
            value + (value / 2), the HRegion is split in two. Default: 256M.
            Keep the maximum filesize small so we split more often in tests.
        </description>
    </property>
    <property>
        <name>hadoop.log.dir</name>
        <value>${user.dir}/../logs</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>21810</value>
        <description>The port at which the clients will connect.
            Match hard-coded value in MiniZooKeeperCluster.
        </description>
    </property>
</configuration>

Reply via email to