Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to auto-register GeoMesa File System DataStores #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jnh5y
Copy link
Member

@jnh5y jnh5y commented Dec 22, 2018

Signed-off-by: Jim Hughes [email protected]

Signed-off-by: Jim Hughes <[email protected]>

override def doFilter(servletRequest: ServletRequest, servletResponse: ServletResponse, filterChain: FilterChain): Unit = {
val request = new Request()
request.setHttpRequest(servletRequest.asInstanceOf[HttpServletRequest])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these 2 lines doing anything? seems like they could be removed


def shouldCreate(workspace: String): Boolean = {
val base = System.getProperty("GEOMESA_FSDS_BASE_DIRECTORY")
if(base == null || Seq("styles", "web", "index.html", "openlayers3").contains(workspace)) return false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be safer to make these configurable in the spring bean, so that they can be configured. what are the typical url patterns you're matching here?

dsi.setEnabled(true)
dsi.setName(directory)

val factory = new FileSystemDataStoreFactory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if you're not using the FSDS? is this going to break all other datastores?

val wsi = dti.getWorkspace

ds.getNames.foreach { name =>
val fs = ds.getFeatureSource(name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this should check to see if the layers are already registered?

@@ -445,6 +445,12 @@
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.specs2</groupId>
<artifactId>specs2_2.11</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any chance for some unit tests?

@elahrvivaz elahrvivaz changed the base branch from master to main June 16, 2020 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants