/** * @return */ public NamedCluster getSelectedNamedCluster() { return namedClusterWidget.getSelectedNamedCluster(); }
@Override public HBaseService getHBaseService() throws ClusterInitializationException { NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); return namedClusterServiceLocator.getService( nc, HBaseService.class ); }
@Override public HBaseService getHBaseService() throws ClusterInitializationException { NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); return namedClusterServiceLocator.getService( nc, HBaseService.class ); }
@Override public HBaseService getHBaseService() throws ClusterInitializationException { NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); return namedClusterServiceLocator.getService( nc, HBaseService.class ); }
@Override public NamedCluster getSelectedNamedCluster() { return NamedClusterBridgeImpl.fromOsgiNamedCluster( namedClusterWidget.getSelectedNamedCluster() ); }
@Override public NamedCluster getNamedClusterFromVfsFileChooser( Spoon spoon ) { VfsFileChooserDialog dialog = spoon.getVfsFileChooserDialog( null, null ); CustomVfsUiPanel currentPanel = dialog.getCurrentPanel(); if ( currentPanel != null && currentPanel instanceof HadoopVfsFileChooserDialog ) { HadoopVfsFileChooserDialog hadoopVfsFileChooserDialog = (HadoopVfsFileChooserDialog) currentPanel; NamedClusterWidgetImpl ncWidget = hadoopVfsFileChooserDialog.getNamedClusterWidget(); return NamedClusterBridgeImpl.fromOsgiNamedCluster( ncWidget.getSelectedNamedCluster() ); } return null; } }
public String getCurrentConfiguration() { String host = ""; String port = ""; NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); if ( nc != null ) { host = m_transMeta.environmentSubstitute( nc.getZooKeeperHost() ); port = m_transMeta.environmentSubstitute( nc.getZooKeeperPort() ); } return host + ":" + port; }
protected void extractNamedClusterFromVfsFileChooser() { VfsFileChooserDialog dialog = Spoon.getInstance().getVfsFileChooserDialog( null, null ); CustomVfsUiPanel currentPanel = dialog.getCurrentPanel(); if ( currentPanel != null && currentPanel instanceof HadoopVfsFileChooserDialog ) { HadoopVfsFileChooserDialog hadoopVfsFileChooserDialog = (HadoopVfsFileChooserDialog) currentPanel; selectedNamedCluster = hadoopVfsFileChooserDialog.getNamedClusterWidget().getSelectedNamedCluster(); } if ( selectedNamedCluster != null ) { setSelectedNamedCluster( selectedNamedCluster ); } }
protected void updateMetaConnectionDetails( HBaseOutputMeta meta ) { if ( Utils.isEmpty( m_stepnameText.getText() ) ) { return; } NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); if ( nc != null ) { meta.setNamedCluster( nc ); } meta.setCoreConfigURL( m_coreConfigText.getText() ); meta.setDefaulConfigURL( m_defaultConfigText.getText() ); meta.setTargetTableName( m_mappedTableNamesCombo.getText() ); meta.setTargetMappingName( m_mappingNamesCombo.getText() ); meta.setDeleteRowKey( m_deleteRowKeyBut.getSelection() ); meta.setDisableWriteToWAL( m_disableWriteToWALBut.getSelection() ); meta.setWriteBufferSize( m_writeBufferSizeText.getText() ); }
protected void updateMetaConnectionDetails( HBaseInputMeta meta ) { NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); if ( nc != null ) { meta.setNamedCluster( nc ); } meta.setCoreConfigURL( m_coreConfigText.getText() ); meta.setDefaulConfigURL( m_defaultConfigText.getText() ); meta.setSourceTableName( m_mappedTableNamesCombo.getText() ); meta.setSourceMappingName( m_mappingNamesCombo.getText() ); }
NamedCluster nc = namedClusterWidgetImpl.getSelectedNamedCluster(); if ( nc != null ) { m_jobEntry.setNamedCluster( nc );
private void deleteMapping() { if ( namedClusterWidget != null && namedClusterWidget.getSelectedNamedCluster() == null ) { MessageDialog.openError( m_shell, BaseMessages.getString( PKG, "MappingDialog.Error.Title.NamedClusterNotSelected" ), BaseMessages.getString( PKG,
public void connect() { NamedCluster nc = getNamedClusterWidget().getSelectedNamedCluster(); // The Named Cluster may be hdfs, maprfs or wasb. We need to detect it here since the named // cluster was just selected. schemeName = "wasb".equals( nc.getStorageScheme() ) ? "wasb" : "hdfs"; FileObject root = rootFile; try { root = KettleVFS.getFileObject( nc.processURLsubstitution( FileName.ROOT_PATH, Spoon.getInstance().getMetaStore(), getVariableSpace() ) ); } catch ( KettleFileException exc ) { showMessageAndLog( BaseMessages.getString( PKG, "HadoopVfsFileChooserDialog.error" ), BaseMessages.getString( PKG, "HadoopVfsFileChooserDialog.Connection.error" ), exc.getMessage() ); } vfsFileChooserDialog.setRootFile( root ); vfsFileChooserDialog.setSelectedFile( root ); rootFile = root; }
private void saveMapping() { if ( namedClusterWidget != null && namedClusterWidget.getSelectedNamedCluster() == null ) { MessageDialog.openError( m_shell, BaseMessages.getString( PKG, "MappingDialog.Error.Title.NamedClusterNotSelected" ), BaseMessages.getString( PKG,
@Override public HBaseConnection getHBaseConnection() throws IOException, ClusterInitializationException { /* * URL coreConf = null; URL defaultConf = null; */ String coreConf = ""; String defaultConf = ""; String zookeeperHosts = ""; if ( !Utils.isEmpty( m_coreConfigText.getText() ) ) { coreConf = transMeta.environmentSubstitute( m_coreConfigText.getText() ); } if ( !Utils.isEmpty( m_defaultConfigText.getText() ) ) { defaultConf = transMeta.environmentSubstitute( m_defaultConfigText.getText() ); } NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); if ( nc != null ) { zookeeperHosts = transMeta.environmentSubstitute( nc.getZooKeeperHost() ); } if ( Utils.isEmpty( zookeeperHosts ) && Utils.isEmpty( coreConf ) && Utils.isEmpty( defaultConf ) ) { throw new IOException( BaseMessages.getString( HBaseOutputMeta.PKG, "MappingDialog.Error.Message.CantConnectNoConnectionDetailsProvided" ) ); } return getHBaseService().getHBaseConnection( transMeta, coreConf, defaultConf, null ); }
public HBaseConnection getHBaseConnection() throws IOException, ClusterInitializationException { HBaseConnection conf = null; String coreConf = ""; String defaultConf = ""; String zookeeperHosts = ""; NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); HBaseService hBaseService = getHBaseService(); if ( nc != null ) { zookeeperHosts = transMeta.environmentSubstitute( nc.getZooKeeperHost() ); } if ( !Const.isEmpty( m_coreConfigText.getText() ) ) { coreConf = transMeta.environmentSubstitute( m_coreConfigText.getText() ); } if ( !Const.isEmpty( m_defaultConfigText.getText() ) ) { defaultConf = transMeta.environmentSubstitute( m_defaultConfigText.getText() ); } if ( Const.isEmpty( zookeeperHosts ) && Const.isEmpty( coreConf ) && Const.isEmpty( defaultConf ) ) { throw new IOException( BaseMessages.getString( HBaseInputMeta.PKG, "MappingDialog.Error.Message.CantConnectNoConnectionDetailsProvided" ) ); } return hBaseService.getHBaseConnection( transMeta, coreConf, defaultConf, null ); }
BaseMessages.getString( BASE_PKG, "System.FileType.AllFiles" ) }; NamedCluster namedCluster = namedClusterWidget.getSelectedNamedCluster(); if ( namedCluster == null ) { return;
public void connect() { NamedCluster nc = getNamedClusterWidget().getSelectedNamedCluster(); HadoopVfsConnection hdfsConnection = new HadoopVfsConnection( nc, getVariableSpace() ); hdfsConnection.setCustomParameters( Props.getInstance() ); // The Named Cluster may be hdfs, maprfs or wasb. We need to detect it here since the named // cluster was just selected. //schemeName = "wasb".equals( nc.getStorageScheme() ) ? "wasb" : "hdfs"; String connectionString = Schemes.NAMED_CLUSTER_SCHEME + "://" + nc.getName(); FileSystemOptions fsoptions = new FileSystemOptions(); FileObject root = rootFile; try { root = KettleVFS.getFileObject( connectionString, fsoptions ); } catch ( KettleFileException exc ) { showMessageAndLog( BaseMessages.getString( PKG, "HadoopVfsFileChooserDialog.error" ), BaseMessages.getString( PKG, "HadoopVfsFileChooserDialog.Connection.error" ), exc.getMessage() ); } vfsFileChooserDialog.setRootFile( root ); vfsFileChooserDialog.setSelectedFile( root ); rootFile = root; }
private void populateTableCombo( boolean force ) { if ( namedClusterWidget != null && namedClusterWidget.getSelectedNamedCluster() == null ) { MessageDialog.openError( m_shell, BaseMessages.getString( PKG, "MappingDialog.Error.Title.NamedClusterNotSelected" ), BaseMessages.getString( PKG,
return; if ( namedClusterWidget.getSelectedNamedCluster() == null ) { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setText( BaseMessages.getString( HBaseOutputMeta.PKG, "Dialog.Error" ) ); return; } else { NamedCluster nc = namedClusterWidget.getSelectedNamedCluster(); if ( StringUtils.isEmpty( nc.getZooKeeperHost() ) ) { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );