This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the intial write path of indexing require less I/O.
- Loading branch information
Michael Russo
committed
Apr 13, 2016
1 parent
a462244
commit 10ff27c
Showing
4 changed files
with
200 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...e/src/main/java/org/apache/usergrid/corepersistence/asyncevents/model/EdgeIndexEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,70 @@ | |||
/* | |||
* 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.usergrid.corepersistence.asyncevents.model; | |||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import org.apache.usergrid.persistence.core.scope.ApplicationScope; | |||
import org.apache.usergrid.persistence.graph.Edge; | |||
import org.apache.usergrid.persistence.model.entity.Id; | |||
|
|||
|
|||
public final class EdgeIndexEvent | |||
extends AsyncEvent { | |||
|
|||
|
|||
@JsonProperty | |||
protected ApplicationScope applicationScope; | |||
|
|||
@JsonProperty | |||
protected Id entityId; | |||
|
|||
@JsonProperty | |||
protected Edge edge; | |||
|
|||
/** | |||
* Needed by jackson | |||
*/ | |||
public EdgeIndexEvent() { | |||
super(); | |||
} | |||
|
|||
public EdgeIndexEvent(String sourceRegion, ApplicationScope applicationScope, Id entityId, Edge edge) { | |||
super(sourceRegion); | |||
this.applicationScope = applicationScope; | |||
this.entityId = entityId; | |||
this.edge = edge; | |||
} | |||
|
|||
|
|||
public ApplicationScope getApplicationScope() { | |||
return applicationScope; | |||
} | |||
|
|||
|
|||
public Edge getEdge() { | |||
return edge; | |||
} | |||
|
|||
|
|||
public Id getEntityId() { | |||
return entityId; | |||
} | |||
} |
54 changes: 54 additions & 0 deletions
54
...src/main/java/org/apache/usergrid/corepersistence/asyncevents/model/EntityIndexEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,54 @@ | |||
/* | |||
* 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.usergrid.corepersistence.asyncevents.model; | |||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import org.apache.usergrid.persistence.collection.serialization.impl.migration.EntityIdScope; | |||
|
|||
|
|||
public final class EntityIndexEvent extends AsyncEvent { | |||
|
|||
|
|||
@JsonProperty | |||
protected EntityIdScope entityIdScope; | |||
|
|||
@JsonProperty | |||
private long updatedAfter; | |||
|
|||
public EntityIndexEvent() { | |||
super(); | |||
} | |||
|
|||
public EntityIndexEvent(String sourceRegion, EntityIdScope entityIdScope, final long updatedAfter ) { | |||
super(sourceRegion); | |||
this.entityIdScope = entityIdScope; | |||
this.updatedAfter = updatedAfter; | |||
} | |||
|
|||
|
|||
public long getUpdatedAfter() { | |||
return updatedAfter; | |||
} | |||
|
|||
|
|||
public EntityIdScope getEntityIdScope() { | |||
return entityIdScope; | |||
} | |||
} |