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

Usability improvements when editing cells containing xml or json #47

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
53f7af5
Add support for custom types
Apr 18, 2013
51f29b3
Add simple logging
Apr 21, 2013
ee05a80
Increase version
Apr 21, 2013
52da3db
Fix column type guess issue
Apr 21, 2013
d3abc97
update documentation images
Apr 21, 2013
58ef5c0
Update README.md
Apr 21, 2013
f845908
add documentation image
Apr 21, 2013
2d25911
fix misstype
Apr 21, 2013
5e4b205
Improve performance
Apr 25, 2013
c15090b
Fix build issue with converters
Apr 28, 2013
4e002e3
Support background operations
May 8, 2013
55414be
add support for disabled tables
May 9, 2013
92f4f14
Add file: update.properties
May 16, 2013
113b7ce
Add automatic update
May 19, 2013
9b74b21
Update update.properties file
May 19, 2013
7171302
Update README.md
May 19, 2013
3423f6b
Fix paging issue after rows count is stopped
May 20, 2013
01d0611
Use key only filter in rows count
May 20, 2013
3573536
Fix NullPointerException in getting hrider version
May 21, 2013
b14af73
Fix preceding slash issue
May 22, 2013
c68246c
Fix table filter combobox disabled
Jun 4, 2013
12bf4ed
Update update.properties file
Jun 18, 2013
3d2c726
update.properties
Jun 18, 2013
013e184
Improve update process
Jun 18, 2013
fc9d3c5
Update README.md
Jun 18, 2013
d6ecbc3
New converter is not available on all tabs
Jun 23, 2013
4497130
Update update.properties
Jun 23, 2013
a51437d
Update update.properties
Jun 23, 2013
e071b32
Fix committing issue
Jun 23, 2013
8fb7651
Update README.md
Jun 23, 2013
9d0bfc0
Improve UI
Jun 26, 2013
1a20493
update.properties
Jul 1, 2013
ba6cc88
Allow opening multiple tabs for the same cluster
Jul 15, 2013
020f677
Usability improvements:
mhalverson Jul 15, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local.properties

target/
.idea/
config/
logs/
*.iml

