hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jo sung jun (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HBASE-3453) How about RowPaginationFilter
Date Thu, 20 Jan 2011 04:17:44 GMT

     [ https://issues.apache.org/jira/browse/HBASE-3453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

jo sung jun updated HBASE-3453:
-------------------------------

    Description: 
Hello.
I know hbase has already PageFilter.
But, sometime we need to get row data from specified position.

------------------------
<code>
/**
	 * Constructor that takes a maximum page size.
	 * 
	 * get row from offset to offset+limit ( offset<= row<=offset+limit )
	 * @param offset start position
	 * @param limit count from offset position
	 */
	public RowPaginationFilter(final int offset, final int limit) {
		this.offset = offset;
		this.limit = limit;
	}

	//true to exclude row, false to include row.
	@Override
	public boolean filterRow() {		
		boolean isExclude = this.rowsAccepted < this.offset || this.rowsAccepted>=this.limit+this.offset;
		rowsAccepted++;
		return isExclude;
	}
</code>
-----------------

  was:
Hello.
I know hbase has already PageFilter.
But, sometime we need to get row data from specified position.

------------------------
/**
	 * Constructor that takes a maximum page size.
	 * 
	 * get row from offset to offset+limit ( offset<= row<=offset+limit )
	 * @param offset start position
	 * @param limit count from offset position
	 */
	public RowPaginationFilter(final int offset, final int limit) {
		this.offset = offset;
		this.limit = limit;
	}

	//true to exclude row, false to include row.
	@Override
	public boolean filterRow() {		
		boolean isExclude = this.rowsAccepted < this.offset || this.rowsAccepted>=this.limit+this.offset;
		rowsAccepted++;
		return isExclude;
	}
-----------------


> How about RowPaginationFilter
> -----------------------------
>
>                 Key: HBASE-3453
>                 URL: https://issues.apache.org/jira/browse/HBASE-3453
>             Project: HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.6
>         Environment: windows 7
>            Reporter: jo sung jun
>             Fix For: 0.20.6
>
>         Attachments: RowPaginationFilter.java
>
>
> Hello.
> I know hbase has already PageFilter.
> But, sometime we need to get row data from specified position.
> ------------------------
> <code>
> /**
> 	 * Constructor that takes a maximum page size.
> 	 * 
> 	 * get row from offset to offset+limit ( offset<= row<=offset+limit )
> 	 * @param offset start position
> 	 * @param limit count from offset position
> 	 */
> 	public RowPaginationFilter(final int offset, final int limit) {
> 		this.offset = offset;
> 		this.limit = limit;
> 	}
> 	//true to exclude row, false to include row.
> 	@Override
> 	public boolean filterRow() {		
> 		boolean isExclude = this.rowsAccepted < this.offset || this.rowsAccepted>=this.limit+this.offset;
> 		rowsAccepted++;
> 		return isExclude;
> 	}
> </code>
> -----------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message