Sumo: improve logging and remove some unused code.

This commit is contained in:
Kristian Bendiksen
2024-08-21 16:39:48 +02:00
parent 123f6fdcfa
commit ef9a397188
3 changed files with 12 additions and 11 deletions

View File

@@ -467,6 +467,8 @@ void RiaSumoConnector::requestBlobDownload( const QString& blobId )
//--------------------------------------------------------------------------------------------------
void RiaSumoConnector::requestBlobByRedirectUri( const QString& blobId, const QString& redirectUri )
{
RiaLogging::debug( QString( "Requesting blob. Id: %1 Redirect URL: %2" ).arg( blobId ).arg( redirectUri ) );
requestTokenBlocking();
QNetworkRequest networkRequest;
@@ -700,10 +702,10 @@ void RiaSumoConnector::parseCases( QNetworkReply* reply )
QString fieldName = fmuCase["name"].toString();
m_cases.push_back( SumoCase{ SumoCaseId( id ), kind, fieldName } );
}
}
emit casesFinished();
}
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -154,9 +154,5 @@ private:
std::vector<QString> m_blobUrl;
QString m_redirect;
std::vector<SumoRedirect> m_redirectInfo;
QByteArray m_parquetData;
};

View File

@@ -120,6 +120,7 @@ void RimSummaryEnsembleSumo::loadSummaryData( const RifEclipseSummaryAddress& re
if ( m_parquetTable.find( key ) == m_parquetTable.end() )
{
auto contents = loadParquetData( key );
RiaLogging::debug( QString( "Load Summary Data. Contents size: %1" ).arg( contents.size() ) );
arrow::MemoryPool* pool = arrow::default_memory_pool();
@@ -127,20 +128,22 @@ void RimSummaryEnsembleSumo::loadSummaryData( const RifEclipseSummaryAddress& re
std::shared_ptr<arrow::Table> table;
std::unique_ptr<parquet::arrow::FileReader> arrow_reader;
if ( parquet::arrow::OpenFile( input, pool, &arrow_reader ).ok() )
if ( auto openResult = parquet::arrow::OpenFile( input, pool, &arrow_reader ); openResult.ok() )
{
if ( arrow_reader->ReadTable( &table ).ok() )
if ( auto readResult = arrow_reader->ReadTable( &table ); readResult.ok() )
{
RiaLogging::info( "Parquet: Read table" );
RiaLogging::info( QString( "Parquet: Read table successfully for %1" ).arg( QString::fromStdString( resultAddress.uiText() ) ) );
}
else
{
RiaLogging::warning( "Parquet: Error detected during parsing of table" );
RiaLogging::warning( QString( "Parquet: Error detected during parsing of table. Message: %1" )
.arg( QString::fromStdString( readResult.ToString() ) ) );
}
}
else
{
RiaLogging::warning( "Parquet: Not able to open data stream" );
RiaLogging::warning(
QString( "Parquet: Not able to open data stream. Message: %1" ).arg( QString::fromStdString( openResult.ToString() ) ) );
}
m_parquetTable[key] = table;