# project specific
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ To get started, begin here:
3. If you have any problems read the [FAQ](https://github.com/NiceSystems/hrider/wiki/FAQ) first.

## News
### 23 June, 2013: Release 1.0.7.2 available
Issues fixed: [#45](https://github.com/NiceSystems/hrider/issues/45), [#46](https://github.com/NiceSystems/hrider/issues/46)

[Download for hbase 0.94.1 - with dependencies](http://bit.ly/14R3Pdv).

[Download for hbase 0.94.1 - without dependencies](http://bit.ly/1a3YF1A).
### 18 June, 2013: Release 1.0.7.1 available
Issues fixed: [#41](https://github.com/NiceSystems/hrider/issues/41), [#43](https://github.com/NiceSystems/hrider/issues/43), [#44](https://github.com/NiceSystems/hrider/issues/44)

[Download for hbase 0.94.1](http://bit.ly/11Iesdr).
### 19 May, 2013: Release 1.0.7.0 available
New features: [#38](https://github.com/NiceSystems/hrider/issues/38)

Issues fixed: [#36](https://github.com/NiceSystems/hrider/issues/36), [#39](https://github.com/NiceSystems/hrider/issues/39)

[Download for hbase 0.94.1](http://bit.ly/19PgWvd).
### 21 April, 2013: Release 1.0.6.0 available
New features: [#34](https://github.com/NiceSystems/hrider/issues/34), [#35](https://github.com/NiceSystems/hrider/issues/35)

Issues fixed: [#31](https://github.com/NiceSystems/hrider/issues/31)

[Download for hbase 0.94.1](http://bit.ly/15uOEbu).
### 02 April, 2013: Release 1.0.5.0 available
New features: [#28](https://github.com/NiceSystems/hrider/issues/28)

Expand Down
Binary file modified documentation/images/h-rider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/images/typeConverterDialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/images/welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<description>hbase viewer and editor</description>

<packaging>jar</packaging>
<version>1.0.5.0</version>
<version>1.0.7.2</version>

<repositories>
<repository>
<id>local</id>
<id>localrepository</id>
<url>file://${project.basedir}/repo</url>
</repository>
<repository>
Expand Down Expand Up @@ -91,6 +91,12 @@
<artifactId>forms_rt</artifactId>
<version>7.0.3</version>
</dependency>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<scope>compile</scope>
<version>1.6</version>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -128,8 +134,8 @@
<classpathPrefix>lib/</classpathPrefix>
</manifest>
<manifestEntries>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<hbaseVersion>${hbase.version}</hbaseVersion>
</manifestEntries>
</archive>
</configuration>
Expand Down
4 changes: 4 additions & 0 deletions repo/com/sun/tools/1.6/_maven.repositories
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Thu Apr 18 18:52:10 IDT 2013
tools-1.6.jar>=
tools-1.6.pom>=
Binary file added repo/com/sun/tools/1.6/tools-1.6.jar
Binary file not shown.
9 changes: 9 additions & 0 deletions repo/com/sun/tools/1.6/tools-1.6.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6</version>
<description>POM was created from install:install-file</description>
</project>
12 changes: 12 additions & 0 deletions repo/com/sun/tools/maven-metadata-local.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<versioning>
<release>1.6</release>
<versions>
<version>1.6</version>
</versions>
<lastUpdated>20130418155210</lastUpdated>
</versioning>
</metadata>
41 changes: 41 additions & 0 deletions src/main/java/hrider/actions/Action.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package hrider.actions;

/**
* Copyright (C) 2012 NICE Systems ltd.
* <p/>
* Licensed 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.
*
* @author Igor Cher
* @version %I%, %G%
* <p/>
* This class represents an executable delegate.
*/
public abstract class Action<R> {

/**
* Executes the action.
*
* @throws Exception Any error.
*/
public abstract R run() throws Exception;

/**
* The method is called when the error occurred.
*
* @param ex The error.
*/
@SuppressWarnings("NoopMethodInAbstractClass")
public void onError(Exception ex) {

}
}
150 changes: 150 additions & 0 deletions src/main/java/hrider/actions/RunnableAction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
package hrider.actions;

import hrider.io.Log;
import org.apache.commons.lang.time.StopWatch;

/**
* Copyright (C) 2012 NICE Systems ltd.
* <p/>
* Licensed 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.
*
* @author Igor Cher
* @version %I%, %G%
* <p/>
* This class represents a runnable action.
*/
public class RunnableAction<R> implements Runnable {

//region Constants
private final static Log logger = Log.getLogger(RunnableAction.class);
//endregion

//region Variables
private String name;
private Action<R> action;
private Thread thread;
private boolean isRunning;
private boolean interrupted;
private R result;
//endregion

//region Constructor
public RunnableAction(String name, Action<R> action) {
this.name = name;
this.action = action;
}
//endregion

//region Public Properties
public R getResult() {
return result;
}

public boolean isCompleted() {
return !isRunning && !interrupted;
}

public boolean isRunning() {
return isRunning;
}
//endregion

//region Public Methods
public static <R> RunnableAction<R> run(String name, Action<R> action) {
RunnableAction<R> runnableAction = new RunnableAction<R>(name, action);
runnableAction.start();

return runnableAction;
}

public static <R> R runAndWait(String name, Action<R> action, long timeout) {
RunnableAction<R> runnableAction = new RunnableAction<R>(name, action);
runnableAction.start();

runnableAction.waitOrAbort(timeout);
return runnableAction.result;
}

public void start() {
if (this.thread == null) {
this.thread = new Thread(this);
this.thread.setName(this.name);
this.thread.setDaemon(true);
this.thread.start();

this.isRunning = true;

logger.info("Action '%s' started.", this.name);
}
}

public void abort() {
if (this.isRunning) {
this.interrupted = true;

this.thread.interrupt();
this.thread = null;
}
}

public void waitUntil(long timeout) {
StopWatch stopWatch = new StopWatch();
stopWatch.start();

long localTimeout = timeout / 10;

while (this.isRunning) {
try {
Thread.sleep(localTimeout);

if (stopWatch.getTime() > timeout) {
break;
}
}
catch (InterruptedException ignore) {
}
}

stopWatch.stop();
}

public void waitOrAbort(long timeout) {
waitUntil(timeout);

if (this.isRunning) {
abort();
}
}

@Override
public void run() {
try {
this.result = action.run();
this.isRunning = false;

logger.info("Action '%s' completed.", this.name);
}
catch (Exception e) {
this.isRunning = false;

if (this.interrupted) {
logger.info("Action '%s' aborted.", this.name);
}
else {
logger.info("Action '%s' failed.", this.name);
this.action.onError(e);
}
}
}
//endregion
}
22 changes: 11 additions & 11 deletions src/main/java/hrider/config/ClusterConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ public <T> T getTableConfig(Class<T> clazz, String table) {
/**
* Gets a configuration data related to the specified table and a corresponding column.
*
* @param clazz The class that represents the type of the data to be returned.
* @param table The name of the table.
* @param column The name of the column.
* @param <T> The type of the data to be returned.
* @param clazz The class that represents the type of the data to be returned.
* @param table The name of the table.
* @param key The key to identify the data.
* @param <T> The type of the data to be returned.
* @return The data of the specified type.
*/
public <T> T getTableConfig(Class<T> clazz, String table, String column) {
return get(clazz, String.format("table.%s.%s", table, column));
public <T> T getTableConfig(Class<T> clazz, String table, String key) {
return get(clazz, String.format("table.%s.%s", table, key));
}

/**
Expand Down Expand Up @@ -123,12 +123,12 @@ public void setTableConfig(String table, String value) {
/**
* Sets a configuration data for the specified table and column.
*
* @param table The name of the table.
* @param column The name of the column.
* @param value The data to set.
* @param table The name of the table.
* @param key The identifier of the value.
* @param value The data to set.
*/
public void setTableConfig(String table, String column, String value) {
set(String.format("table.%s.%s", table, column), value);
public void setTableConfig(String table, String key, String value) {
set(String.format("table.%s.%s", table, key), value);
save();
}

Expand Down
30 changes: 22 additions & 8 deletions src/main/java/hrider/config/ConnectionDetails.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package hrider.config;

import hrider.actions.Action;
import hrider.actions.RunnableAction;
import hrider.hbase.ConnectionManager;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;

import java.io.IOException;
import java.io.Serializable;

/**
* Copyright (C) 2012 NICE Systems ltd.
Expand All @@ -26,7 +29,11 @@
* <p/>
* This class represents a data to be used to connect to the hbase and zookeeper nodes.
*/
public class ConnectionDetails {
public class ConnectionDetails implements Serializable {

//region Constants
private static final long serialVersionUID = -5808921673890223877L;
//endregion

//region Variables
private ServerDetails zookeeper;
Expand All @@ -44,13 +51,17 @@ public void setZookeeper(ServerDetails zookeeper) {

//region Public Methods
public boolean canConnect() {
try {
ConnectionManager.create(this);
return true;
}
catch (IOException ignore) {
return false;
}
Boolean result = RunnableAction.runAndWait(
this.zookeeper.getHost(), new Action<Boolean>() {

@Override
public Boolean run() throws IOException {
ConnectionManager.create(ConnectionDetails.this);
return true;
}
}, GlobalConfig.instance().getConnectionCheckTimeout());

return result != null ? result : false;
}

public Configuration createConfig() {
Expand All @@ -59,6 +70,9 @@ public Configuration createConfig() {
config.set("hbase.zookeeper.property.clientPort", this.zookeeper.getPort());
config.set("hbase.client.retries.number", "3");

// config.set("hbase.security.authentication", "kerberos");
// config.set("hbase.rpc.engine", "org.apache.hadoop.hbase.ipc.SecureRpcEngine");

return config;
}

Expand Down
Loading