[GitHub] incubator-omid pull request #16: [OMID-78] Identify transaction snapshot at ...
Github user ohadshacham commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/16#discussion_r150795077 --- Diff: hbase-coprocessor/src/main/java/org/apache/hadoop/hbase/regionserver/RegionAccessWrapper.java --- @@ -0,0 +1,58 @@ +/* + * 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. + */ +package org.apache.hadoop.hbase.regionserver; + +import java.io.IOException; +import java.util.List; + +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.HTableInterface; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; +import org.apache.omid.transaction.TableAccessWrapper; + +public class RegionAccessWrapper implements TableAccessWrapper { --- End diff -- done ---
[GitHub] incubator-omid pull request #16: [OMID-78] Identify transaction snapshot at ...
Github user ohadshacham commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/16#discussion_r150794291 --- Diff: hbase-coprocessor/src/main/java/org/apache/hadoop/hbase/regionserver/OmidRegionScanner.java --- @@ -0,0 +1,128 @@ +/* + * 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. + */ +package org.apache.hadoop.hbase.regionserver; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.hadoop.hbase.Cell; +import org.apache.hadoop.hbase.HRegionInfo; +import org.apache.hadoop.hbase.regionserver.RegionScanner; +import org.apache.hadoop.hbase.regionserver.ScannerContext; +import org.apache.omid.transaction.HBaseTransaction; +import org.apache.omid.transaction.SnapshotFilter; + +public class OmidRegionScanner implements RegionScanner { + +RegionScanner scanner; +SnapshotFilter snapshotFilter; +HBaseTransaction transaction; +int maxVersions; +MapfamilyDeletionCache; + +public OmidRegionScanner(SnapshotFilter snapshotFilter, + RegionScanner s, + HBaseTransaction transaction, + int maxVersions) { +this.snapshotFilter = snapshotFilter; +this.scanner = s; +this.transaction = transaction; +this.maxVersions = maxVersions; +this.familyDeletionCache = new HashMap (); +} + +@Override +public boolean next(List results) throws IOException { + return next(results, Integer.MAX_VALUE); +} + +public boolean next(List result, int limit) throws IOException { --- End diff -- The function is defined in RegionScanner interface, we are just override it. ---
[GitHub] incubator-omid pull request #16: [OMID-78] Identify transaction snapshot at ...
Github user ohadshacham commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/16#discussion_r150794375 --- Diff: hbase-client/src/main/java/org/apache/omid/transaction/HTableAccessWrapper.java --- @@ -0,0 +1,53 @@ +/* + * 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. + */ +package org.apache.omid.transaction; + +import java.io.IOException; +import java.util.List; + +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.HTableInterface; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; + +public class HTableAccessWrapper implements TableAccessWrapper { --- End diff -- RegionAccessWrapper ---
[GitHub] incubator-omid pull request #16: [OMID-78] Identify transaction snapshot at ...
Github user ohadshacham commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/16#discussion_r150794314 --- Diff: hbase-coprocessor/src/main/java/org/apache/hadoop/hbase/regionserver/OmidRegionScanner.java --- @@ -0,0 +1,128 @@ +/* + * 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. + */ +package org.apache.hadoop.hbase.regionserver; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.hadoop.hbase.Cell; +import org.apache.hadoop.hbase.HRegionInfo; +import org.apache.hadoop.hbase.regionserver.RegionScanner; +import org.apache.hadoop.hbase.regionserver.ScannerContext; +import org.apache.omid.transaction.HBaseTransaction; +import org.apache.omid.transaction.SnapshotFilter; + +public class OmidRegionScanner implements RegionScanner { + +RegionScanner scanner; +SnapshotFilter snapshotFilter; +HBaseTransaction transaction; +int maxVersions; +MapfamilyDeletionCache; + +public OmidRegionScanner(SnapshotFilter snapshotFilter, + RegionScanner s, + HBaseTransaction transaction, + int maxVersions) { +this.snapshotFilter = snapshotFilter; +this.scanner = s; +this.transaction = transaction; +this.maxVersions = maxVersions; +this.familyDeletionCache = new HashMap (); +} + +@Override +public boolean next(List results) throws IOException { + return next(results, Integer.MAX_VALUE); +} + +public boolean next(List result, int limit) throws IOException { +return nextRaw(result, limit); +} + +@Override +public void close() throws IOException { +scanner.close(); +} + +@Override +public HRegionInfo getRegionInfo() { +return scanner.getRegionInfo(); +} + +@Override +public boolean isFilterDone() throws IOException { +return scanner.isFilterDone(); +} + +@Override +public boolean reseek(byte[] row) throws IOException { +throw new RuntimeException("Not implemented"); +} + +@Override +public long getMaxResultSize() { +return scanner.getMaxResultSize(); +} + +@Override +public long getMvccReadPoint() { +return scanner.getMvccReadPoint(); +} + +@Override +public boolean nextRaw(List result) throws IOException { --- End diff -- The function is defined in RegionScanner interface, we are just override it. ---
[jira] [Commented] (OMID-78) Identify transaction snapshot at the server
[ https://issues.apache.org/jira/browse/OMID-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251218#comment-16251218 ] ASF GitHub Bot commented on OMID-78: Github user ohadshacham commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/16#discussion_r150795933 --- Diff: hbase-client/src/main/java/org/apache/omid/transaction/HTableAccessWrapper.java --- @@ -0,0 +1,53 @@ +/* + * 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. + */ +package org.apache.omid.transaction; + +import java.io.IOException; +import java.util.List; + +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.HTableInterface; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; + +public class HTableAccessWrapper implements TableAccessWrapper { + +private final HTableInterface healerTable; --- End diff -- Done > Identify transaction snapshot at the server > --- > > Key: OMID-78 > URL: https://issues.apache.org/jira/browse/OMID-78 > Project: Apache Omid > Issue Type: New Feature >Reporter: Ohad Shacham >Assignee: Ohad Shacham > > To identify a transaction's snapshot in scans and gets, Omid reads and filter > cells at the client side. This filtering requires checking the shadow cells > and accessing the commit table if needed. > Doing the filtering at the server side should be more efficient since less > data is being transferred to the client and also, in some cases, RPCs are > being saved. > This feature requires implementing a coprocessor that will do the filtering > at the server side and returns only the relevant snapshot to the client side. > This feature is also needed to support the integration of Omid with Phoenix. > This is required since Phoenix has coprocessors that change and condence the > data returned to the client and therefore, filtering at the client side in > this case is impossible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OMID-78) Identify transaction snapshot at the server
[ https://issues.apache.org/jira/browse/OMID-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251209#comment-16251209 ] ASF GitHub Bot commented on OMID-78: Github user ohadshacham commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/16#discussion_r150795077 --- Diff: hbase-coprocessor/src/main/java/org/apache/hadoop/hbase/regionserver/RegionAccessWrapper.java --- @@ -0,0 +1,58 @@ +/* + * 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. + */ +package org.apache.hadoop.hbase.regionserver; + +import java.io.IOException; +import java.util.List; + +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.HTableInterface; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; +import org.apache.omid.transaction.TableAccessWrapper; + +public class RegionAccessWrapper implements TableAccessWrapper { --- End diff -- done > Identify transaction snapshot at the server > --- > > Key: OMID-78 > URL: https://issues.apache.org/jira/browse/OMID-78 > Project: Apache Omid > Issue Type: New Feature >Reporter: Ohad Shacham >Assignee: Ohad Shacham > > To identify a transaction's snapshot in scans and gets, Omid reads and filter > cells at the client side. This filtering requires checking the shadow cells > and accessing the commit table if needed. > Doing the filtering at the server side should be more efficient since less > data is being transferred to the client and also, in some cases, RPCs are > being saved. > This feature requires implementing a coprocessor that will do the filtering > at the server side and returns only the relevant snapshot to the client side. > This feature is also needed to support the integration of Omid with Phoenix. > This is required since Phoenix has coprocessors that change and condence the > data returned to the client and therefore, filtering at the client side in > this case is impossible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OMID-78) Identify transaction snapshot at the server
[ https://issues.apache.org/jira/browse/OMID-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251207#comment-16251207 ] ASF GitHub Bot commented on OMID-78: Github user ohadshacham commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/16#discussion_r150794375 --- Diff: hbase-client/src/main/java/org/apache/omid/transaction/HTableAccessWrapper.java --- @@ -0,0 +1,53 @@ +/* + * 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. + */ +package org.apache.omid.transaction; + +import java.io.IOException; +import java.util.List; + +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.HTableInterface; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; + +public class HTableAccessWrapper implements TableAccessWrapper { --- End diff -- RegionAccessWrapper > Identify transaction snapshot at the server > --- > > Key: OMID-78 > URL: https://issues.apache.org/jira/browse/OMID-78 > Project: Apache Omid > Issue Type: New Feature >Reporter: Ohad Shacham >Assignee: Ohad Shacham > > To identify a transaction's snapshot in scans and gets, Omid reads and filter > cells at the client side. This filtering requires checking the shadow cells > and accessing the commit table if needed. > Doing the filtering at the server side should be more efficient since less > data is being transferred to the client and also, in some cases, RPCs are > being saved. > This feature requires implementing a coprocessor that will do the filtering > at the server side and returns only the relevant snapshot to the client side. > This feature is also needed to support the integration of Omid with Phoenix. > This is required since Phoenix has coprocessors that change and condence the > data returned to the client and therefore, filtering at the client side in > this case is impossible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (OMID-78) Identify transaction snapshot at the server
[ https://issues.apache.org/jira/browse/OMID-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251205#comment-16251205 ] ASF GitHub Bot commented on OMID-78: Github user ohadshacham commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/16#discussion_r150794291 --- Diff: hbase-coprocessor/src/main/java/org/apache/hadoop/hbase/regionserver/OmidRegionScanner.java --- @@ -0,0 +1,128 @@ +/* + * 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. + */ +package org.apache.hadoop.hbase.regionserver; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.hadoop.hbase.Cell; +import org.apache.hadoop.hbase.HRegionInfo; +import org.apache.hadoop.hbase.regionserver.RegionScanner; +import org.apache.hadoop.hbase.regionserver.ScannerContext; +import org.apache.omid.transaction.HBaseTransaction; +import org.apache.omid.transaction.SnapshotFilter; + +public class OmidRegionScanner implements RegionScanner { + +RegionScanner scanner; +SnapshotFilter snapshotFilter; +HBaseTransaction transaction; +int maxVersions; +MapfamilyDeletionCache; + +public OmidRegionScanner(SnapshotFilter snapshotFilter, + RegionScanner s, + HBaseTransaction transaction, + int maxVersions) { +this.snapshotFilter = snapshotFilter; +this.scanner = s; +this.transaction = transaction; +this.maxVersions = maxVersions; +this.familyDeletionCache = new HashMap (); +} + +@Override +public boolean next(List results) throws IOException { + return next(results, Integer.MAX_VALUE); +} + +public boolean next(List result, int limit) throws IOException { --- End diff -- The function is defined in RegionScanner interface, we are just override it. > Identify transaction snapshot at the server > --- > > Key: OMID-78 > URL: https://issues.apache.org/jira/browse/OMID-78 > Project: Apache Omid > Issue Type: New Feature >Reporter: Ohad Shacham >Assignee: Ohad Shacham > > To identify a transaction's snapshot in scans and gets, Omid reads and filter > cells at the client side. This filtering requires checking the shadow cells > and accessing the commit table if needed. > Doing the filtering at the server side should be more efficient since less > data is being transferred to the client and also, in some cases, RPCs are > being saved. > This feature requires implementing a coprocessor that will do the filtering > at the server side and returns only the relevant snapshot to the client side. > This feature is also needed to support the integration of Omid with Phoenix. > This is required since Phoenix has coprocessors that change and condence the > data returned to the client and therefore, filtering at the client side in > this case is impossible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)