Hi Andrey,

thanks for your reply, I found them very inspiring.

I'm curious about the scheme you described: It looks to me you've sharded
your data into separate regions, are you fixing the number of these regions?

If yes, each of the growing region will spawn lots of compactions while
writing data, how to deal with the compaction storm?

If no, are you only appending data to the last region? This approach is
appealing since it separates realtime data from all of the other historical
data. But will it lead the last region to be a hotspot, and will the region
splitting be an issue?

thanks
hongbin

On Sat, Feb 14, 2015 at 2:01 AM, Andrey Stepachev <oct...@gmail.com> wrote:

> Hi Jaime.
>
> That a bit of magic to use HFiles directly without considering
> keys and data layout (as mentioned by Nick you will face
> with a task of manually splitting keys, so effectively you will
> do what hbase already does effectively).
>
> Original answer was for concrete usecase: it is known where
> keys goes (to the last region).
>
> In my case table was manually splittable  so we always
> knew where data will go, so at once each writer writes
> only data only into one of active regions. Data was presplittted
> by kafka, so we have no need to split data once more by
> hbase.
>
> But again, that was very specific situation, and I'd recommend
> to stick with puts until you fully understand your model
> and find out that you can use bulk load for it
>
>
>
> On Fri, Feb 13, 2015 at 5:46 PM, Nick Dimiduk <ndimi...@gmail.com> wrote:
>
> > Writing HFiles can become cumbersome if the data is spread evenly across
> > regions -- you'll end up with lots of small files rather than a few big
> > ones.
> >
> > You can batch writes through the client API. I would recommend you start
> > with HTableInterface$put(List<Put>). You can tune the client-side buffer
> > (#setWriteBufferSize(long) or hbase.client.write.buffer), which defaults
> to
> > 2mb. Be careful with your RPC timeouts. As you increase this size, you
> may
> > need to tweak them as well.
> >
> > Also be sure you've tuned your memstores appropriately. Make sure you're
> > getting nice 128mb flushes. Do this by managing the write-active region
> > count on each machine.
> >
> > On Fri, Feb 13, 2015 at 8:37 AM, Jaime Solano <jdjsol...@gmail.com>
> wrote:
> >
> > > Hi Andrey,
> > >
> > > We're facing a similar situation, where we plan to load a lot of data
> > into
> > > HBase direclty. We considered writing the Hfiles without MapReduce. Is
> > this
> > > something you've done in the past? Are there any sample codes we could
> > use
> > > as guide? On another side, what would you consider "big enough" to
> switch
> > > from regular Puts to HFiles-writing?
> > >
> > > Thanks!
> > >
> > > On Fri Feb 13 2015 at 10:58:28 Andrey Stepachev <oct...@gmail.com>
> > wrote:
> > >
> > > > Hi hongbin,
> > > >
> > > > It seems that depend on how many data you ingest.
> > > > In case of big enough I'd look at creating HFiles
> > > > directly without mapreduce (for example using
> > > > HFileOutputFormat without mapreduce or using
> > > > HFileWriter directly).
> > > > Created files can be imported by LoadIncrementalHFiles#doBulkLoad
> > > > directly into hbase. And need to be sure that your
> > > > regions will not split too fast, bulk load can load only
> > > > hfiles which contain keyvalues from one or two adjust
> > > > regions. (better if splits are disabled and did externally)
> > > >
> > > > But you need to be sure that you actually need
> > > > to do such micromanagement and not just stick
> > > > with regular Puts. HBase can sustain quite good
> > > > amount of input data to start worry about.
> > > >
> > > > Cheers.
> > > >
> > > > On Fri, Feb 13, 2015 at 6:20 AM, hongbin ma <mahong...@apache.org>
> > > wrote:
> > > >
> > > > > hi,
> > > > >
> > > > > I'm trying to use a htable to store data that comes in a streaming
> > > > fashion.
> > > > > The streaming in data is guaranteed to have a larger KEY than ANY
> > > > existing
> > > > > keys in the table.
> > > > > And the data will be READONLY.
> > > > >
> > > > > The data is streaming in at a very high rate, I don't want to
> issue a
> > > PUT
> > > > > operation for each data entry, because obviously it is poor in
> > > > performance.
> > > > > I'm thinking about pooling the data entries and flush them to hbase
> > > every
> > > > > five minutes, and I AFAIK there're few options:
> > > > >
> > > > > 1.  Pool the data entries, and every 5 minute run a MR job to
> convert
> > > the
> > > > > data to hfile format. This approach could avoid the overhead of
> > single
> > > > PUT,
> > > > > but I'm afraid the MR job might be too costly( waiting in the job
> > > queue)
> > > > to
> > > > > keep in pace.
> > > > >
> > > > > 2. Use HtableInterface.put(List<Put>) the batched version should be
> > > > faster,
> > > > > but I'm not quite sure how much.
> > > > >
> > > > > 3.?
> > > > >
> > > > > can anyone give me some advice on this?
> > > > > thanks!
> > > > >
> > > > > hongbin
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Andrey.
> > > >
> > >
> >
>
>
>
> --
> Andrey.
>

Reply via email to