Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
d435984e
Unverified
Commit
d435984e
authored
Feb 02, 2024
by
ZackYoung
Committed by
GitHub
Feb 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BugFix] fix resources (#3129)
Co-authored-by:
zackyoungh
<
zackyoungh@users.noreply.github.com
>
parent
69969f4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
ResourceFileSystemFactory.java
...rc/main/java/org/dinky/url/ResourceFileSystemFactory.java
+10
-0
No files found.
dinky-client/dinky-client-base/src/main/java/org/dinky/url/ResourceFileSystemFactory.java
View file @
d435984e
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
package
org
.
dinky
.
url
;
package
org
.
dinky
.
url
;
import
org.dinky.data.model.SystemConfiguration
;
import
org.apache.flink.core.fs.FileSystem
;
import
org.apache.flink.core.fs.FileSystem
;
import
org.apache.flink.core.fs.FileSystemFactory
;
import
org.apache.flink.core.fs.FileSystemFactory
;
...
@@ -27,7 +29,10 @@ import java.net.URI;
...
@@ -27,7 +29,10 @@ import java.net.URI;
import
com.google.auto.service.AutoService
;
import
com.google.auto.service.AutoService
;
import
lombok.extern.slf4j.Slf4j
;
@AutoService
(
FileSystemFactory
.
class
)
@AutoService
(
FileSystemFactory
.
class
)
@Slf4j
public
class
ResourceFileSystemFactory
implements
FileSystemFactory
{
public
class
ResourceFileSystemFactory
implements
FileSystemFactory
{
@Override
@Override
public
String
getScheme
()
{
public
String
getScheme
()
{
...
@@ -36,6 +41,11 @@ public class ResourceFileSystemFactory implements FileSystemFactory {
...
@@ -36,6 +41,11 @@ public class ResourceFileSystemFactory implements FileSystemFactory {
@Override
@Override
public
FileSystem
create
(
URI
fsUri
)
throws
IOException
{
public
FileSystem
create
(
URI
fsUri
)
throws
IOException
{
Boolean
enable
=
SystemConfiguration
.
getInstances
().
getResourcesEnable
().
getValue
();
if
(
enable
==
null
||
!
enable
)
{
log
.
warn
(
"rs protocol startup failed, not initialized"
);
return
null
;
}
return
ResourceFileSystem
.
getSharedInstance
();
return
ResourceFileSystem
.
getSharedInstance
();
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment